---
title: "Get a single item from a conversation with the given IDs."
method: GET
path: "/conversations/{conversation_id}/items/{item_id}"
tags: ["Conversations"]
---

# Get a single item from a conversation with the given IDs.

`GET /conversations/{conversation_id}/items/{item_id}`

## Path parameters

- `conversation_id` string, required
- `item_id` string, required

## Query parameters

- `include` IncludeEnum[]

## Response `200`

OK

- union — A single item within a conversation. The set of possible types are the same as the `output` type of a [Response object](/docs/api-reference/responses/object#responses/object-output).
  - Message — A message to or from the model.
    - `type` 'message', required — The type of the message. Always set to `message`.
    - `id` string, required — The unique ID of the message.
    - `status` 'in_progress' | 'completed' | 'incomplete', required
    - `role` 'unknown' | 'user' | 'assistant' | 'system' | 'critic' | 'discriminator' | 'developer' | 'tool', required
    - `content` union[], required — The content of the message
      - union — A content part that makes up an input or output item.
        - InputTextContent — A text input to the model.
          - `type` 'input_text', required — The type of the input item. Always `input_text`.
          - `text` string, required — The text input to the model.
          - `prompt_cache_breakpoint` PromptCacheBreakpointConfig — Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
            - `mode` 'explicit', required — The breakpoint mode. Always `explicit`.
        - OutputTextContent — A text output from the model.
          - `type` 'output_text', required — The type of the output text. Always `output_text`.
          - `text` string, required — The text output from the model.
          - `annotations` Annotation[], required — The annotations of the text output.
            - union — An annotation that applies to a span of output text.
              - …
          - `logprobs` LogProb[], required
            - `token` string, required
            - `logprob` number, required
            - `bytes` integer[], required
            - `top_logprobs` TopLogProb[], required
              - …
        - TextContent — A text content.
          - `type` 'text', required
          - `text` string, required
        - SummaryTextContent — A summary text from the model.
          - `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.
        - ReasoningTextContent — Reasoning text from the model.
          - `type` 'reasoning_text', required — The type of the reasoning text. Always `reasoning_text`.
          - `text` string, required — The reasoning text from the model.
        - RefusalContent — A refusal from the model.
          - `type` 'refusal', required — The type of the refusal. Always `refusal`.
          - `refusal` string, required — The refusal explanation from the model.
        - InputImageContent — An image input to the model. Learn about [image inputs](/docs/guides/vision).
          - `type` 'input_image', required — The type of the input item. Always `input_image`.
          - `image_url` string, uri, nullable — The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
          - `file_id` string, nullable — The ID of the file to be sent to the model.
          - `detail` 'low' | 'high' | 'auto' | 'original', required
          - `prompt_cache_breakpoint` PromptCacheBreakpointConfig — Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
            - `mode` 'explicit', required — The breakpoint mode. Always `explicit`.
        - ComputerScreenshotContent — A screenshot of a computer.
          - `type` 'computer_screenshot', required — Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.
          - `image_url` string, uri, nullable, required — The URL of the screenshot image.
          - `file_id` string, nullable, required — The identifier of an uploaded file that contains the screenshot.
          - `detail` 'low' | 'high' | 'auto' | 'original', required
          - `prompt_cache_breakpoint` PromptCacheBreakpointConfig — Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
            - `mode` 'explicit', required — The breakpoint mode. Always `explicit`.
        - InputFileContent — A file input to the model.
          - `type` 'input_file', required — The type of the input item. Always `input_file`.
          - `file_id` string, nullable — The ID of the file to be sent to the model.
          - `filename` string — The name of the file to be sent to the model.
          - `file_data` string — The content of the file to be sent to the model.
          - `prompt_cache_breakpoint` PromptCacheBreakpointConfig — Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
            - `mode` 'explicit', required — The breakpoint mode. Always `explicit`.
          - `file_url` string, uri — The URL of the file to be sent to the model.
          - `detail` 'auto' | 'low' | 'high'
    - `phase` 'commentary' | 'final_answer'
  - FunctionToolCallResource — A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information.
    - `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.
      - DirectToolCallCaller
        - `type` 'direct', required
      - ProgramToolCallCaller
        - `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.
  - FunctionToolCallOutputResource — The output of a function tool call.
    - `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 — The unique ID of the function tool call generated by the model.
    - `name` string — The name of the tool that produced the output.
    - `namespace` string — The namespace of the tool that produced the output.
    - `caller` union — The execution context that produced this tool call.
      - DirectToolCallCallerParam
        - `type` 'direct', required — The caller type. Always `direct`.
      - ProgramToolCallCallerParam
        - `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.
      - FunctionAndCustomToolCallOutput[] — Text, image, or file output of the function call.
        - union
          - InputTextContent — A text input to the model.
            - `type` 'input_text', required — The type of the input item. Always `input_text`.
            - `text` string, required — The text input to the model.
            - `prompt_cache_breakpoint` PromptCacheBreakpointConfig — Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
              - …
          - InputImageContent — An image input to the model. Learn about [image inputs](/docs/guides/vision).
            - `type` 'input_image', required — The type of the input item. Always `input_image`.
            - `image_url` string, uri, nullable — The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
            - `file_id` string, nullable — The ID of the file to be sent to the model.
            - `detail` 'low' | 'high' | 'auto' | 'original', required
            - `prompt_cache_breakpoint` PromptCacheBreakpointConfig — Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
              - …
          - InputFileContent — A file input to the model.
            - `type` 'input_file', required — The type of the input item. Always `input_file`.
            - `file_id` string, nullable — The ID of the file to be sent to the model.
            - `filename` string — The name of the file to be sent to the model.
            - `file_data` string — The content of the file to be sent to the model.
            - `prompt_cache_breakpoint` PromptCacheBreakpointConfig — Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
              - …
            - `file_url` string, uri — The URL of the file to be sent to the model.
            - `detail` 'auto' | 'low' | 'high'
    - `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.
  - FileSearchToolCall — The results of a file search tool call. See the [file search guide](/docs/guides/tools-file-search) for more information.
    - `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` VectorStoreFileAttributes, 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.
  - WebSearchToolCall — The results of a web search tool call. See the [web search guide](/docs/guides/tools-web-search) for more information.
    - `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.
          - `type` 'url', required — The type of source. Always `url`.
          - `url` string, uri, required — The URL of the source.
      - 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.
  - ImageGenToolCall — An image generation request made by the model.
    - `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.
  - ComputerToolCall — A tool call to a computer use tool. See the [computer use guide](/docs/guides/tools-computer-use) for more information.
    - `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
      - ClickParam — 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.
      - DoubleClickAction — 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.
      - DragParam — A drag action.
        - `type` 'drag', required — Specifies the event type. For a drag action, this property is always set to `drag`.
        - `path` CoordParam[], 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 } ] ```
          - `x` integer, required — The x-coordinate.
          - `y` integer, required — The y-coordinate.
        - `keys` string[], nullable — The keys being held while dragging the mouse.
      - KeyPressAction — 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.
      - MoveParam — 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.
      - ScreenshotParam — A screenshot action.
        - `type` 'screenshot', required — Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
      - ScrollParam — 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.
      - TypeParam — 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.
      - WaitParam — A wait action.
        - `type` 'wait', required — Specifies the event type. For a wait action, this property is always set to `wait`.
    - `actions` ComputerAction[] — Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields.
      - union
        - ClickParam — 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.
        - DoubleClickAction — 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.
        - DragParam — A drag action.
          - `type` 'drag', required — Specifies the event type. For a drag action, this property is always set to `drag`.
          - `path` CoordParam[], 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 } ] ```
            - `x` integer, required — The x-coordinate.
            - `y` integer, required — The y-coordinate.
          - `keys` string[], nullable — The keys being held while dragging the mouse.
        - KeyPressAction — 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.
        - MoveParam — 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.
        - ScreenshotParam — A screenshot action.
          - `type` 'screenshot', required — Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
        - ScrollParam — 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.
        - TypeParam — 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.
        - WaitParam — A wait action.
          - `type` 'wait', required — Specifies the event type. For a wait action, this property is always set to `wait`.
    - `pending_safety_checks` ComputerCallSafetyCheckParam[], 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.
  - ComputerToolCallOutputResource — The output of a computer tool call.
    - `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` ComputerCallSafetyCheckParam[] — 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` ComputerScreenshotImage, 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.
  - ToolSearchCall
    - `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.
  - ToolSearchOutput
    - `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` Tool[], required — The loaded tool definitions returned by tool search.
      - union — A tool that can be used to generate a response.
        - FunctionTool — 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).
          - `type` 'function', required — The type of the function tool. Always `function`.
          - `name` string, required — The name of the function to call.
          - `description` string, nullable — A description of the function. Used by the model to determine whether or not to call the function.
          - `parameters` object, nullable, required — A JSON schema object describing the parameters of the function.
          - `output_schema` object, nullable — A JSON schema object describing the JSON value encoded in string outputs for this function.
          - `strict` boolean, nullable, required — Whether strict parameter validation is enforced for this function tool.
          - `defer_loading` boolean — Whether this function is deferred and loaded via tool search.
          - `allowed_callers` CallableToolAllowedCaller[], nullable — The tool invocation context(s).
        - FileSearchTool — A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).
          - `type` 'file_search', required — The type of the file search tool. Always `file_search`.
          - `vector_store_ids` string[], required — The IDs of the vector stores to search.
          - `max_num_results` integer — The maximum number of results to return. This number should be between 1 and 50 inclusive.
          - `ranking_options` RankingOptions
            - `ranker` 'auto' | 'default-2024-11-15'
            - `score_threshold` number — The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.
            - `hybrid_search` HybridSearchOptions
              - …
          - `filters` union
            - ComparisonFilter — A filter used to compare a specified attribute key to a given value using a defined comparison operation.
              - …
            - CompoundFilter — Combine multiple filters using `and` or `or`.
              - …
        - ComputerTool — A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
          - `type` 'computer', required — The type of the computer tool. Always `computer`.
        - ComputerUsePreviewTool — A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
          - `type` 'computer_use_preview', required — The type of the computer use tool. Always `computer_use_preview`.
          - `environment` 'windows' | 'mac' | 'linux' | 'ubuntu' | 'browser', required
          - `display_width` integer, required — The width of the computer display.
          - `display_height` integer, required — The height of the computer display.
        - WebSearchTool — Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search).
          - `type` 'web_search' | 'web_search_2025_08_26', required — The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.
          - `external_web_access` boolean — Allow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.
          - `filters` object, nullable — Filters for the search.
            - `allowed_domains` string[], nullable — Allowed domains for the search. If not provided, all domains are allowed. Subdomains of the provided domains are allowed as well. Example: `["pubmed.ncbi.nlm.nih.gov"]`
          - `user_location` WebSearchApproximateLocation, nullable — The approximate location of the user.
            - `type` 'approximate' — The type of location approximation. Always `approximate`.
            - `country` string, nullable — The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
            - `region` string, nullable — Free text input for the region of the user, e.g. `California`.
            - `city` string, nullable — Free text input for the city of the user, e.g. `San Francisco`.
            - `timezone` string, nullable — The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
          - `search_context_size` 'low' | 'medium' | 'high' — High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
        - MCPTool — Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
          - `type` 'mcp', required — The type of the MCP tool. Always `mcp`.
          - `server_label` string, required — A label for this MCP server, used to identify it in tool calls.
          - `server_url` string, uri — The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id` must be provided.
          - `connector_id` 'connector_dropbox' | 'connector_gmail' | 'connector_googlecalendar' | 'connector_googledrive' | 'connector_microsoftteams' | 'connector_outlookcalendar' | 'connector_outlookemail' | 'connector_sharepoint' — Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: - Dropbox: `connector_dropbox` - Gmail: `connector_gmail` - Google Calendar: `connector_googlecalendar` - Google Drive: `connector_googledrive` - Microsoft Teams: `connector_microsoftteams` - Outlook Calendar: `connector_outlookcalendar` - Outlook Email: `connector_outlookemail` - SharePoint: `connector_sharepoint`
          - `tunnel_id` string — The Secure MCP Tunnel ID to use instead of a direct server URL. One of `server_url`, `connector_id`, or `tunnel_id` must be provided.
          - `authorization` string — An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here.
          - `server_description` string — Optional description of the MCP server, used to provide more context.
          - `headers` object, nullable — Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
          - `allowed_tools` union
            - string[] — A string array of allowed tool names
            - MCPToolFilter — A filter object to specify which tools are allowed.
              - …
          - `allowed_callers` CallableToolAllowedCaller[], nullable — The tool invocation context(s).
          - `require_approval` union
            - object — Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools that require approval.
              - …
            - 'always' | 'never' — Specify a single approval policy for all tools. One of `always` or `never`. When set to `always`, all tools will require approval. When set to `never`, all tools will not require approval.
          - `defer_loading` boolean — Whether this MCP tool is deferred and discovered via tool search.
        - CodeInterpreterTool — A tool that runs Python code to help generate a response to a prompt.
          - `type` 'code_interpreter', required — The type of the code interpreter tool. Always `code_interpreter`.
          - `container` union, required — The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code, along with an optional `memory_limit` setting.
            - string — The container ID.
            - AutoCodeInterpreterToolParam — Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
              - …
          - `allowed_callers` CallableToolAllowedCaller[], nullable — The tool invocation context(s).
        - ProgrammaticToolCallingParam
          - `type` 'programmatic_tool_calling', required — The type of the tool. Always `programmatic_tool_calling`.
        - ImageGenTool — A tool that generates images using the GPT image models.
          - `type` 'image_generation', required — The type of the image generation tool. Always `image_generation`.
          - `model` union
            - string
            - 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-1.5' — The image generation model to use. Default: `gpt-image-1`.
          - `quality` 'low' | 'medium' | 'high' | 'auto' — The quality of the generated image. One of `low`, `medium`, `high`, or `auto`. Default: `auto`.
          - `size` union — The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.
            - string
            - '1024x1024' | '1024x1536' | '1536x1024' | 'auto'
          - `output_format` 'png' | 'webp' | 'jpeg' — The output format of the generated image. One of `png`, `webp`, or `jpeg`. Default: `png`.
          - `output_compression` integer — Compression level for the output image. Default: 100.
          - `moderation` 'auto' | 'low' — Moderation level for the generated image. Default: `auto`.
          - `background` 'transparent' | 'opaque' | 'auto' — Background type for the generated image. One of `transparent`, `opaque`, or `auto`. Default: `auto`.
          - `input_fidelity` 'high' | 'low' — Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
          - `input_image_mask` object — Optional mask for inpainting. Contains `image_url` (string, optional) and `file_id` (string, optional).
            - `image_url` string — Base64-encoded mask image.
            - `file_id` string — File ID for the mask image.
          - `partial_images` integer — Number of partial images to generate in streaming mode, from 0 (default value) to 3.
          - `action` 'generate' | 'edit' | 'auto'
        - LocalShellToolParam — A tool that allows the model to execute shell commands in a local environment.
          - `type` 'local_shell', required — The type of the local shell tool. Always `local_shell`.
        - FunctionShellToolParam — A tool that allows the model to execute shell commands.
          - `type` 'shell', required — The type of the shell tool. Always `shell`.
          - `environment` union
            - ContainerAutoParam
              - …
            - LocalEnvironmentParam
              - …
            - ContainerReferenceParam
              - …
          - `allowed_callers` CallableToolAllowedCaller[], nullable — The tool invocation context(s).
        - CustomToolParam — A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
          - `type` 'custom', required — The type of the custom tool. Always `custom`.
          - `name` string, required — The name of the custom tool, used to identify it in tool calls.
          - `description` string — Optional description of the custom tool, used to provide more context.
          - `format` union — The input format for the custom tool. Default is unconstrained text.
            - CustomTextFormatParam — Unconstrained free-form text.
              - …
            - CustomGrammarFormatParam — A grammar defined by the user.
              - …
          - `defer_loading` boolean — Whether this tool should be deferred and discovered via tool search.
          - `allowed_callers` CallableToolAllowedCaller[], nullable — The tool invocation context(s).
        - NamespaceToolParam — Groups function/custom tools under a shared namespace.
          - `type` 'namespace', required — The type of the tool. Always `namespace`.
          - `name` string, required — The namespace name used in tool calls (for example, `crm`).
          - `description` string, required — A description of the namespace shown to the model.
          - `tools` union[], required — The function/custom tools available inside this namespace.
            - union — A function or custom tool that belongs to a namespace.
              - …
        - ToolSearchToolParam — Hosted or BYOT tool search configuration for deferred tools.
          - `type` 'tool_search', required — The type of the tool. Always `tool_search`.
          - `execution` 'server' | 'client'
          - `description` string, nullable — Description shown to the model for a client-executed tool search tool.
          - `parameters` EmptyModelParam
        - WebSearchPreviewTool — This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).
          - `type` 'web_search_preview' | 'web_search_preview_2025_03_11', required — The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.
          - `user_location` ApproximateLocation
            - `type` 'approximate', required — The type of location approximation. Always `approximate`.
            - `country` string, nullable — The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
            - `region` string, nullable — Free text input for the region of the user, e.g. `California`.
            - `city` string, nullable — Free text input for the city of the user, e.g. `San Francisco`.
            - `timezone` string, nullable — The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
          - `search_context_size` 'low' | 'medium' | 'high'
          - `search_content_types` SearchContentType[]
        - ApplyPatchToolParam — Allows the assistant to create, delete, or update files using unified diffs.
          - `type` 'apply_patch', required — The type of the tool. Always `apply_patch`.
          - `allowed_callers` CallableToolAllowedCaller[], nullable — The tool invocation context(s).
    - `status` 'in_progress' | 'completed' | 'incomplete', required
    - `created_by` string — The identifier of the actor that created the item.
  - AdditionalTools
    - `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` Tool[], required — The additional tool definitions made available at this item.
      - union — A tool that can be used to generate a response.
        - FunctionTool — 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).
          - `type` 'function', required — The type of the function tool. Always `function`.
          - `name` string, required — The name of the function to call.
          - `description` string, nullable — A description of the function. Used by the model to determine whether or not to call the function.
          - `parameters` object, nullable, required — A JSON schema object describing the parameters of the function.
          - `output_schema` object, nullable — A JSON schema object describing the JSON value encoded in string outputs for this function.
          - `strict` boolean, nullable, required — Whether strict parameter validation is enforced for this function tool.
          - `defer_loading` boolean — Whether this function is deferred and loaded via tool search.
          - `allowed_callers` CallableToolAllowedCaller[], nullable — The tool invocation context(s).
        - FileSearchTool — A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).
          - `type` 'file_search', required — The type of the file search tool. Always `file_search`.
          - `vector_store_ids` string[], required — The IDs of the vector stores to search.
          - `max_num_results` integer — The maximum number of results to return. This number should be between 1 and 50 inclusive.
          - `ranking_options` RankingOptions
            - `ranker` 'auto' | 'default-2024-11-15'
            - `score_threshold` number — The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.
            - `hybrid_search` HybridSearchOptions
              - …
          - `filters` union
            - ComparisonFilter — A filter used to compare a specified attribute key to a given value using a defined comparison operation.
              - …
            - CompoundFilter — Combine multiple filters using `and` or `or`.
              - …
        - ComputerTool — A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
          - `type` 'computer', required — The type of the computer tool. Always `computer`.
        - ComputerUsePreviewTool — A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
          - `type` 'computer_use_preview', required — The type of the computer use tool. Always `computer_use_preview`.
          - `environment` 'windows' | 'mac' | 'linux' | 'ubuntu' | 'browser', required
          - `display_width` integer, required — The width of the computer display.
          - `display_height` integer, required — The height of the computer display.
        - WebSearchTool — Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search).
          - `type` 'web_search' | 'web_search_2025_08_26', required — The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.
          - `external_web_access` boolean — Allow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.
          - `filters` object, nullable — Filters for the search.
            - `allowed_domains` string[], nullable — Allowed domains for the search. If not provided, all domains are allowed. Subdomains of the provided domains are allowed as well. Example: `["pubmed.ncbi.nlm.nih.gov"]`
          - `user_location` WebSearchApproximateLocation, nullable — The approximate location of the user.
            - `type` 'approximate' — The type of location approximation. Always `approximate`.
            - `country` string, nullable — The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
            - `region` string, nullable — Free text input for the region of the user, e.g. `California`.
            - `city` string, nullable — Free text input for the city of the user, e.g. `San Francisco`.
            - `timezone` string, nullable — The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
          - `search_context_size` 'low' | 'medium' | 'high' — High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
        - MCPTool — Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
          - `type` 'mcp', required — The type of the MCP tool. Always `mcp`.
          - `server_label` string, required — A label for this MCP server, used to identify it in tool calls.
          - `server_url` string, uri — The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id` must be provided.
          - `connector_id` 'connector_dropbox' | 'connector_gmail' | 'connector_googlecalendar' | 'connector_googledrive' | 'connector_microsoftteams' | 'connector_outlookcalendar' | 'connector_outlookemail' | 'connector_sharepoint' — Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: - Dropbox: `connector_dropbox` - Gmail: `connector_gmail` - Google Calendar: `connector_googlecalendar` - Google Drive: `connector_googledrive` - Microsoft Teams: `connector_microsoftteams` - Outlook Calendar: `connector_outlookcalendar` - Outlook Email: `connector_outlookemail` - SharePoint: `connector_sharepoint`
          - `tunnel_id` string — The Secure MCP Tunnel ID to use instead of a direct server URL. One of `server_url`, `connector_id`, or `tunnel_id` must be provided.
          - `authorization` string — An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here.
          - `server_description` string — Optional description of the MCP server, used to provide more context.
          - `headers` object, nullable — Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
          - `allowed_tools` union
            - string[] — A string array of allowed tool names
            - MCPToolFilter — A filter object to specify which tools are allowed.
              - …
          - `allowed_callers` CallableToolAllowedCaller[], nullable — The tool invocation context(s).
          - `require_approval` union
            - object — Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools that require approval.
              - …
            - 'always' | 'never' — Specify a single approval policy for all tools. One of `always` or `never`. When set to `always`, all tools will require approval. When set to `never`, all tools will not require approval.
          - `defer_loading` boolean — Whether this MCP tool is deferred and discovered via tool search.
        - CodeInterpreterTool — A tool that runs Python code to help generate a response to a prompt.
          - `type` 'code_interpreter', required — The type of the code interpreter tool. Always `code_interpreter`.
          - `container` union, required — The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code, along with an optional `memory_limit` setting.
            - string — The container ID.
            - AutoCodeInterpreterToolParam — Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
              - …
          - `allowed_callers` CallableToolAllowedCaller[], nullable — The tool invocation context(s).
        - ProgrammaticToolCallingParam
          - `type` 'programmatic_tool_calling', required — The type of the tool. Always `programmatic_tool_calling`.
        - ImageGenTool — A tool that generates images using the GPT image models.
          - `type` 'image_generation', required — The type of the image generation tool. Always `image_generation`.
          - `model` union
            - string
            - 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-1.5' — The image generation model to use. Default: `gpt-image-1`.
          - `quality` 'low' | 'medium' | 'high' | 'auto' — The quality of the generated image. One of `low`, `medium`, `high`, or `auto`. Default: `auto`.
          - `size` union — The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.
            - string
            - '1024x1024' | '1024x1536' | '1536x1024' | 'auto'
          - `output_format` 'png' | 'webp' | 'jpeg' — The output format of the generated image. One of `png`, `webp`, or `jpeg`. Default: `png`.
          - `output_compression` integer — Compression level for the output image. Default: 100.
          - `moderation` 'auto' | 'low' — Moderation level for the generated image. Default: `auto`.
          - `background` 'transparent' | 'opaque' | 'auto' — Background type for the generated image. One of `transparent`, `opaque`, or `auto`. Default: `auto`.
          - `input_fidelity` 'high' | 'low' — Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
          - `input_image_mask` object — Optional mask for inpainting. Contains `image_url` (string, optional) and `file_id` (string, optional).
            - `image_url` string — Base64-encoded mask image.
            - `file_id` string — File ID for the mask image.
          - `partial_images` integer — Number of partial images to generate in streaming mode, from 0 (default value) to 3.
          - `action` 'generate' | 'edit' | 'auto'
        - LocalShellToolParam — A tool that allows the model to execute shell commands in a local environment.
          - `type` 'local_shell', required — The type of the local shell tool. Always `local_shell`.
        - FunctionShellToolParam — A tool that allows the model to execute shell commands.
          - `type` 'shell', required — The type of the shell tool. Always `shell`.
          - `environment` union
            - ContainerAutoParam
              - …
            - LocalEnvironmentParam
              - …
            - ContainerReferenceParam
              - …
          - `allowed_callers` CallableToolAllowedCaller[], nullable — The tool invocation context(s).
        - CustomToolParam — A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
          - `type` 'custom', required — The type of the custom tool. Always `custom`.
          - `name` string, required — The name of the custom tool, used to identify it in tool calls.
          - `description` string — Optional description of the custom tool, used to provide more context.
          - `format` union — The input format for the custom tool. Default is unconstrained text.
            - CustomTextFormatParam — Unconstrained free-form text.
              - …
            - CustomGrammarFormatParam — A grammar defined by the user.
              - …
          - `defer_loading` boolean — Whether this tool should be deferred and discovered via tool search.
          - `allowed_callers` CallableToolAllowedCaller[], nullable — The tool invocation context(s).
        - NamespaceToolParam — Groups function/custom tools under a shared namespace.
          - `type` 'namespace', required — The type of the tool. Always `namespace`.
          - `name` string, required — The namespace name used in tool calls (for example, `crm`).
          - `description` string, required — A description of the namespace shown to the model.
          - `tools` union[], required — The function/custom tools available inside this namespace.
            - union — A function or custom tool that belongs to a namespace.
              - …
        - ToolSearchToolParam — Hosted or BYOT tool search configuration for deferred tools.
          - `type` 'tool_search', required — The type of the tool. Always `tool_search`.
          - `execution` 'server' | 'client'
          - `description` string, nullable — Description shown to the model for a client-executed tool search tool.
          - `parameters` EmptyModelParam
        - WebSearchPreviewTool — This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).
          - `type` 'web_search_preview' | 'web_search_preview_2025_03_11', required — The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.
          - `user_location` ApproximateLocation
            - `type` 'approximate', required — The type of location approximation. Always `approximate`.
            - `country` string, nullable — The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
            - `region` string, nullable — Free text input for the region of the user, e.g. `California`.
            - `city` string, nullable — Free text input for the city of the user, e.g. `San Francisco`.
            - `timezone` string, nullable — The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
          - `search_context_size` 'low' | 'medium' | 'high'
          - `search_content_types` SearchContentType[]
        - ApplyPatchToolParam — Allows the assistant to create, delete, or update files using unified diffs.
          - `type` 'apply_patch', required — The type of the tool. Always `apply_patch`.
          - `allowed_callers` CallableToolAllowedCaller[], nullable — The tool invocation context(s).
  - ReasoningItem — 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](/docs/guides/conversation-state).
    - `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. When streaming, use the completed reasoning item and its `encrypted_content` from the `response.output_item.done` event in subsequent requests. The `encrypted_content` in `response.output_item.added` may be incomplete. This is especially important when `store` is `false` or when using Zero Data Retention.
    - `summary` SummaryTextContent[], 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` ReasoningTextContent[] — 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.
  - Program
    - `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.
  - ProgramOutput
    - `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
  - CompactionBody — A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).
    - `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.
  - CodeInterpreterToolCall — A tool call to run code.
    - `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
        - CodeInterpreterOutputLogs — The logs output from the code interpreter.
          - `type` 'logs', required — The type of the output. Always `logs`.
          - `logs` string, required — The logs output from the code interpreter.
        - CodeInterpreterOutputImage — The image output from the code interpreter.
          - `type` 'image', required — The type of the output. Always `image`.
          - `url` string, uri, required — The URL of the image output from the code interpreter.
  - LocalShellToolCall — A tool call to run a command on the local shell.
    - `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` LocalShellExecAction, 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.
  - LocalShellToolCallOutput — The output of a local shell tool call.
    - `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`.
  - FunctionShellCall — A tool call that executes one or more shell commands in a managed environment.
    - `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.
      - DirectToolCallCaller
        - `type` 'direct', required
      - ProgramToolCallCaller
        - `type` 'program', required
        - `caller_id` string, required — The call ID of the program item that produced this tool call.
    - `action` FunctionShellAction, 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
      - LocalEnvironmentResource — Represents the use of a local environment to perform shell actions.
        - `type` 'local', required — The environment type. Always `local`.
      - ContainerReferenceResource — 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.
  - FunctionShellCallOutput — The output of a shell tool call that was emitted.
    - `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.
      - DirectToolCallCaller
        - `type` 'direct', required
      - ProgramToolCallCaller
        - `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` FunctionShellCallOutputContent[], 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.
        - FunctionShellCallOutputTimeoutOutcome — Indicates that the shell call exceeded its configured time limit.
          - `type` 'timeout', required — The outcome type. Always `timeout`.
        - FunctionShellCallOutputExitOutcome — Indicates that the shell commands finished and returned an exit code.
          - `type` 'exit', required — The outcome type. Always `exit`.
          - `exit_code` integer, required — Exit code from the shell process.
      - `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.
  - ApplyPatchToolCall — A tool call that applies file diffs by creating, deleting, or updating files.
    - `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.
      - DirectToolCallCaller
        - `type` 'direct', required
      - ProgramToolCallCaller
        - `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.
      - ApplyPatchCreateFileOperation — 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.
      - ApplyPatchDeleteFileOperation — 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.
      - ApplyPatchUpdateFileOperation — 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.
  - ApplyPatchToolCallOutput — The output emitted by an apply patch tool call.
    - `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.
      - DirectToolCallCaller
        - `type` 'direct', required
      - ProgramToolCallCaller
        - `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.
  - MCPListTools — A list of tools available on an MCP server.
    - `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` MCPListToolsTool[], 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.
  - MCPApprovalRequest — A request for human approval of a tool invocation.
    - `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.
  - MCPApprovalResponseResource — A response to an MCP approval request.
    - `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.
  - MCPToolCall — An invocation of a tool on an MCP server.
    - `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` union
      - string — The error from the tool call, if any.
      - union
        - MCPProtocolError
          - `type` 'mcp_protocol_error', required
          - `code` integer, required
          - `message` string, required
        - MCPToolExecutionError
          - `type` 'mcp_tool_execution_error', required
          - `content` unknown, required
        - HTTPError
          - `type` 'http_error', required
          - `code` integer, required
          - `message` string, required
    - `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.
  - CustomToolCall — A call to a custom tool created by the model.
    - `type` 'custom_tool_call', required — The type of the custom tool call. Always `custom_tool_call`.
    - `id` string — The unique ID of the custom tool call in the OpenAI platform.
    - `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.
      - DirectToolCallCaller
        - `type` 'direct', required
      - ProgramToolCallCaller
        - `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.
  - CustomToolCallOutput — The output of a custom tool call from your code, being sent back to the model.
    - `type` 'custom_tool_call_output', required — The type of the custom tool call output. Always `custom_tool_call_output`.
    - `id` string — The unique ID of the custom tool call output in the OpenAI platform.
    - `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.
      - DirectToolCallCallerParam
        - `type` 'direct', required — The caller type. Always `direct`.
      - ProgramToolCallCallerParam
        - `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.
      - FunctionAndCustomToolCallOutput[] — Text, image, or file output of the custom tool call.
        - union
          - InputTextContent — A text input to the model.
            - `type` 'input_text', required — The type of the input item. Always `input_text`.
            - `text` string, required — The text input to the model.
            - `prompt_cache_breakpoint` PromptCacheBreakpointConfig — Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
              - …
          - InputImageContent — An image input to the model. Learn about [image inputs](/docs/guides/vision).
            - `type` 'input_image', required — The type of the input item. Always `input_image`.
            - `image_url` string, uri, nullable — The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
            - `file_id` string, nullable — The ID of the file to be sent to the model.
            - `detail` 'low' | 'high' | 'auto' | 'original', required
            - `prompt_cache_breakpoint` PromptCacheBreakpointConfig — Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
              - …
          - InputFileContent — A file input to the model.
            - `type` 'input_file', required — The type of the input item. Always `input_file`.
            - `file_id` string, nullable — The ID of the file to be sent to the model.
            - `filename` string — The name of the file to be sent to the model.
            - `file_data` string — The content of the file to be sent to the model.
            - `prompt_cache_breakpoint` PromptCacheBreakpointConfig — Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
              - …
            - `file_url` string, uri — The URL of the file to be sent to the model.
            - `detail` 'auto' | 'low' | 'high'

---

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