# Create a conversation

`POST /openai/v1/conversations`

Creates a new conversation resource.

## Parameters

### Header parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `x-ms-user-isolation-key` | `string` | No | Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. |

## Request Body

Content-Type: `application/json` *(required)*

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `metadata` | `OpenAI.Metadata \| null` | No |  |
| `items` | `(OpenAI.EasyInputMessage \| OpenAI.ItemReferenceParam \| OpenAI.InputItemOutputMessage \| OpenAI.InputItemFileSearchToolCall \| OpenAI.InputItemComputerToolCall \| OpenAI.InputItemComputerCallOutputItemParam \| OpenAI.InputItemWebSearchToolCall \| OpenAI.InputItemFunctionToolCall \| OpenAI.InputItemFunctionCallOutputItemParam \| OpenAI.InputItemToolSearchCallItemParam \| OpenAI.InputItemToolSearchOutputItemParam \| OpenAI.InputItemReasoningItem \| OpenAI.InputItemCompactionSummaryItemParam \| OpenAI.InputItemImageGenToolCall \| OpenAI.InputItemCodeInterpreterToolCall \| OpenAI.InputItemLocalShellToolCall \| OpenAI.InputItemLocalShellToolCallOutput \| OpenAI.InputItemFunctionShellCallItemParam \| OpenAI.InputItemFunctionShellCallOutputItemParam \| OpenAI.InputItemApplyPatchToolCallItemParam \| OpenAI.InputItemApplyPatchToolCallOutputItemParam \| OpenAI.InputItemMcpListTools \| OpenAI.InputItemMcpApprovalRequest \| OpenAI.InputItemMcpApprovalResponse \| OpenAI.InputItemMcpToolCall \| OpenAI.InputItemCustomToolCallOutput \| OpenAI.InputItemCustomToolCall)[] \| null` | No |  |

### `items` — `(OpenAI.EasyInputMessage | OpenAI.ItemReferenceParam | OpenAI.InputItemOutputMessage | OpenAI.InputItemFileSearchToolCall | OpenAI.InputItemComputerToolCall | OpenAI.InputItemComputerCallOutputItemParam | OpenAI.InputItemWebSearchToolCall | OpenAI.InputItemFunctionToolCall | OpenAI.InputItemFunctionCallOutputItemParam | OpenAI.InputItemToolSearchCallItemParam | OpenAI.InputItemToolSearchOutputItemParam | OpenAI.InputItemReasoningItem | OpenAI.InputItemCompactionSummaryItemParam | OpenAI.InputItemImageGenToolCall | OpenAI.InputItemCodeInterpreterToolCall | OpenAI.InputItemLocalShellToolCall | OpenAI.InputItemLocalShellToolCallOutput | OpenAI.InputItemFunctionShellCallItemParam | OpenAI.InputItemFunctionShellCallOutputItemParam | OpenAI.InputItemApplyPatchToolCallItemParam | OpenAI.InputItemApplyPatchToolCallOutputItemParam | OpenAI.InputItemMcpListTools | OpenAI.InputItemMcpApprovalRequest | OpenAI.InputItemMcpApprovalResponse | OpenAI.InputItemMcpToolCall | OpenAI.InputItemCustomToolCallOutput | OpenAI.InputItemCustomToolCall)[] | null`

**One of the following:**

#### `(OpenAI.EasyInputMessage | OpenAI.ItemReferenceParam | OpenAI.InputItemOutputMessage | OpenAI.InputItemFileSearchToolCall | OpenAI.InputItemComputerToolCall | OpenAI.InputItemComputerCallOutputItemParam | OpenAI.InputItemWebSearchToolCall | OpenAI.InputItemFunctionToolCall | OpenAI.InputItemFunctionCallOutputItemParam | OpenAI.InputItemToolSearchCallItemParam | OpenAI.InputItemToolSearchOutputItemParam | OpenAI.InputItemReasoningItem | OpenAI.InputItemCompactionSummaryItemParam | OpenAI.InputItemImageGenToolCall | OpenAI.InputItemCodeInterpreterToolCall | OpenAI.InputItemLocalShellToolCall | OpenAI.InputItemLocalShellToolCallOutput | OpenAI.InputItemFunctionShellCallItemParam | OpenAI.InputItemFunctionShellCallOutputItemParam | OpenAI.InputItemApplyPatchToolCallItemParam | OpenAI.InputItemApplyPatchToolCallOutputItemParam | OpenAI.InputItemMcpListTools | OpenAI.InputItemMcpApprovalRequest | OpenAI.InputItemMcpApprovalResponse | OpenAI.InputItemMcpToolCall | OpenAI.InputItemCustomToolCallOutput | OpenAI.InputItemCustomToolCall)[]` — `(OpenAI.EasyInputMessage | OpenAI.ItemReferenceParam | OpenAI.InputItemOutputMessage | OpenAI.InputItemFileSearchToolCall | OpenAI.InputItemComputerToolCall | OpenAI.InputItemComputerCallOutputItemParam | OpenAI.InputItemWebSearchToolCall | OpenAI.InputItemFunctionToolCall | OpenAI.InputItemFunctionCallOutputItemParam | OpenAI.InputItemToolSearchCallItemParam | OpenAI.InputItemToolSearchOutputItemParam | OpenAI.InputItemReasoningItem | OpenAI.InputItemCompactionSummaryItemParam | OpenAI.InputItemImageGenToolCall | OpenAI.InputItemCodeInterpreterToolCall | OpenAI.InputItemLocalShellToolCall | OpenAI.InputItemLocalShellToolCallOutput | OpenAI.InputItemFunctionShellCallItemParam | OpenAI.InputItemFunctionShellCallOutputItemParam | OpenAI.InputItemApplyPatchToolCallItemParam | OpenAI.InputItemApplyPatchToolCallOutputItemParam | OpenAI.InputItemMcpListTools | OpenAI.InputItemMcpApprovalRequest | OpenAI.InputItemMcpApprovalResponse | OpenAI.InputItemMcpToolCall | OpenAI.InputItemCustomToolCallOutput | OpenAI.InputItemCustomToolCall)[]`

**One of the following:**

##### `message` — `message (OpenAI.EasyInputMessage)`

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. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the message input. Always `message`. _Constant:_ `message` |
| `role` | `enum` | Yes | The role of the message input. One of `user`, `assistant`, `system`, or `developer`. _Enum:_ `user`, `assistant`, `system`, `developer` |
| `content` | `string \| (OpenAI.InputContentInputTextContent \| OpenAI.InputContentInputImageContent \| OpenAI.InputContentInputFileContent)[]` | Yes | Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. |
| `phase` | `enum` | No | _Enum:_ `commentary`, `final_answer` |
| `status` | `enum` | No | The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. _Enum:_ `in_progress`, `completed`, `incomplete` |

###### `content` — `string | (OpenAI.InputContentInputTextContent | OpenAI.InputContentInputImageContent | OpenAI.InputContentInputFileContent)[]`

Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.

**One of the following:**

- **`string`** — `string`

| Type | Description |
|------|-------------|
| `string` | — |

- **`OpenAI.InputMessageContentList`** — `OpenAI.InputMessageContentList ((OpenAI.InputContentInputTextContent | OpenAI.InputContentInputImageContent | OpenAI.InputContentInputFileContent)[])`

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

**One of the following:**

- **`input_text`** — `input_text (OpenAI.InputContentInputTextContent)`

A text input to the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the input item. Always `input_text`. _Default:_ `"input_text"` _Constant:_ `input_text` |
| `text` | `string` | Yes | The text input to the model. |

- **`input_image`** — `input_image (OpenAI.InputContentInputImageContent)`

An image input to the model. Learn about [image inputs](/docs/guides/vision).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the input item. Always `input_image`. _Default:_ `"input_image"` _Constant:_ `input_image` |
| `image_url` | `string \| null` | No |  |
| `file_id` | `string \| null` | No |  |
| `detail` | `OpenAI.ImageDetail` | Yes | The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. _Enum:_ `low`, `high`, `auto`, `original` |

- **`input_file`** — `input_file (OpenAI.InputContentInputFileContent)`

A file input to the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the input item. Always `input_file`. _Default:_ `"input_file"` _Constant:_ `input_file` |
| `file_id` | `string \| null` | No |  |
| `filename` | `string` | No | The name of the file to be sent to the model. |
| `file_data` | `string` | No | The content of the file to be sent to the model. |
| `file_url` | `string` | No | The URL of the file to be sent to the model. _Format:_ `uri` |
| `detail` | `OpenAI.FileInputDetail` | No | The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. _Enum:_ `low`, `high` |

##### `item_reference` — `item_reference (OpenAI.ItemReferenceParam)`

An internal identifier for an item to reference.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of item to reference. Always `item_reference`. _Default:_ `"item_reference"` _Constant:_ `item_reference` |
| `id` | `string` | Yes | The ID of the item to reference. |

##### `output_message` — `output_message (OpenAI.InputItemOutputMessage)`

An output message from the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the output message. Always `message`. _Constant:_ `output_message` |
| `id` | `string` | Yes | The unique ID of the output message. |
| `role` | `enum` | Yes | The role of the output message. Always `assistant`. _Constant:_ `assistant` |
| `content` | `(OpenAI.OutputMessageContentOutputTextContent \| OpenAI.OutputMessageContentRefusalContent)[]` | Yes | The content of the output message. |
| `phase` | `enum` | No | _Enum:_ `commentary`, `final_answer` |
| `status` | `enum` | Yes | The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API. _Enum:_ `in_progress`, `completed`, `incomplete` |

###### `content` — `(OpenAI.OutputMessageContentOutputTextContent | OpenAI.OutputMessageContentRefusalContent)[]`

The content of the output message.

**One of the following:**

- **`output_text`** — `output_text (OpenAI.OutputMessageContentOutputTextContent)`

A text output from the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the output text. Always `output_text`. _Default:_ `"output_text"` _Constant:_ `output_text` |
| `text` | `string` | Yes | The text output from the model. |
| `annotations` | `(OpenAI.FileCitationBody \| OpenAI.UrlCitationBody \| OpenAI.ContainerFileCitationBody \| OpenAI.FilePath)[]` | Yes | The annotations of the text output. |
| `logprobs` | `OpenAI.LogProb[]` | Yes |  |

- **`annotations`** — `(OpenAI.FileCitationBody | OpenAI.UrlCitationBody | OpenAI.ContainerFileCitationBody | OpenAI.FilePath)[]`

The annotations of the text output.

**One of the following:**

- **`file_citation`** — `file_citation (OpenAI.FileCitationBody)`

A citation to a file.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the file citation. Always `file_citation`. _Default:_ `"file_citation"` _Constant:_ `file_citation` |
| `file_id` | `string` | Yes | The ID of the file. |
| `index` | `OpenAI.integer` | Yes | The index of the file in the list of files. _Format:_ `int64` |
| `filename` | `string` | Yes | The filename of the file cited. |

- **`url_citation`** — `url_citation (OpenAI.UrlCitationBody)`

A citation for a web resource used to generate a model response.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the URL citation. Always `url_citation`. _Default:_ `"url_citation"` _Constant:_ `url_citation` |
| `url` | `string` | Yes | The URL of the web resource. _Format:_ `uri` |
| `start_index` | `OpenAI.integer` | Yes | The index of the first character of the URL citation in the message. _Format:_ `int64` |
| `end_index` | `OpenAI.integer` | Yes | The index of the last character of the URL citation in the message. _Format:_ `int64` |
| `title` | `string` | Yes | The title of the web resource. |

- **`container_file_citation`** — `container_file_citation (OpenAI.ContainerFileCitationBody)`

A citation for a container file used to generate a model response.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the container file citation. Always `container_file_citation`. _Default:_ `"container_file_citation"` _Constant:_ `container_file_citation` |
| `container_id` | `string` | Yes | The ID of the container file. |
| `file_id` | `string` | Yes | The ID of the file. |
| `start_index` | `OpenAI.integer` | Yes | The index of the first character of the container file citation in the message. _Format:_ `int64` |
| `end_index` | `OpenAI.integer` | Yes | The index of the last character of the container file citation in the message. _Format:_ `int64` |
| `filename` | `string` | Yes | The filename of the container file cited. |

- **`file_path`** — `file_path (OpenAI.FilePath)`

A path to a file.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the file path. Always `file_path`. _Constant:_ `file_path` |
| `file_id` | `string` | Yes | The ID of the file. |
| `index` | `OpenAI.integer` | Yes | The index of the file in the list of files. _Format:_ `int64` |

- **`logprobs`** — `OpenAI.LogProb[]`

**Array of** `OpenAI.LogProb`**:**

The log probability of a token.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `token` | `string` | Yes |  |
| `logprob` | `OpenAI.numeric` | Yes | _Format:_ `double` |
| `bytes` | `OpenAI.integer[]` | Yes |  |
| `top_logprobs` | `OpenAI.TopLogProb[]` | Yes |  |

- **`top_logprobs`** — `OpenAI.TopLogProb[]`

**Array of** `OpenAI.TopLogProb`**:**

The top log probability of a token.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `token` | `string` | Yes |  |
| `logprob` | `OpenAI.numeric` | Yes | _Format:_ `double` |
| `bytes` | `OpenAI.integer[]` | Yes |  |

- **`refusal`** — `refusal (OpenAI.OutputMessageContentRefusalContent)`

A refusal from the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the refusal. Always `refusal`. _Default:_ `"refusal"` _Constant:_ `refusal` |
| `refusal` | `string` | Yes | The refusal explanation from the model. |

##### `file_search_call` — `file_search_call (OpenAI.InputItemFileSearchToolCall)`

The results of a file search tool call. See the [file search guide](/docs/guides/tools-file-search) for more information.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the file search tool call. Always `file_search_call`. _Constant:_ `file_search_call` |
| `id` | `string` | Yes | The unique ID of the file search tool call. |
| `status` | `enum` | Yes | The status of the file search tool call. One of `in_progress`, `searching`, `incomplete` or `failed`, _Enum:_ `in_progress`, `searching`, `completed`, `incomplete`, `failed` |
| `queries` | `string[]` | Yes | The queries used to search for files. |
| `results` | `OpenAI.FileSearchToolCallResults[] \| null` | No |  |

###### `results` — `OpenAI.FileSearchToolCallResults[] | null`

**One of the following:**

- **`OpenAI.FileSearchToolCallResults[]`** — `OpenAI.FileSearchToolCallResults[]`

**Array of** `OpenAI.FileSearchToolCallResults`**:**

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `file_id` | `string` | No |  |
| `text` | `string` | No |  |
| `filename` | `string` | No |  |
| `attributes` | `OpenAI.VectorStoreFileAttributes \| null` | No |  |
| `score` | `number` | No | _Format:_ `float` |

- **`null`** — `null`

| Type | Description |
|------|-------------|
| `null` | — |

##### `computer_call` — `computer_call (OpenAI.InputItemComputerToolCall)`

A tool call to a computer use tool. See the [computer use guide](/docs/guides/tools-computer-use) for more information.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the computer call. Always `computer_call`. _Default:_ `"computer_call"` _Constant:_ `computer_call` |
| `id` | `string` | Yes | The unique ID of the computer call. |
| `call_id` | `string` | Yes | An identifier used when responding to the tool call with output. |
| `action` | `OpenAI.ClickParam \| OpenAI.DoubleClickAction \| OpenAI.DragParam \| OpenAI.KeyPressAction \| OpenAI.MoveParam \| OpenAI.ScreenshotParam \| OpenAI.ScrollParam \| OpenAI.TypeParam \| OpenAI.WaitParam` | No |  |
| `actions` | `(OpenAI.ClickParam \| OpenAI.DoubleClickAction \| OpenAI.DragParam \| OpenAI.KeyPressAction \| OpenAI.MoveParam \| OpenAI.ScreenshotParam \| OpenAI.ScrollParam \| OpenAI.TypeParam \| OpenAI.WaitParam)[]` | No | Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. |
| `pending_safety_checks` | `OpenAI.ComputerCallSafetyCheckParam[]` | Yes | The pending safety checks for the computer call. |
| `status` | `enum` | Yes | The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. _Enum:_ `in_progress`, `completed`, `incomplete` |

###### `action` — `OpenAI.ClickParam | OpenAI.DoubleClickAction | OpenAI.DragParam | OpenAI.KeyPressAction | OpenAI.MoveParam | OpenAI.ScreenshotParam | OpenAI.ScrollParam | OpenAI.TypeParam | OpenAI.WaitParam`

**One of the following:**

- **`click`** — `click (OpenAI.ClickParam)`

A click action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a click action, this property is always `click`. _Default:_ `"click"` _Constant:_ `click` |
| `button` | `OpenAI.ClickButtonType` | Yes | Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. _Enum:_ `left`, `right`, `wheel`, `back`, `forward` |
| `x` | `OpenAI.integer` | Yes | The x-coordinate where the click occurred. _Format:_ `int64` |
| `y` | `OpenAI.integer` | Yes | The y-coordinate where the click occurred. _Format:_ `int64` |
| `keys` | `string[] \| null` | No |  |

- **`double_click`** — `double_click (OpenAI.DoubleClickAction)`

A double click action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a double click action, this property is always set to `double_click`. _Default:_ `"double_click"` _Constant:_ `double_click` |
| `x` | `OpenAI.integer` | Yes | The x-coordinate where the double click occurred. _Format:_ `int64` |
| `y` | `OpenAI.integer` | Yes | The y-coordinate where the double click occurred. _Format:_ `int64` |
| `keys` | `string[] \| null` | Yes |  |

- **`drag`** — `drag (OpenAI.DragParam)`

A drag action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a drag action, this property is always set to `drag`. _Default:_ `"drag"` _Constant:_ `drag` |
| `path` | `OpenAI.CoordParam[]` | Yes | 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[] \| null` | No |  |

- **`path`** — `OpenAI.CoordParam[]`

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 } ] ```

**Array of** `OpenAI.CoordParam`**:**

An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `x` | `OpenAI.integer` | Yes | The x-coordinate. _Format:_ `int64` |
| `y` | `OpenAI.integer` | Yes | The y-coordinate. _Format:_ `int64` |

- **`keypress`** — `keypress (OpenAI.KeyPressAction)`

A collection of keypresses the model would like to perform.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a keypress action, this property is always set to `keypress`. _Default:_ `"keypress"` _Constant:_ `keypress` |
| `keys` | `string[]` | Yes | The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. |

- **`move`** — `move (OpenAI.MoveParam)`

A mouse move action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a move action, this property is always set to `move`. _Default:_ `"move"` _Constant:_ `move` |
| `x` | `OpenAI.integer` | Yes | The x-coordinate to move to. _Format:_ `int64` |
| `y` | `OpenAI.integer` | Yes | The y-coordinate to move to. _Format:_ `int64` |
| `keys` | `string[] \| null` | No |  |

- **`screenshot`** — `screenshot (OpenAI.ScreenshotParam)`

A screenshot action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a screenshot action, this property is always set to `screenshot`. _Default:_ `"screenshot"` _Constant:_ `screenshot` |

- **`scroll`** — `scroll (OpenAI.ScrollParam)`

A scroll action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a scroll action, this property is always set to `scroll`. _Default:_ `"scroll"` _Constant:_ `scroll` |
| `x` | `OpenAI.integer` | Yes | The x-coordinate where the scroll occurred. _Format:_ `int64` |
| `y` | `OpenAI.integer` | Yes | The y-coordinate where the scroll occurred. _Format:_ `int64` |
| `scroll_x` | `OpenAI.integer` | Yes | The horizontal scroll distance. _Format:_ `int64` |
| `scroll_y` | `OpenAI.integer` | Yes | The vertical scroll distance. _Format:_ `int64` |
| `keys` | `string[] \| null` | No |  |

- **`type`** — `type (OpenAI.TypeParam)`

An action to type in text.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a type action, this property is always set to `type`. _Default:_ `"type"` _Constant:_ `type` |
| `text` | `string` | Yes | The text to type. |

- **`wait`** — `wait (OpenAI.WaitParam)`

A wait action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a wait action, this property is always set to `wait`. _Default:_ `"wait"` _Constant:_ `wait` |

###### `actions` — `(OpenAI.ClickParam | OpenAI.DoubleClickAction | OpenAI.DragParam | OpenAI.KeyPressAction | OpenAI.MoveParam | OpenAI.ScreenshotParam | OpenAI.ScrollParam | OpenAI.TypeParam | OpenAI.WaitParam)[]`

Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields.

**One of the following:**

- **`click`** — `click (OpenAI.ClickParam)`

A click action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a click action, this property is always `click`. _Default:_ `"click"` _Constant:_ `click` |
| `button` | `OpenAI.ClickButtonType` | Yes | Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. _Enum:_ `left`, `right`, `wheel`, `back`, `forward` |
| `x` | `OpenAI.integer` | Yes | The x-coordinate where the click occurred. _Format:_ `int64` |
| `y` | `OpenAI.integer` | Yes | The y-coordinate where the click occurred. _Format:_ `int64` |
| `keys` | `string[] \| null` | No |  |

- **`double_click`** — `double_click (OpenAI.DoubleClickAction)`

A double click action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a double click action, this property is always set to `double_click`. _Default:_ `"double_click"` _Constant:_ `double_click` |
| `x` | `OpenAI.integer` | Yes | The x-coordinate where the double click occurred. _Format:_ `int64` |
| `y` | `OpenAI.integer` | Yes | The y-coordinate where the double click occurred. _Format:_ `int64` |
| `keys` | `string[] \| null` | Yes |  |

- **`drag`** — `drag (OpenAI.DragParam)`

A drag action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a drag action, this property is always set to `drag`. _Default:_ `"drag"` _Constant:_ `drag` |
| `path` | `OpenAI.CoordParam[]` | Yes | 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[] \| null` | No |  |

- **`path`** — `OpenAI.CoordParam[]`

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 } ] ```

**Array of** `OpenAI.CoordParam`**:**

An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `x` | `OpenAI.integer` | Yes | The x-coordinate. _Format:_ `int64` |
| `y` | `OpenAI.integer` | Yes | The y-coordinate. _Format:_ `int64` |

- **`keypress`** — `keypress (OpenAI.KeyPressAction)`

A collection of keypresses the model would like to perform.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a keypress action, this property is always set to `keypress`. _Default:_ `"keypress"` _Constant:_ `keypress` |
| `keys` | `string[]` | Yes | The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. |

- **`move`** — `move (OpenAI.MoveParam)`

A mouse move action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a move action, this property is always set to `move`. _Default:_ `"move"` _Constant:_ `move` |
| `x` | `OpenAI.integer` | Yes | The x-coordinate to move to. _Format:_ `int64` |
| `y` | `OpenAI.integer` | Yes | The y-coordinate to move to. _Format:_ `int64` |
| `keys` | `string[] \| null` | No |  |

- **`screenshot`** — `screenshot (OpenAI.ScreenshotParam)`

A screenshot action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a screenshot action, this property is always set to `screenshot`. _Default:_ `"screenshot"` _Constant:_ `screenshot` |

- **`scroll`** — `scroll (OpenAI.ScrollParam)`

A scroll action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a scroll action, this property is always set to `scroll`. _Default:_ `"scroll"` _Constant:_ `scroll` |
| `x` | `OpenAI.integer` | Yes | The x-coordinate where the scroll occurred. _Format:_ `int64` |
| `y` | `OpenAI.integer` | Yes | The y-coordinate where the scroll occurred. _Format:_ `int64` |
| `scroll_x` | `OpenAI.integer` | Yes | The horizontal scroll distance. _Format:_ `int64` |
| `scroll_y` | `OpenAI.integer` | Yes | The vertical scroll distance. _Format:_ `int64` |
| `keys` | `string[] \| null` | No |  |

- **`type`** — `type (OpenAI.TypeParam)`

An action to type in text.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a type action, this property is always set to `type`. _Default:_ `"type"` _Constant:_ `type` |
| `text` | `string` | Yes | The text to type. |

- **`wait`** — `wait (OpenAI.WaitParam)`

A wait action.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a wait action, this property is always set to `wait`. _Default:_ `"wait"` _Constant:_ `wait` |

###### `pending_safety_checks` — `OpenAI.ComputerCallSafetyCheckParam[]`

The pending safety checks for the computer call.

**Array of** `OpenAI.ComputerCallSafetyCheckParam`**:**

A pending safety check for the computer call.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | The ID of the pending safety check. |
| `code` | `string \| null` | No |  |
| `message` | `string \| null` | No |  |

##### `computer_call_output` — `computer_call_output (OpenAI.InputItemComputerCallOutputItemParam)`

The output of a computer tool call.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the computer tool call output. Always `computer_call_output`. _Default:_ `"computer_call_output"` _Constant:_ `computer_call_output` |
| `id` | `string \| null` | No |  |
| `call_id` | `string` | Yes | The ID of the computer tool call that produced the output. |
| `output` | `OpenAI.ComputerScreenshotImage` | Yes | A computer screenshot image used with the computer use tool. |
| `acknowledged_safety_checks` | `OpenAI.ComputerCallSafetyCheckParam[] \| null` | No |  |
| `status` | `enum` | No | _Enum:_ `in_progress`, `completed`, `incomplete` |

###### `output` — `OpenAI.ComputerScreenshotImage`

A computer screenshot image used with the computer use tool.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`. _Default:_ `"computer_screenshot"` _Constant:_ `computer_screenshot` |
| `image_url` | `string` | No | The URL of the screenshot image. _Format:_ `uri` |
| `file_id` | `string` | No | The identifier of an uploaded file that contains the screenshot. |

###### `acknowledged_safety_checks` — `OpenAI.ComputerCallSafetyCheckParam[] | null`

**One of the following:**

- **`OpenAI.ComputerCallSafetyCheckParam[]`** — `OpenAI.ComputerCallSafetyCheckParam[]`

**Array of** `OpenAI.ComputerCallSafetyCheckParam`**:**

A pending safety check for the computer call.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | The ID of the pending safety check. |
| `code` | `string \| null` | No |  |
| `message` | `string \| null` | No |  |

- **`null`** — `null`

| Type | Description |
|------|-------------|
| `null` | — |

##### `web_search_call` — `web_search_call (OpenAI.InputItemWebSearchToolCall)`

The results of a web search tool call. See the [web search guide](/docs/guides/tools-web-search) for more information.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the web search tool call. Always `web_search_call`. _Constant:_ `web_search_call` |
| `id` | `string` | Yes | The unique ID of the web search tool call. |
| `status` | `enum` | Yes | The status of the web search tool call. _Enum:_ `in_progress`, `searching`, `completed`, `failed` |
| `action` | `OpenAI.WebSearchActionSearch \| OpenAI.WebSearchActionOpenPage \| OpenAI.WebSearchActionFind` | Yes | 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). |

###### `action` — `OpenAI.WebSearchActionSearch | OpenAI.WebSearchActionOpenPage | OpenAI.WebSearchActionFind`

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).

**One of the following:**

- **`OpenAI.WebSearchActionSearch`** — `OpenAI.WebSearchActionSearch`

Action type "search" - Performs a web search query.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The action type. _Constant:_ `search` |
| `query` | `string` | Yes | [DEPRECATED] The search query. |
| `queries` | `string[]` | No | The search queries. |
| `sources` | `OpenAI.WebSearchActionSearchSources[]` | No | The sources used in the search. |

- **`sources`** — `OpenAI.WebSearchActionSearchSources[]`

The sources used in the search.

**Array of** `OpenAI.WebSearchActionSearchSources`**:**

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | _Constant:_ `url` |
| `url` | `string` | Yes | _Format:_ `uri` |

- **`OpenAI.WebSearchActionOpenPage`** — `OpenAI.WebSearchActionOpenPage`

Action type "open_page" - Opens a specific URL from search results.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The action type. _Constant:_ `open_page` |
| `url` | `string \| null` | No | The URL opened by the model. |

- **`OpenAI.WebSearchActionFind`** — `OpenAI.WebSearchActionFind`

Action type "find_in_page": Searches for a pattern within a loaded page.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The action type. _Constant:_ `find_in_page` |
| `url` | `string` | Yes | The URL of the page searched for the pattern. _Format:_ `uri` |
| `pattern` | `string` | Yes | The pattern or text to search for within the page. |

##### `function_call` — `function_call (OpenAI.InputItemFunctionToolCall)`

A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the function tool call. Always `function_call`. _Constant:_ `function_call` |
| `id` | `string` | Yes | The unique ID of the function tool call. |
| `call_id` | `string` | Yes | The unique ID of the function tool call generated by the model. |
| `namespace` | `string` | No | The namespace of the function to run. |
| `name` | `string` | Yes | The name of the function to run. |
| `arguments` | `string` | Yes | A JSON string of the arguments to pass to the function. |
| `status` | `enum` | No | The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. _Enum:_ `in_progress`, `completed`, `incomplete` |

##### `function_call_output` — `function_call_output (OpenAI.InputItemFunctionCallOutputItemParam)`

The output of a function tool call.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the function tool call output. Always `function_call_output`. _Default:_ `"function_call_output"` _Constant:_ `function_call_output` |
| `id` | `string \| null` | No |  |
| `call_id` | `string` | Yes | The unique ID of the function tool call generated by the model. |
| `output` | `string \| (OpenAI.InputTextContentParam \| OpenAI.InputImageContentParamAutoParam \| OpenAI.InputFileContentParam)[]` | Yes | Text, image, or file output of the function tool call. |
| `status` | `enum` | No | _Enum:_ `in_progress`, `completed`, `incomplete` |

###### `output` — `string | (OpenAI.InputTextContentParam | OpenAI.InputImageContentParamAutoParam | OpenAI.InputFileContentParam)[]`

Text, image, or file output of the function tool call.

**One of the following:**

- **`string`** — `string`

| Type | Description |
|------|-------------|
| `string` | — |

- **`(OpenAI.InputTextContentParam | OpenAI.InputImageContentParamAutoParam | OpenAI.InputFileContentParam)[]`** — `(OpenAI.InputTextContentParam | OpenAI.InputImageContentParamAutoParam | OpenAI.InputFileContentParam)[]`

**One of the following:**

- **`OpenAI.InputTextContentParam`** — `OpenAI.InputTextContentParam`

A text input to the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the input item. Always `input_text`. _Default:_ `"input_text"` _Constant:_ `input_text` |
| `text` | `string` | Yes | The text input to the model. |

- **`OpenAI.InputImageContentParamAutoParam`** — `OpenAI.InputImageContentParamAutoParam`

An image input to the model. Learn about [image inputs](/docs/guides/vision)

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the input item. Always `input_image`. _Default:_ `"input_image"` _Constant:_ `input_image` |
| `image_url` | `string \| null` | No |  |
| `file_id` | `string \| null` | No |  |
| `detail` | `enum` | No | _Enum:_ `low`, `high`, `auto`, `original` |

- **`OpenAI.InputFileContentParam`** — `OpenAI.InputFileContentParam`

A file input to the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the input item. Always `input_file`. _Default:_ `"input_file"` _Constant:_ `input_file` |
| `file_id` | `string \| null` | No |  |
| `filename` | `string \| null` | No |  |
| `file_data` | `string \| null` | No |  |
| `file_url` | `string \| null` | No |  |
| `detail` | `OpenAI.FileInputDetail` | No | The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. _Enum:_ `low`, `high` |

##### `tool_search_call` — `tool_search_call (OpenAI.InputItemToolSearchCallItemParam)`

An item representing part of the context for the response to be generated by the model. Can contain text, images, and audio inputs, as well as previous assistant responses and tool call outputs.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The item type. Always `tool_search_call`. _Default:_ `"tool_search_call"` _Constant:_ `tool_search_call` |
| `id` | `string \| null` | No |  |
| `call_id` | `string \| null` | No |  |
| `execution` | `OpenAI.ToolSearchExecutionType` | No | Whether tool search was executed by the server or by the client. _Enum:_ `server`, `client` |
| `arguments` | `OpenAI.EmptyModelParam` | Yes | The arguments supplied to the tool search call. |
| `status` | `enum` | No | _Enum:_ `in_progress`, `completed`, `incomplete` |

##### `tool_search_output` — `tool_search_output (OpenAI.InputItemToolSearchOutputItemParam)`

An item representing part of the context for the response to be generated by the model. Can contain text, images, and audio inputs, as well as previous assistant responses and tool call outputs.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The item type. Always `tool_search_output`. _Default:_ `"tool_search_output"` _Constant:_ `tool_search_output` |
| `id` | `string \| null` | No |  |
| `call_id` | `string \| null` | No |  |
| `execution` | `OpenAI.ToolSearchExecutionType` | No | Whether tool search was executed by the server or by the client. _Enum:_ `server`, `client` |
| `tools` | `(BingGroundingTool \| MicrosoftFabricPreviewTool \| SharepointPreviewTool \| AzureAISearchTool \| OpenApiTool \| BingCustomSearchPreviewTool \| BrowserAutomationPreviewTool \| AzureFunctionTool \| CaptureStructuredOutputsTool \| A2APreviewTool \| WorkIQPreviewTool \| FabricIQPreviewTool \| MemorySearchPreviewTool \| ToolboxSearchPreviewTool \| OpenAI.CodeInterpreterTool \| OpenAI.FunctionTool \| OpenAI.FileSearchTool \| OpenAI.ComputerUsePreviewTool \| OpenAI.WebSearchTool \| OpenAI.MCPTool \| OpenAI.ImageGenTool \| OpenAI.LocalShellToolParam \| OpenAI.FunctionShellToolParam \| OpenAI.CustomToolParam \| OpenAI.WebSearchPreviewTool \| OpenAI.ApplyPatchToolParam \| OpenAI.ComputerTool \| OpenAI.NamespaceToolParam \| OpenAI.ToolSearchToolParam)[]` | Yes | The loaded tool definitions returned by the tool search output. |
| `status` | `enum` | No | _Enum:_ `in_progress`, `completed`, `incomplete` |

###### `tools` — `(BingGroundingTool | MicrosoftFabricPreviewTool | SharepointPreviewTool | AzureAISearchTool | OpenApiTool | BingCustomSearchPreviewTool | BrowserAutomationPreviewTool | AzureFunctionTool | CaptureStructuredOutputsTool | A2APreviewTool | WorkIQPreviewTool | FabricIQPreviewTool | MemorySearchPreviewTool | ToolboxSearchPreviewTool | OpenAI.CodeInterpreterTool | OpenAI.FunctionTool | OpenAI.FileSearchTool | OpenAI.ComputerUsePreviewTool | OpenAI.WebSearchTool | OpenAI.MCPTool | OpenAI.ImageGenTool | OpenAI.LocalShellToolParam | OpenAI.FunctionShellToolParam | OpenAI.CustomToolParam | OpenAI.WebSearchPreviewTool | OpenAI.ApplyPatchToolParam | OpenAI.ComputerTool | OpenAI.NamespaceToolParam | OpenAI.ToolSearchToolParam)[]`

The loaded tool definitions returned by the tool search output.

**One of the following:**

- **`bing_grounding`** — `bing_grounding (BingGroundingTool)`

The input definition information for a bing grounding search tool as used to configure an agent.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The object type, which is always 'bing_grounding'. _Constant:_ `bing_grounding` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |
| `bing_grounding` | `BingGroundingSearchToolParameters` | Yes | The bing grounding search tool parameters. |

- **`bing_grounding`** — `BingGroundingSearchToolParameters`

The bing grounding search tool parameters.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `search_configurations` | `BingGroundingSearchConfiguration[]` | Yes | The search configurations attached to this tool. There can be a maximum of 1 search configuration resource attached to the tool. |

- **`search_configurations`** — `BingGroundingSearchConfiguration[]`

The search configurations attached to this tool. There can be a maximum of 1 search configuration resource attached to the tool.

**Array of** `BingGroundingSearchConfiguration`**:**

Search configuration for Bing Grounding

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `project_connection_id` | `string` | Yes | Project connection id for grounding with bing search |
| `market` | `string` | No | The market where the results come from. |
| `set_lang` | `string` | No | The language to use for user interface strings when calling Bing API. |
| `count` | `integer` | No | The number of search results to return in the bing api response _Format:_ `int64` |
| `freshness` | `string` | No | Filter search results by a specific time range. See [accepted values here](https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters). |

- **`fabric_dataagent_preview`** — `fabric_dataagent_preview (MicrosoftFabricPreviewTool)`

The input definition information for a Microsoft Fabric tool as used to configure an agent.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The object type, which is always 'fabric_dataagent_preview'. _Constant:_ `fabric_dataagent_preview` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |
| `fabric_dataagent_preview` | `FabricDataAgentToolParameters` | Yes | The fabric data agent tool parameters. |

- **`fabric_dataagent_preview`** — `FabricDataAgentToolParameters`

The fabric data agent tool parameters.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `project_connections` | `ToolProjectConnection[]` | No | The project connections attached to this tool. There can be a maximum of 1 connection resource attached to the tool. |

- **`project_connections`** — `ToolProjectConnection[]`

The project connections attached to this tool. There can be a maximum of 1 connection resource attached to the tool.

**Array of** `ToolProjectConnection`**:**

A project connection resource.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `project_connection_id` | `string` | Yes | A project connection in a ToolProjectConnectionList attached to this tool. |

- **`sharepoint_grounding_preview`** — `sharepoint_grounding_preview (SharepointPreviewTool)`

The input definition information for a sharepoint tool as used to configure an agent.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The object type, which is always 'sharepoint_grounding_preview'. _Constant:_ `sharepoint_grounding_preview` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |
| `sharepoint_grounding_preview` | `SharepointGroundingToolParameters` | Yes | The sharepoint grounding tool parameters. |

- **`sharepoint_grounding_preview`** — `SharepointGroundingToolParameters`

The sharepoint grounding tool parameters.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `project_connections` | `ToolProjectConnection[]` | No | The project connections attached to this tool. There can be a maximum of 1 connection resource attached to the tool. |

- **`project_connections`** — `ToolProjectConnection[]`

The project connections attached to this tool. There can be a maximum of 1 connection resource attached to the tool.

**Array of** `ToolProjectConnection`**:**

A project connection resource.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `project_connection_id` | `string` | Yes | A project connection in a ToolProjectConnectionList attached to this tool. |

- **`azure_ai_search`** — `azure_ai_search (AzureAISearchTool)`

The input definition information for an Azure AI search tool as used to configure an agent.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The object type, which is always 'azure_ai_search'. _Constant:_ `azure_ai_search` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |
| `azure_ai_search` | `AzureAISearchToolResource` | Yes | The azure ai search index resource. |

- **`azure_ai_search`** — `AzureAISearchToolResource`

The azure ai search index resource.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `indexes` | `AISearchIndexResource[]` | Yes | The indices attached to this agent. There can be a maximum of 1 index resource attached to the agent. |

- **`indexes`** — `AISearchIndexResource[]`

The indices attached to this agent. There can be a maximum of 1 index resource attached to the agent.

**Array of** `AISearchIndexResource`**:**

A AI Search Index resource.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `project_connection_id` | `string` | No | An index connection ID in an IndexResource attached to this agent. |
| `index_name` | `string` | No | The name of an index in an IndexResource attached to this agent. |
| `query_type` | `enum` | No | Type of query in an AIIndexResource attached to this agent. _Enum:_ `simple`, `semantic`, `vector`, `vector_simple_hybrid`, `vector_semantic_hybrid` |
| `top_k` | `integer` | No | Number of documents to retrieve from search and present to the model. _Format:_ `int32` |
| `filter` | `string` | No | filter string for search resource. [Learn more here](https://learn.microsoft.com/azure/search/search-filters). |
| `index_asset_id` | `string` | No | Index asset id for search resource. |

- **`openapi`** — `openapi (OpenApiTool)`

The input definition information for an OpenAPI tool as used to configure an agent.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The object type, which is always 'openapi'. _Constant:_ `openapi` |
| `openapi` | `OpenApiFunctionDefinition` | Yes | The openapi function definition. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |

- **`openapi`** — `OpenApiFunctionDefinition`

The openapi function definition.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | The name of the function to be called. |
| `description` | `string` | No | A description of what the function does, used by the model to choose when and how to call the function. |
| `spec` | `object` | Yes | The openapi function shape, described as a JSON Schema object. |
| `auth` | `OpenApiAnonymousAuthDetails \| OpenApiProjectConnectionAuthDetails \| OpenApiManagedAuthDetails` | Yes | Open API authentication details |
| `default_params` | `string[]` | No | List of OpenAPI spec parameters that will use user-provided defaults |
| `functions` | `object[]` | No | List of function definitions used by OpenApi tool |

- **`auth`** — `OpenApiAnonymousAuthDetails | OpenApiProjectConnectionAuthDetails | OpenApiManagedAuthDetails`

Open API authentication details

**One of the following:**

- **`anonymous`** — `anonymous (OpenApiAnonymousAuthDetails)`

Security details for OpenApi anonymous authentication

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The object type, which is always 'anonymous'. _Constant:_ `anonymous` |

- **`project_connection`** — `project_connection (OpenApiProjectConnectionAuthDetails)`

Security details for OpenApi project connection authentication

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The object type, which is always 'project_connection'. _Constant:_ `project_connection` |
| `security_scheme` | `OpenApiProjectConnectionSecurityScheme` | Yes | Project connection auth security details |

- **`security_scheme`** — `OpenApiProjectConnectionSecurityScheme`

Project connection auth security details

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `project_connection_id` | `string` | Yes | Project connection id for Project Connection auth type |

- **`managed_identity`** — `managed_identity (OpenApiManagedAuthDetails)`

Security details for OpenApi managed_identity authentication

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The object type, which is always 'managed_identity'. _Constant:_ `managed_identity` |
| `security_scheme` | `OpenApiManagedSecurityScheme` | Yes | Connection auth security details |

- **`security_scheme`** — `OpenApiManagedSecurityScheme`

Connection auth security details

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `audience` | `string` | Yes | Authentication scope for managed_identity auth type |

- **`functions`** — `object[]`

List of function definitions used by OpenApi tool

**Array of** `object`**:**

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | The name of the function to be called. |
| `description` | `string` | No | A description of what the function does, used by the model to choose when and how to call the function. |
| `parameters` | `object` | Yes | The parameters the functions accepts, described as a JSON Schema object. |

- **`bing_custom_search_preview`** — `bing_custom_search_preview (BingCustomSearchPreviewTool)`

The input definition information for a Bing custom search tool as used to configure an agent.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The object type, which is always 'bing_custom_search_preview'. _Constant:_ `bing_custom_search_preview` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |
| `bing_custom_search_preview` | `BingCustomSearchToolParameters` | Yes | The bing custom search tool parameters. |

- **`bing_custom_search_preview`** — `BingCustomSearchToolParameters`

The bing custom search tool parameters.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `search_configurations` | `BingCustomSearchConfiguration[]` | Yes | The project connections attached to this tool. There can be a maximum of 1 connection resource attached to the tool. |

- **`search_configurations`** — `BingCustomSearchConfiguration[]`

The project connections attached to this tool. There can be a maximum of 1 connection resource attached to the tool.

**Array of** `BingCustomSearchConfiguration`**:**

A bing custom search configuration.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `project_connection_id` | `string` | Yes | Project connection id for grounding with bing search |
| `instance_name` | `string` | Yes | Name of the custom configuration instance given to config. |
| `market` | `string` | No | The market where the results come from. |
| `set_lang` | `string` | No | The language to use for user interface strings when calling Bing API. |
| `count` | `integer` | No | The number of search results to return in the bing api response _Format:_ `int64` |
| `freshness` | `string` | No | Filter search results by a specific time range. See [accepted values here](https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters). |

- **`browser_automation_preview`** — `browser_automation_preview (BrowserAutomationPreviewTool)`

The input definition information for a Browser Automation Tool, as used to configure an Agent.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The object type, which is always 'browser_automation_preview'. _Constant:_ `browser_automation_preview` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |
| `browser_automation_preview` | `BrowserAutomationToolParameters` | Yes | The Browser Automation Tool parameters. |

- **`browser_automation_preview`** — `BrowserAutomationToolParameters`

The Browser Automation Tool parameters.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `connection` | `BrowserAutomationToolConnectionParameters` | Yes | The project connection parameters associated with the Browser Automation Tool. |

- **`connection`** — `BrowserAutomationToolConnectionParameters`

The project connection parameters associated with the Browser Automation Tool.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `project_connection_id` | `string` | Yes | The ID of the project connection to your Azure Playwright resource. |

- **`azure_function`** — `azure_function (AzureFunctionTool)`

The input definition information for an Azure Function Tool, as used to configure an Agent.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The object type, which is always 'browser_automation'. _Constant:_ `azure_function` |
| `azure_function` | `AzureFunctionDefinition` | Yes | The Azure Function Tool definition. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |

- **`azure_function`** — `AzureFunctionDefinition`

The Azure Function Tool definition.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `function` | `object` | Yes | The definition of azure function and its parameters. |
| `input_binding` | `AzureFunctionBinding` | Yes | Input storage queue. The queue storage trigger runs a function as messages are added to it. |
| `output_binding` | `AzureFunctionBinding` | Yes | Output storage queue. The function writes output to this queue when the input items are processed. |

- **`function`** — `object`

The definition of azure function and its parameters.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | The name of the function to be called. |
| `description` | `string` | No | A description of what the function does, used by the model to choose when and how to call the function. |
| `parameters` | `object` | Yes | The parameters the functions accepts, described as a JSON Schema object. |

- **`input_binding`** — `AzureFunctionBinding`

Input storage queue. The queue storage trigger runs a function as messages are added to it.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of binding, which is always 'storage_queue'. _Constant:_ `storage_queue` |
| `storage_queue` | `AzureFunctionStorageQueue` | Yes | Storage queue. |

- **`storage_queue`** — `AzureFunctionStorageQueue`

Storage queue.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `queue_service_endpoint` | `string` | Yes | URI to the Azure Storage Queue service allowing you to manipulate a queue. |
| `queue_name` | `string` | Yes | The name of an Azure function storage queue. |

- **`output_binding`** — `AzureFunctionBinding`

Output storage queue. The function writes output to this queue when the input items are processed.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of binding, which is always 'storage_queue'. _Constant:_ `storage_queue` |
| `storage_queue` | `AzureFunctionStorageQueue` | Yes | Storage queue. |

- **`storage_queue`** — `AzureFunctionStorageQueue`

Storage queue.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `queue_service_endpoint` | `string` | Yes | URI to the Azure Storage Queue service allowing you to manipulate a queue. |
| `queue_name` | `string` | Yes | The name of an Azure function storage queue. |

- **`capture_structured_outputs`** — `capture_structured_outputs (CaptureStructuredOutputsTool)`

A tool for capturing structured outputs

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the tool. Always `capture_structured_outputs`. _Constant:_ `capture_structured_outputs` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |
| `outputs` | `StructuredOutputDefinition` | Yes | The structured outputs to capture from the model. |

- **`outputs`** — `StructuredOutputDefinition`

The structured outputs to capture from the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | The name of the structured output. |
| `description` | `string` | Yes | A description of the output to emit. Used by the model to determine when to emit the output. |
| `schema` | `object` | Yes | The JSON schema for the structured output. |
| `strict` | `boolean \| null` | Yes | Whether to enforce strict validation. Default `true`. |

- **`a2a_preview`** — `a2a_preview (A2APreviewTool)`

An agent implementing the A2A protocol.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the tool. Always `"a2a_preview`. _Constant:_ `a2a_preview` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |
| `base_url` | `string` | No | Base URL of the agent. _Format:_ `uri` |
| `agent_card_path` | `string` | No | The path to the agent card relative to the `base_url`. If not provided, defaults to `/.well-known/agent-card.json` |
| `project_connection_id` | `string` | No | The connection ID in the project for the A2A server. The connection stores authentication and other connection details needed to connect to the A2A server. |

- **`work_iq_preview`** — `work_iq_preview (WorkIQPreviewTool)`

A WorkIQ server-side tool.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The object type, which is always 'work_iq_preview'. _Constant:_ `work_iq_preview` |
| `project_connection_id` | `string` | Yes | The ID of the WorkIQ project connection. |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |

- **`fabric_iq_preview`** — `fabric_iq_preview (FabricIQPreviewTool)`

A FabricIQ server-side tool.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The object type, which is always 'fabric_iq_preview'. _Constant:_ `fabric_iq_preview` |
| `project_connection_id` | `string` | Yes | The ID of the FabricIQ project connection. |
| `server_label` | `string` | No | (Optional) The label of the FabricIQ MCP server to connect to. |
| `server_url` | `string` | No | (Optional) The URL of the FabricIQ MCP server. If not provided, the URL from the project connection will be used. _Format:_ `uri` |
| `require_approval` | `OpenAI.MCPToolRequireApproval \| string \| null` | No | (Optional) Whether the agent requires approval before executing actions. Default is always. _Default:_ `"always"` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |

- **`require_approval`** — `OpenAI.MCPToolRequireApproval | string | null`

(Optional) Whether the agent requires approval before executing actions. Default is always.

**One of the following:**

- **`OpenAI.MCPToolRequireApproval`** — `OpenAI.MCPToolRequireApproval`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `always` | `OpenAI.MCPToolFilter` | No | A filter object to specify which tools are allowed. |
| `never` | `OpenAI.MCPToolFilter` | No | A filter object to specify which tools are allowed. |

- **`always`** — `OpenAI.MCPToolFilter`

A filter object to specify which tools are allowed.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tool_names` | `string[]` | No | List of allowed tool names. |
| `read_only` | `boolean` | No | Indicates whether or not a tool modifies data or is read-only. If an MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), it will match this filter. |

- **`never`** — `OpenAI.MCPToolFilter`

A filter object to specify which tools are allowed.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tool_names` | `string[]` | No | List of allowed tool names. |
| `read_only` | `boolean` | No | Indicates whether or not a tool modifies data or is read-only. If an MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), it will match this filter. |

- **`string`** — `string`

| Type | Description |
|------|-------------|
| `string` | — |

- **`null`** — `null`

| Type | Description |
|------|-------------|
| `null` | — |

- **`memory_search_preview`** — `memory_search_preview (MemorySearchPreviewTool)`

A tool for integrating memories into the agent.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the tool. Always `memory_search_preview`. _Constant:_ `memory_search_preview` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |
| `memory_store_name` | `string` | Yes | The name of the memory store to use. |
| `scope` | `string` | Yes | The namespace used to group and isolate memories, such as a user ID. Limits which memories can be retrieved or updated. Use special variable `{{$userId}}` to scope memories to the current signed-in user. |
| `search_options` | `MemorySearchOptions` | No | Options for searching the memory store. |
| `update_delay` | `integer` | No | Time to wait before updating memories after inactivity (seconds). Default 300. _Default:_ `300` _Format:_ `int32` |

- **`search_options`** — `MemorySearchOptions`

Options for searching the memory store.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `max_memories` | `integer` | No | Maximum number of memory items to return. _Format:_ `int32` |

- **`toolbox_search_preview`** — `toolbox_search_preview (ToolboxSearchPreviewTool)`

A tool for searching over the agent's toolbox. When present, deferred tools are hidden from `tools/list` and only discoverable via `search_tools` queries at runtime.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the tool. Always `toolbox_search_preview`. _Constant:_ `toolbox_search_preview` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |

- **`code_interpreter`** — `code_interpreter (OpenAI.CodeInterpreterTool)`

A tool that runs Python code to help generate a response to a prompt.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the code interpreter tool. Always `code_interpreter`. _Constant:_ `code_interpreter` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |
| `container` | `string \| OpenAI.AutoCodeInterpreterToolParam` | No | 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. If not provided, the service assumes auto. |

- **`container`** — `string | OpenAI.AutoCodeInterpreterToolParam`

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. If not provided, the service assumes auto.

**One of the following:**

- **`string`** — `string`

| Type | Description |
|------|-------------|
| `string` | — |

- **`OpenAI.AutoCodeInterpreterToolParam`** — `OpenAI.AutoCodeInterpreterToolParam`

Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Always `auto`. _Default:_ `"auto"` _Constant:_ `auto` |
| `file_ids` | `string[]` | No | An optional list of uploaded files to make available to your code. |
| `memory_limit` | `enum` | No | _Enum:_ `1g`, `4g`, `16g`, `64g` |
| `network_policy` | `OpenAI.ContainerNetworkPolicyDisabledParam \| OpenAI.ContainerNetworkPolicyAllowlistParam` | No | Network access policy for the container. |

- **`network_policy`** — `OpenAI.ContainerNetworkPolicyDisabledParam | OpenAI.ContainerNetworkPolicyAllowlistParam`

Network access policy for the container.

**One of the following:**

- **`disabled`** — `disabled (OpenAI.ContainerNetworkPolicyDisabledParam)`

Network access policy for the container.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Disable outbound network access. Always `disabled`. _Default:_ `"disabled"` _Constant:_ `disabled` |

- **`allowlist`** — `allowlist (OpenAI.ContainerNetworkPolicyAllowlistParam)`

Network access policy for the container.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Allow outbound network access only to specified domains. Always `allowlist`. _Default:_ `"allowlist"` _Constant:_ `allowlist` |
| `allowed_domains` | `string[]` | Yes | A list of allowed domains when type is `allowlist`. |

- **`function`** — `function (OpenAI.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).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the function tool. Always `function`. _Default:_ `"function"` _Constant:_ `function` |
| `name` | `string` | Yes | The name of the function to call. |
| `description` | `string \| null` | No |  |
| `parameters` | `object \| null` | Yes |  |
| `strict` | `boolean \| null` | Yes |  |
| `defer_loading` | `boolean` | No | Whether this function is deferred and loaded via tool search. |

- **`file_search`** — `file_search (OpenAI.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).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the file search tool. Always `file_search`. _Default:_ `"file_search"` _Constant:_ `file_search` |
| `vector_store_ids` | `string[]` | Yes | The IDs of the vector stores to search. |
| `max_num_results` | `OpenAI.integer` | No | The maximum number of results to return. This number should be between 1 and 50 inclusive. _Format:_ `int64` |
| `ranking_options` | `OpenAI.RankingOptions` | No | Ranking options for search. |
| `filters` | `OpenAI.ComparisonFilter \| OpenAI.CompoundFilter \| null` | No |  |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |

- **`ranking_options`** — `OpenAI.RankingOptions`

Ranking options for search.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `ranker` | `OpenAI.RankerVersionType` | No | The ranker to use for the file search. _Enum:_ `auto`, `default-2024-11-15` |
| `score_threshold` | `OpenAI.numeric` | No | 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. _Format:_ `double` |
| `hybrid_search` | `OpenAI.HybridSearchOptions` | No | Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. |

- **`hybrid_search`** — `OpenAI.HybridSearchOptions`

Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `embedding_weight` | `OpenAI.numeric` | Yes | The weight of the embedding in the reciprocal ranking fusion. _Format:_ `double` |
| `text_weight` | `OpenAI.numeric` | Yes | The weight of the text in the reciprocal ranking fusion. _Format:_ `double` |

- **`filters`** — `OpenAI.ComparisonFilter | OpenAI.CompoundFilter | null`

**One of the following:**

- **`OpenAI.Filters`** — `OpenAI.ComparisonFilter | OpenAI.CompoundFilter`

**One of the following:**

- **`OpenAI.ComparisonFilter`** — `OpenAI.ComparisonFilter`

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - `eq`: equals - `ne`: not equal - `gt`: greater than - `gte`: greater than or equal - `lt`: less than - `lte`: less than or equal - `in`: in - `nin`: not in _Default:_ `"eq"` _Enum:_ `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin` |
| `key` | `string` | Yes | The key to compare against the value. |
| `value` | `string \| OpenAI.numeric \| boolean \| (string \| OpenAI.numeric)[]` | Yes | The value to compare against the attribute key; supports string, number, or boolean types. |

- **`value`** — `string | OpenAI.numeric | boolean | (string | OpenAI.numeric)[]`

The value to compare against the attribute key; supports string, number, or boolean types.

**One of the following:**

- **`string`** — `string`

| Type | Description |
|------|-------------|
| `string` | — |

- **`OpenAI.numeric`** — `OpenAI.numeric`

| Type | Description |
|------|-------------|
| `OpenAI.numeric` | _Format:_ `double` |

- **`boolean`** — `boolean`

| Type | Description |
|------|-------------|
| `boolean` | — |

- **`(string | OpenAI.numeric)[]`** — `(string | OpenAI.numeric)[]`

Type: `(string | OpenAI.numeric)[]`

- **`OpenAI.CompoundFilter`** — `OpenAI.CompoundFilter`

Combine multiple filters using `and` or `or`.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Type of operation: `and` or `or`. _Enum:_ `and`, `or` |
| `filters` | `(OpenAI.ComparisonFilter \| any)[]` | Yes | Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. |

- **`filters`** — `(OpenAI.ComparisonFilter | any)[]`

Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

**One of the following:**

- **`OpenAI.ComparisonFilter`** — `OpenAI.ComparisonFilter`

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - `eq`: equals - `ne`: not equal - `gt`: greater than - `gte`: greater than or equal - `lt`: less than - `lte`: less than or equal - `in`: in - `nin`: not in _Default:_ `"eq"` _Enum:_ `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin` |
| `key` | `string` | Yes | The key to compare against the value. |
| `value` | `string \| OpenAI.numeric \| boolean \| (string \| OpenAI.numeric)[]` | Yes | The value to compare against the attribute key; supports string, number, or boolean types. |

- **`value`** — `string | OpenAI.numeric | boolean | (string | OpenAI.numeric)[]`

The value to compare against the attribute key; supports string, number, or boolean types.

**One of the following:**

- **`string`** — `string`

| Type | Description |
|------|-------------|
| `string` | — |

- **`OpenAI.numeric`** — `OpenAI.numeric`

| Type | Description |
|------|-------------|
| `OpenAI.numeric` | _Format:_ `double` |

- **`boolean`** — `boolean`

| Type | Description |
|------|-------------|
| `boolean` | — |

- **`(string | OpenAI.numeric)[]`** — `(string | OpenAI.numeric)[]`

Type: `(string | OpenAI.numeric)[]`

- **`any`** — `any`

| Type | Description |
|------|-------------|
| `any` | — |

- **`null`** — `null`

| Type | Description |
|------|-------------|
| `null` | — |

- **`computer_use_preview`** — `computer_use_preview (OpenAI.ComputerUsePreviewTool)`

A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the computer use tool. Always `computer_use_preview`. _Default:_ `"computer_use_preview"` _Constant:_ `computer_use_preview` |
| `environment` | `OpenAI.ComputerEnvironment` | Yes | The type of computer environment to control. _Enum:_ `windows`, `mac`, `linux`, `ubuntu`, `browser` |
| `display_width` | `OpenAI.integer` | Yes | The width of the computer display. _Format:_ `int64` |
| `display_height` | `OpenAI.integer` | Yes | The height of the computer display. _Format:_ `int64` |

- **`web_search`** — `web_search (OpenAI.WebSearchTool)`

Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. _Default:_ `"web_search"` _Constant:_ `web_search` |
| `filters` | `OpenAI.WebSearchToolFilters \| null` | No |  |
| `user_location` | `OpenAI.WebSearchApproximateLocation \| null` | No |  |
| `search_context_size` | `enum` | No | 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. _Default:_ `"medium"` _Enum:_ `low`, `medium`, `high` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |
| `custom_search_configuration` | `WebSearchConfiguration` | No | The project connections attached to this tool. There can be a maximum of 1 connection resource attached to the tool. |

- **`filters`** — `OpenAI.WebSearchToolFilters | null`

**One of the following:**

- **`OpenAI.WebSearchToolFilters`** — `OpenAI.WebSearchToolFilters`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `allowed_domains` | `string[] \| null` | No |  |

- **`null`** — `null`

| Type | Description |
|------|-------------|
| `null` | — |

- **`user_location`** — `OpenAI.WebSearchApproximateLocation | null`

**One of the following:**

- **`OpenAI.WebSearchApproximateLocation`** — `OpenAI.WebSearchApproximateLocation`

The approximate location of the user.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of location approximation. Always `approximate`. _Default:_ `"approximate"` _Constant:_ `approximate` |
| `country` | `string \| null` | No |  |
| `region` | `string \| null` | No |  |
| `city` | `string \| null` | No |  |
| `timezone` | `string \| null` | No |  |

- **`null`** — `null`

| Type | Description |
|------|-------------|
| `null` | — |

- **`custom_search_configuration`** — `WebSearchConfiguration`

The project connections attached to this tool. There can be a maximum of 1 connection resource attached to the tool.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `project_connection_id` | `string` | Yes | Project connection id for grounding with bing custom search |
| `instance_name` | `string` | Yes | Name of the custom configuration instance given to config. |

- **`mcp`** — `mcp (OpenAI.MCPTool)`

Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the MCP tool. Always `mcp`. _Constant:_ `mcp` |
| `server_label` | `string` | Yes | A label for this MCP server, used to identify it in tool calls. |
| `server_url` | `string` | No | The URL for the MCP server. One of `server_url` or `connector_id` must be provided. _Format:_ `uri` |
| `connector_id` | `enum` | No | Identifier for service connectors, like those available in ChatGPT. One of `server_url` or `connector_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` _Enum:_ `connector_dropbox`, `connector_gmail`, `connector_googlecalendar`, `connector_googledrive`, `connector_microsoftteams`, `connector_outlookcalendar`, `connector_outlookemail`, `connector_sharepoint` |
| `authorization` | `string` | No | 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` | No | Optional description of the MCP server, used to provide more context. |
| `headers` | `object \| null` | No |  |
| `allowed_tools` | `string[] \| OpenAI.MCPToolFilter \| null` | No |  |
| `require_approval` | `OpenAI.MCPToolRequireApproval \| enum \| null` | No | _Default:_ `"always"` _Enum:_ `always`, `never` |
| `defer_loading` | `boolean` | No | Whether this MCP tool is deferred and discovered via tool search. |
| `project_connection_id` | `string` | No | The connection ID in the project for the MCP server. The connection stores authentication and other connection details needed to connect to the MCP server. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |

- **`allowed_tools`** — `string[] | OpenAI.MCPToolFilter | null`

**One of the following:**

- **`string[]`** — `string[]`

Type: `string[]`

- **`OpenAI.MCPToolFilter`** — `OpenAI.MCPToolFilter`

A filter object to specify which tools are allowed.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tool_names` | `string[]` | No | List of allowed tool names. |
| `read_only` | `boolean` | No | Indicates whether or not a tool modifies data or is read-only. If an MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), it will match this filter. |

- **`null`** — `null`

| Type | Description |
|------|-------------|
| `null` | — |

- **`require_approval`** — `OpenAI.MCPToolRequireApproval | enum | null`

**One of the following:**

- **`OpenAI.MCPToolRequireApproval`** — `OpenAI.MCPToolRequireApproval`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `always` | `OpenAI.MCPToolFilter` | No | A filter object to specify which tools are allowed. |
| `never` | `OpenAI.MCPToolFilter` | No | A filter object to specify which tools are allowed. |

- **`always`** — `OpenAI.MCPToolFilter`

A filter object to specify which tools are allowed.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tool_names` | `string[]` | No | List of allowed tool names. |
| `read_only` | `boolean` | No | Indicates whether or not a tool modifies data or is read-only. If an MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), it will match this filter. |

- **`never`** — `OpenAI.MCPToolFilter`

A filter object to specify which tools are allowed.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tool_names` | `string[]` | No | List of allowed tool names. |
| `read_only` | `boolean` | No | Indicates whether or not a tool modifies data or is read-only. If an MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), it will match this filter. |

- **`enum`** — `enum`

| Type | Description |
|------|-------------|
| `enum` | _Enum:_ `always`, `never` |

- **`null`** — `null`

| Type | Description |
|------|-------------|
| `null` | — |

- **`image_generation`** — `image_generation (OpenAI.ImageGenTool)`

A tool that generates images using the GPT image models.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the image generation tool. Always `image_generation`. _Default:_ `"image_generation"` _Constant:_ `image_generation` |
| `model` | `enum` | No | _Default:_ `"gpt-image-1"` _Enum:_ `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5` |
| `quality` | `enum` | No | The quality of the generated image. One of `low`, `medium`, `high`, or `auto`. Default: `auto`. _Default:_ `"auto"` _Enum:_ `low`, `medium`, `high`, `auto` |
| `size` | `enum` | No | 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`. _Default:_ `"auto"` _Enum:_ `1024x1024`, `1024x1536`, `1536x1024`, `auto` |
| `output_format` | `enum` | No | The output format of the generated image. One of `png`, `webp`, or `jpeg`. Default: `png`. _Default:_ `"png"` _Enum:_ `png`, `webp`, `jpeg` |
| `output_compression` | `OpenAI.integer` | No | Compression level for the output image. Default: 100. _Default:_ `100` _Format:_ `int64` |
| `moderation` | `enum` | No | Moderation level for the generated image. Default: `auto`. _Default:_ `"auto"` _Enum:_ `auto`, `low` |
| `background` | `enum` | No | Background type for the generated image. One of `transparent`, `opaque`, or `auto`. Default: `auto`. _Default:_ `"auto"` _Enum:_ `transparent`, `opaque`, `auto` |
| `input_fidelity` | `enum` | No | _Enum:_ `high`, `low` |
| `input_image_mask` | `OpenAI.ImageGenToolInputImageMask` | No | Optional mask for inpainting. Contains `image_url` (string, optional) and `file_id` (string, optional). |
| `partial_images` | `OpenAI.integer` | No | Number of partial images to generate in streaming mode, from 0 (default value) to 3. _Format:_ `int64` |
| `action` | `OpenAI.ImageGenActionEnum` | No | Whether to generate a new image or edit an existing image. Default: `auto`. _Enum:_ `generate`, `edit`, `auto` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |

- **`input_image_mask`** — `OpenAI.ImageGenToolInputImageMask`

Optional mask for inpainting. Contains `image_url` (string, optional) and `file_id` (string, optional).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `image_url` | `string` | No | _Format:_ `uri` |
| `file_id` | `string` | No |  |

- **`local_shell`** — `local_shell (OpenAI.LocalShellToolParam)`

A tool that allows the model to execute shell commands in a local environment.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the local shell tool. Always `local_shell`. _Default:_ `"local_shell"` _Constant:_ `local_shell` |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |

- **`shell`** — `shell (OpenAI.FunctionShellToolParam)`

A tool that allows the model to execute shell commands.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the shell tool. Always `shell`. _Default:_ `"shell"` _Constant:_ `shell` |
| `environment` | `OpenAI.FunctionShellToolParamEnvironment \| null` | No |  |
| `name` | `string` | No | Optional user-defined name for this tool or configuration. |
| `description` | `string` | No | Optional user-defined description for this tool or configuration. |
| `tool_configs` | `object` | No | Per-tool configuration map. Keys are tool names or `*` (catch-all default). Resolution order: exact tool name match takes priority over `*`. Unknown tool names are silently ignored at runtime. |

- **`environment`** — `OpenAI.FunctionShellToolParamEnvironment | null`

**One of the following:**

- **`OpenAI.FunctionShellToolParamEnvironment`** — `OpenAI.FunctionShellToolParamEnvironment`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | _Enum:_ `container_auto`, `local`, `container_reference` |

- **`null`** — `null`

| Type | Description |
|------|-------------|
| `null` | — |

- **`custom`** — `custom (OpenAI.CustomToolParam)`

A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the custom tool. Always `custom`. _Default:_ `"custom"` _Constant:_ `custom` |
| `name` | `string` | Yes | The name of the custom tool, used to identify it in tool calls. |
| `description` | `string` | No | Optional description of the custom tool, used to provide more context. |
| `format` | `OpenAI.CustomTextFormatParam \| OpenAI.CustomGrammarFormatParam` | No | The input format for the custom tool. Default is unconstrained text. |
| `defer_loading` | `boolean` | No | Whether this tool should be deferred and discovered via tool search. |

- **`format`** — `OpenAI.CustomTextFormatParam | OpenAI.CustomGrammarFormatParam`

The input format for the custom tool. Default is unconstrained text.

**One of the following:**

- **`text`** — `text (OpenAI.CustomTextFormatParam)`

Unconstrained free-form text.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Unconstrained text format. Always `text`. _Default:_ `"text"` _Constant:_ `text` |

- **`grammar`** — `grammar (OpenAI.CustomGrammarFormatParam)`

A grammar defined by the user.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Grammar format. Always `grammar`. _Default:_ `"grammar"` _Constant:_ `grammar` |
| `syntax` | `OpenAI.GrammarSyntax1` | Yes | The syntax of the grammar definition. One of `lark` or `regex`. _Enum:_ `lark`, `regex` |
| `definition` | `string` | Yes | The grammar definition. |

- **`web_search_preview`** — `web_search_preview (OpenAI.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).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`. _Default:_ `"web_search_preview"` _Constant:_ `web_search_preview` |
| `user_location` | `OpenAI.ApproximateLocation \| null` | No |  |
| `search_context_size` | `OpenAI.SearchContextSize` | No | 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. _Enum:_ `low`, `medium`, `high` |
| `search_content_types` | `OpenAI.SearchContentType[]` | No | _Enum:_ `text`, `image` |

- **`user_location`** — `OpenAI.ApproximateLocation | null`

**One of the following:**

- **`OpenAI.ApproximateLocation`** — `OpenAI.ApproximateLocation`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of location approximation. Always `approximate`. _Default:_ `"approximate"` _Constant:_ `approximate` |
| `country` | `string \| null` | No |  |
| `region` | `string \| null` | No |  |
| `city` | `string \| null` | No |  |
| `timezone` | `string \| null` | No |  |

- **`null`** — `null`

| Type | Description |
|------|-------------|
| `null` | — |

- **`apply_patch`** — `apply_patch (OpenAI.ApplyPatchToolParam)`

Allows the assistant to create, delete, or update files using unified diffs.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the tool. Always `apply_patch`. _Default:_ `"apply_patch"` _Constant:_ `apply_patch` |

- **`computer`** — `computer (OpenAI.ComputerTool)`

A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the computer tool. Always `computer`. _Default:_ `"computer"` _Constant:_ `computer` |

- **`namespace`** — `namespace (OpenAI.NamespaceToolParam)`

Groups function/custom tools under a shared namespace.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the tool. Always `namespace`. _Default:_ `"namespace"` _Constant:_ `namespace` |
| `name` | `string` | Yes | The namespace name used in tool calls (for example, `crm`). |
| `description` | `string` | Yes | A description of the namespace shown to the model. |
| `tools` | `(OpenAI.FunctionToolParam \| OpenAI.CustomToolParam)[]` | Yes | The function/custom tools available inside this namespace. |

- **`tools`** — `(OpenAI.FunctionToolParam | OpenAI.CustomToolParam)[]`

The function/custom tools available inside this namespace.

**One of the following:**

- **`OpenAI.FunctionToolParam`** — `OpenAI.FunctionToolParam`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes |  |
| `description` | `string \| null` | No |  |
| `parameters` | `OpenAI.EmptyModelParam \| null` | No |  |
| `strict` | `boolean \| null` | No |  |
| `type` | `enum` | Yes | _Default:_ `"function"` _Constant:_ `function` |
| `defer_loading` | `boolean` | No | Whether this function should be deferred and discovered via tool search. |

- **`OpenAI.CustomToolParam`** — `OpenAI.CustomToolParam`

A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the custom tool. Always `custom`. _Default:_ `"custom"` _Constant:_ `custom` |
| `name` | `string` | Yes | The name of the custom tool, used to identify it in tool calls. |
| `description` | `string` | No | Optional description of the custom tool, used to provide more context. |
| `format` | `OpenAI.CustomTextFormatParam \| OpenAI.CustomGrammarFormatParam` | No | The input format for the custom tool. Default is unconstrained text. |
| `defer_loading` | `boolean` | No | Whether this tool should be deferred and discovered via tool search. |

- **`format`** — `OpenAI.CustomTextFormatParam | OpenAI.CustomGrammarFormatParam`

The input format for the custom tool. Default is unconstrained text.

**One of the following:**

- **`text`** — `text (OpenAI.CustomTextFormatParam)`

Unconstrained free-form text.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Unconstrained text format. Always `text`. _Default:_ `"text"` _Constant:_ `text` |

- **`grammar`** — `grammar (OpenAI.CustomGrammarFormatParam)`

A grammar defined by the user.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Grammar format. Always `grammar`. _Default:_ `"grammar"` _Constant:_ `grammar` |
| `syntax` | `OpenAI.GrammarSyntax1` | Yes | The syntax of the grammar definition. One of `lark` or `regex`. _Enum:_ `lark`, `regex` |
| `definition` | `string` | Yes | The grammar definition. |

- **`tool_search`** — `tool_search (OpenAI.ToolSearchToolParam)`

Hosted or BYOT tool search configuration for deferred tools.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the tool. Always `tool_search`. _Default:_ `"tool_search"` _Constant:_ `tool_search` |
| `execution` | `OpenAI.ToolSearchExecutionType` | No | Whether tool search is executed by the server or by the client. _Enum:_ `server`, `client` |
| `description` | `string \| null` | No |  |
| `parameters` | `OpenAI.EmptyModelParam \| null` | No |  |

##### `reasoning` — `reasoning (OpenAI.InputItemReasoningItem)`

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).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the object. Always `reasoning`. _Constant:_ `reasoning` |
| `id` | `string` | Yes | The unique identifier of the reasoning content. |
| `encrypted_content` | `string \| null` | No |  |
| `summary` | `(OpenAI.TextContent \| OpenAI.ComputerScreenshotContent \| OpenAI.MessageContentInputTextContent \| OpenAI.MessageContentOutputTextContent \| OpenAI.MessageContentReasoningTextContent \| OpenAI.MessageContentRefusalContent \| OpenAI.MessageContentInputImageContent \| OpenAI.MessageContentInputFileContent \| OpenAI.SummaryTextContent)[]` | Yes | Reasoning summary content. |
| `content` | `OpenAI.ReasoningTextContent[]` | No | Reasoning text content. |
| `status` | `enum` | No | The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. _Enum:_ `in_progress`, `completed`, `incomplete` |

###### `summary` — `(OpenAI.TextContent | OpenAI.ComputerScreenshotContent | OpenAI.MessageContentInputTextContent | OpenAI.MessageContentOutputTextContent | OpenAI.MessageContentReasoningTextContent | OpenAI.MessageContentRefusalContent | OpenAI.MessageContentInputImageContent | OpenAI.MessageContentInputFileContent | OpenAI.SummaryTextContent)[]`

Reasoning summary content.

**One of the following:**

- **`text`** — `text (OpenAI.TextContent)`

A text content.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | _Default:_ `"text"` _Constant:_ `text` |
| `text` | `string` | Yes |  |

- **`computer_screenshot`** — `computer_screenshot (OpenAI.ComputerScreenshotContent)`

A screenshot of a computer.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`. _Default:_ `"computer_screenshot"` _Constant:_ `computer_screenshot` |
| `image_url` | `string \| null` | Yes |  |
| `file_id` | `string \| null` | Yes |  |
| `detail` | `OpenAI.ImageDetail` | Yes | The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. _Enum:_ `low`, `high`, `auto`, `original` |

- **`input_text`** — `input_text (OpenAI.MessageContentInputTextContent)`

A text input to the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the input item. Always `input_text`. _Default:_ `"input_text"` _Constant:_ `input_text` |
| `text` | `string` | Yes | The text input to the model. |

- **`output_text`** — `output_text (OpenAI.MessageContentOutputTextContent)`

A text output from the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the output text. Always `output_text`. _Default:_ `"output_text"` _Constant:_ `output_text` |
| `text` | `string` | Yes | The text output from the model. |
| `annotations` | `(OpenAI.FileCitationBody \| OpenAI.UrlCitationBody \| OpenAI.ContainerFileCitationBody \| OpenAI.FilePath)[]` | Yes | The annotations of the text output. |
| `logprobs` | `OpenAI.LogProb[]` | Yes |  |

- **`annotations`** — `(OpenAI.FileCitationBody | OpenAI.UrlCitationBody | OpenAI.ContainerFileCitationBody | OpenAI.FilePath)[]`

The annotations of the text output.

**One of the following:**

- **`file_citation`** — `file_citation (OpenAI.FileCitationBody)`

A citation to a file.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the file citation. Always `file_citation`. _Default:_ `"file_citation"` _Constant:_ `file_citation` |
| `file_id` | `string` | Yes | The ID of the file. |
| `index` | `OpenAI.integer` | Yes | The index of the file in the list of files. _Format:_ `int64` |
| `filename` | `string` | Yes | The filename of the file cited. |

- **`url_citation`** — `url_citation (OpenAI.UrlCitationBody)`

A citation for a web resource used to generate a model response.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the URL citation. Always `url_citation`. _Default:_ `"url_citation"` _Constant:_ `url_citation` |
| `url` | `string` | Yes | The URL of the web resource. _Format:_ `uri` |
| `start_index` | `OpenAI.integer` | Yes | The index of the first character of the URL citation in the message. _Format:_ `int64` |
| `end_index` | `OpenAI.integer` | Yes | The index of the last character of the URL citation in the message. _Format:_ `int64` |
| `title` | `string` | Yes | The title of the web resource. |

- **`container_file_citation`** — `container_file_citation (OpenAI.ContainerFileCitationBody)`

A citation for a container file used to generate a model response.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the container file citation. Always `container_file_citation`. _Default:_ `"container_file_citation"` _Constant:_ `container_file_citation` |
| `container_id` | `string` | Yes | The ID of the container file. |
| `file_id` | `string` | Yes | The ID of the file. |
| `start_index` | `OpenAI.integer` | Yes | The index of the first character of the container file citation in the message. _Format:_ `int64` |
| `end_index` | `OpenAI.integer` | Yes | The index of the last character of the container file citation in the message. _Format:_ `int64` |
| `filename` | `string` | Yes | The filename of the container file cited. |

- **`file_path`** — `file_path (OpenAI.FilePath)`

A path to a file.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the file path. Always `file_path`. _Constant:_ `file_path` |
| `file_id` | `string` | Yes | The ID of the file. |
| `index` | `OpenAI.integer` | Yes | The index of the file in the list of files. _Format:_ `int64` |

- **`logprobs`** — `OpenAI.LogProb[]`

**Array of** `OpenAI.LogProb`**:**

The log probability of a token.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `token` | `string` | Yes |  |
| `logprob` | `OpenAI.numeric` | Yes | _Format:_ `double` |
| `bytes` | `OpenAI.integer[]` | Yes |  |
| `top_logprobs` | `OpenAI.TopLogProb[]` | Yes |  |

- **`top_logprobs`** — `OpenAI.TopLogProb[]`

**Array of** `OpenAI.TopLogProb`**:**

The top log probability of a token.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `token` | `string` | Yes |  |
| `logprob` | `OpenAI.numeric` | Yes | _Format:_ `double` |
| `bytes` | `OpenAI.integer[]` | Yes |  |

- **`reasoning_text`** — `reasoning_text (OpenAI.MessageContentReasoningTextContent)`

Reasoning text from the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the reasoning text. Always `reasoning_text`. _Default:_ `"reasoning_text"` _Constant:_ `reasoning_text` |
| `text` | `string` | Yes | The reasoning text from the model. |

- **`refusal`** — `refusal (OpenAI.MessageContentRefusalContent)`

A refusal from the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the refusal. Always `refusal`. _Default:_ `"refusal"` _Constant:_ `refusal` |
| `refusal` | `string` | Yes | The refusal explanation from the model. |

- **`input_image`** — `input_image (OpenAI.MessageContentInputImageContent)`

An image input to the model. Learn about [image inputs](/docs/guides/vision).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the input item. Always `input_image`. _Default:_ `"input_image"` _Constant:_ `input_image` |
| `image_url` | `string \| null` | No |  |
| `file_id` | `string \| null` | No |  |
| `detail` | `OpenAI.ImageDetail` | Yes | The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. _Enum:_ `low`, `high`, `auto`, `original` |

- **`input_file`** — `input_file (OpenAI.MessageContentInputFileContent)`

A file input to the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the input item. Always `input_file`. _Default:_ `"input_file"` _Constant:_ `input_file` |
| `file_id` | `string \| null` | No |  |
| `filename` | `string` | No | The name of the file to be sent to the model. |
| `file_data` | `string` | No | The content of the file to be sent to the model. |
| `file_url` | `string` | No | The URL of the file to be sent to the model. _Format:_ `uri` |
| `detail` | `OpenAI.FileInputDetail` | No | The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. _Enum:_ `low`, `high` |

- **`summary_text`** — `summary_text (OpenAI.SummaryTextContent)`

A summary text from the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the object. Always `summary_text`. _Default:_ `"summary_text"` _Constant:_ `summary_text` |
| `text` | `string` | Yes | A summary of the reasoning output from the model so far. |

###### `content` — `OpenAI.ReasoningTextContent[]`

Reasoning text content.

**Array of** `OpenAI.ReasoningTextContent`**:**

Reasoning text from the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the reasoning text. Always `reasoning_text`. _Default:_ `"reasoning_text"` _Constant:_ `reasoning_text` |
| `text` | `string` | Yes | The reasoning text from the model. |

##### `compaction` — `compaction (OpenAI.InputItemCompactionSummaryItemParam)`

A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the item. Always `compaction`. _Default:_ `"compaction"` _Constant:_ `compaction` |
| `id` | `string \| null` | No |  |
| `encrypted_content` | `string` | Yes | The encrypted content of the compaction summary. |

##### `image_generation_call` — `image_generation_call (OpenAI.InputItemImageGenToolCall)`

An image generation request made by the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the image generation call. Always `image_generation_call`. _Constant:_ `image_generation_call` |
| `id` | `string` | Yes | The unique ID of the image generation call. |
| `status` | `enum` | Yes | The status of the image generation call. _Enum:_ `in_progress`, `completed`, `generating`, `failed` |
| `result` | `string \| null` | Yes |  |

##### `code_interpreter_call` — `code_interpreter_call (OpenAI.InputItemCodeInterpreterToolCall)`

A tool call to run code.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the code interpreter tool call. Always `code_interpreter_call`. _Default:_ `"code_interpreter_call"` _Constant:_ `code_interpreter_call` |
| `id` | `string` | Yes | The unique ID of the code interpreter tool call. |
| `status` | `enum` | Yes | The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`. _Enum:_ `in_progress`, `completed`, `incomplete`, `interpreting`, `failed` |
| `container_id` | `string` | Yes | The ID of the container used to run the code. |
| `code` | `string \| null` | Yes |  |
| `outputs` | `(OpenAI.CodeInterpreterOutputLogs \| OpenAI.CodeInterpreterOutputImage)[] \| null` | Yes |  |

###### `outputs` — `(OpenAI.CodeInterpreterOutputLogs | OpenAI.CodeInterpreterOutputImage)[] | null`

**One of the following:**

- **`(OpenAI.CodeInterpreterOutputLogs | OpenAI.CodeInterpreterOutputImage)[]`** — `(OpenAI.CodeInterpreterOutputLogs | OpenAI.CodeInterpreterOutputImage)[]`

**One of the following:**

- **`OpenAI.CodeInterpreterOutputLogs`** — `OpenAI.CodeInterpreterOutputLogs`

The logs output from the code interpreter.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the output. Always `logs`. _Default:_ `"logs"` _Constant:_ `logs` |
| `logs` | `string` | Yes | The logs output from the code interpreter. |

- **`OpenAI.CodeInterpreterOutputImage`** — `OpenAI.CodeInterpreterOutputImage`

The image output from the code interpreter.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the output. Always `image`. _Default:_ `"image"` _Constant:_ `image` |
| `url` | `string` | Yes | The URL of the image output from the code interpreter. _Format:_ `uri` |

- **`null`** — `null`

| Type | Description |
|------|-------------|
| `null` | — |

##### `local_shell_call` — `local_shell_call (OpenAI.InputItemLocalShellToolCall)`

A tool call to run a command on the local shell.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the local shell call. Always `local_shell_call`. _Constant:_ `local_shell_call` |
| `id` | `string` | Yes | The unique ID of the local shell call. |
| `call_id` | `string` | Yes | The unique ID of the local shell tool call generated by the model. |
| `action` | `OpenAI.LocalShellExecAction` | Yes | Execute a shell command on the server. |
| `status` | `enum` | Yes | The status of the local shell call. _Enum:_ `in_progress`, `completed`, `incomplete` |

###### `action` — `OpenAI.LocalShellExecAction`

Execute a shell command on the server.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the local shell action. Always `exec`. _Default:_ `"exec"` _Constant:_ `exec` |
| `command` | `string[]` | Yes | The command to run. |
| `timeout_ms` | `OpenAI.integer \| null` | No |  |
| `working_directory` | `string \| null` | No |  |
| `env` | `object` | Yes | Environment variables to set for the command. |
| `user` | `string \| null` | No |  |

##### `local_shell_call_output` — `local_shell_call_output (OpenAI.InputItemLocalShellToolCallOutput)`

The output of a local shell tool call.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the local shell tool call output. Always `local_shell_call_output`. _Constant:_ `local_shell_call_output` |
| `id` | `string` | Yes | The unique ID of the local shell tool call generated by the model. |
| `output` | `string` | Yes | A JSON string of the output of the local shell tool call. |
| `status` | `enum` | No | _Enum:_ `in_progress`, `completed`, `incomplete` |

##### `shell_call` — `shell_call (OpenAI.InputItemFunctionShellCallItemParam)`

A tool representing a request to execute one or more shell commands.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the item. Always `shell_call`. _Default:_ `"shell_call"` _Constant:_ `shell_call` |
| `id` | `string \| null` | No |  |
| `call_id` | `string` | Yes | The unique ID of the shell tool call generated by the model. |
| `action` | `OpenAI.FunctionShellActionParam` | Yes | The shell commands and limits that describe how to run the tool call. |
| `status` | `enum` | No | _Enum:_ `in_progress`, `completed`, `incomplete` |
| `environment` | `OpenAI.FunctionShellCallItemParamEnvironment \| null` | No |  |

###### `action` — `OpenAI.FunctionShellActionParam`

The shell commands and limits that describe how to run the tool call.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `commands` | `string[]` | Yes | Ordered shell commands for the execution environment to run. |
| `timeout_ms` | `OpenAI.integer \| null` | No |  |
| `max_output_length` | `OpenAI.integer \| null` | No |  |

###### `environment` — `OpenAI.FunctionShellCallItemParamEnvironment | null`

**One of the following:**

- **`OpenAI.FunctionShellCallItemParamEnvironment`** — `OpenAI.FunctionShellCallItemParamEnvironment`

The environment to execute the shell commands in.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | _Enum:_ `local`, `container_reference` |

- **`null`** — `null`

| Type | Description |
|------|-------------|
| `null` | — |

##### `shell_call_output` — `shell_call_output (OpenAI.InputItemFunctionShellCallOutputItemParam)`

The streamed output items emitted by a shell tool call.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the item. Always `shell_call_output`. _Default:_ `"shell_call_output"` _Constant:_ `shell_call_output` |
| `id` | `string \| null` | No |  |
| `call_id` | `string` | Yes | The unique ID of the shell tool call generated by the model. |
| `output` | `OpenAI.FunctionShellCallOutputContentParam[]` | Yes | Captured chunks of stdout and stderr output, along with their associated outcomes. |
| `status` | `enum` | No | _Enum:_ `in_progress`, `completed`, `incomplete` |
| `max_output_length` | `OpenAI.integer \| null` | No |  |

###### `output` — `OpenAI.FunctionShellCallOutputContentParam[]`

Captured chunks of stdout and stderr output, along with their associated outcomes.

**Array of** `OpenAI.FunctionShellCallOutputContentParam`**:**

Captured stdout and stderr for a portion of a shell tool call output.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `stdout` | `string` | Yes | Captured stdout output for the shell call. |
| `stderr` | `string` | Yes | Captured stderr output for the shell call. |
| `outcome` | `OpenAI.FunctionShellCallOutputTimeoutOutcomeParam \| OpenAI.FunctionShellCallOutputExitOutcomeParam` | Yes | The exit or timeout outcome associated with this shell call. |

- **`outcome`** — `OpenAI.FunctionShellCallOutputTimeoutOutcomeParam | OpenAI.FunctionShellCallOutputExitOutcomeParam`

The exit or timeout outcome associated with this shell call.

**One of the following:**

- **`timeout`** — `timeout (OpenAI.FunctionShellCallOutputTimeoutOutcomeParam)`

Indicates that the shell call exceeded its configured time limit.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The outcome type. Always `timeout`. _Default:_ `"timeout"` _Constant:_ `timeout` |

- **`exit`** — `exit (OpenAI.FunctionShellCallOutputExitOutcomeParam)`

Indicates that the shell commands finished and returned an exit code.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The outcome type. Always `exit`. _Default:_ `"exit"` _Constant:_ `exit` |
| `exit_code` | `OpenAI.integer` | Yes | The exit code returned by the shell process. _Format:_ `int64` |

##### `apply_patch_call` — `apply_patch_call (OpenAI.InputItemApplyPatchToolCallItemParam)`

A tool call representing a request to create, delete, or update files using diff patches.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the item. Always `apply_patch_call`. _Default:_ `"apply_patch_call"` _Constant:_ `apply_patch_call` |
| `id` | `string \| null` | No |  |
| `call_id` | `string` | Yes | The unique ID of the apply patch tool call generated by the model. |
| `status` | `OpenAI.ApplyPatchCallStatusParam` | Yes | The status of the apply patch tool call. One of `in_progress` or `completed`. _Enum:_ `in_progress`, `completed` |
| `operation` | `OpenAI.ApplyPatchCreateFileOperationParam \| OpenAI.ApplyPatchDeleteFileOperationParam \| OpenAI.ApplyPatchUpdateFileOperationParam` | Yes | The specific create, delete, or update instruction for the apply_patch tool call. |

###### `operation` — `OpenAI.ApplyPatchCreateFileOperationParam | OpenAI.ApplyPatchDeleteFileOperationParam | OpenAI.ApplyPatchUpdateFileOperationParam`

The specific create, delete, or update instruction for the apply_patch tool call.

**One of the following:**

- **`create_file`** — `create_file (OpenAI.ApplyPatchCreateFileOperationParam)`

Instruction for creating a new file via the apply_patch tool.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The operation type. Always `create_file`. _Default:_ `"create_file"` _Constant:_ `create_file` |
| `path` | `string` | Yes | Path of the file to create relative to the workspace root. |
| `diff` | `string` | Yes | Unified diff content to apply when creating the file. |

- **`delete_file`** — `delete_file (OpenAI.ApplyPatchDeleteFileOperationParam)`

Instruction for deleting an existing file via the apply_patch tool.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The operation type. Always `delete_file`. _Default:_ `"delete_file"` _Constant:_ `delete_file` |
| `path` | `string` | Yes | Path of the file to delete relative to the workspace root. |

- **`update_file`** — `update_file (OpenAI.ApplyPatchUpdateFileOperationParam)`

Instruction for updating an existing file via the apply_patch tool.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The operation type. Always `update_file`. _Default:_ `"update_file"` _Constant:_ `update_file` |
| `path` | `string` | Yes | Path of the file to update relative to the workspace root. |
| `diff` | `string` | Yes | Unified diff content to apply to the existing file. |

##### `apply_patch_call_output` — `apply_patch_call_output (OpenAI.InputItemApplyPatchToolCallOutputItemParam)`

The streamed output emitted by an apply patch tool call.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the item. Always `apply_patch_call_output`. _Default:_ `"apply_patch_call_output"` _Constant:_ `apply_patch_call_output` |
| `id` | `string \| null` | No |  |
| `call_id` | `string` | Yes | The unique ID of the apply patch tool call generated by the model. |
| `status` | `OpenAI.ApplyPatchCallOutputStatusParam` | Yes | The status of the apply patch tool call output. One of `completed` or `failed`. _Enum:_ `completed`, `failed` |
| `output` | `string \| null` | No |  |

##### `mcp_list_tools` — `mcp_list_tools (OpenAI.InputItemMcpListTools)`

A list of tools available on an MCP server.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the item. Always `mcp_list_tools`. _Constant:_ `mcp_list_tools` |
| `id` | `string` | Yes | The unique ID of the list. |
| `server_label` | `string` | Yes | The label of the MCP server. |
| `tools` | `OpenAI.MCPListToolsTool[]` | Yes | The tools available on the server. |
| `error` | `OpenAI.RealtimeMCPProtocolError \| OpenAI.RealtimeMCPToolExecutionError \| OpenAI.RealtimeMCPHTTPError` | No |  |

###### `tools` — `OpenAI.MCPListToolsTool[]`

The tools available on the server.

**Array of** `OpenAI.MCPListToolsTool`**:**

A tool available on an MCP server.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | The name of the tool. |
| `description` | `string \| null` | No |  |
| `input_schema` | `OpenAI.MCPListToolsToolInputSchema` | Yes | The JSON schema describing the tool's input. |
| `annotations` | `OpenAI.MCPListToolsToolAnnotations \| null` | No |  |

###### `error` — `OpenAI.RealtimeMCPProtocolError | OpenAI.RealtimeMCPToolExecutionError | OpenAI.RealtimeMCPHTTPError`

**One of the following:**

- **`protocol_error`** — `protocol_error (OpenAI.RealtimeMCPProtocolError)`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | _Constant:_ `protocol_error` |
| `code` | `OpenAI.integer` | Yes | _Format:_ `int64` |
| `message` | `string` | Yes |  |

- **`tool_execution_error`** — `tool_execution_error (OpenAI.RealtimeMCPToolExecutionError)`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | _Constant:_ `tool_execution_error` |
| `message` | `string` | Yes |  |

- **`http_error`** — `http_error (OpenAI.RealtimeMCPHTTPError)`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | _Constant:_ `http_error` |
| `code` | `OpenAI.integer` | Yes | _Format:_ `int64` |
| `message` | `string` | Yes |  |

##### `mcp_approval_request` — `mcp_approval_request (OpenAI.InputItemMcpApprovalRequest)`

A request for human approval of a tool invocation.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the item. Always `mcp_approval_request`. _Constant:_ `mcp_approval_request` |
| `id` | `string` | Yes | The unique ID of the approval request. |
| `server_label` | `string` | Yes | The label of the MCP server making the request. |
| `name` | `string` | Yes | The name of the tool to run. |
| `arguments` | `string` | Yes | A JSON string of arguments for the tool. |

##### `mcp_approval_response` — `mcp_approval_response (OpenAI.InputItemMcpApprovalResponse)`

A response to an MCP approval request.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the item. Always `mcp_approval_response`. _Constant:_ `mcp_approval_response` |
| `id` | `string \| null` | No |  |
| `approval_request_id` | `string` | Yes | The ID of the approval request being answered. |
| `approve` | `boolean` | Yes | Whether the request was approved. |
| `reason` | `string \| null` | No |  |

##### `mcp_call` — `mcp_call (OpenAI.InputItemMcpToolCall)`

An invocation of a tool on an MCP server.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the item. Always `mcp_call`. _Constant:_ `mcp_call` |
| `id` | `string` | Yes | The unique ID of the tool call. |
| `server_label` | `string` | Yes | The label of the MCP server running the tool. |
| `name` | `string` | Yes | The name of the tool that was run. |
| `arguments` | `string` | Yes | A JSON string of the arguments passed to the tool. |
| `output` | `string \| null` | No |  |
| `error` | `object` | No |  |
| `status` | `OpenAI.MCPToolCallStatus` | No | The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`. _Enum:_ `in_progress`, `completed`, `incomplete`, `calling`, `failed` |
| `approval_request_id` | `string \| null` | No |  |

##### `custom_tool_call_output` — `custom_tool_call_output (OpenAI.InputItemCustomToolCallOutput)`

The output of a custom tool call from your code, being sent back to the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the custom tool call output. Always `custom_tool_call_output`. _Constant:_ `custom_tool_call_output` |
| `id` | `string` | No | The unique ID of the custom tool call output in the OpenAI platform. |
| `call_id` | `string` | Yes | The call ID, used to map this custom tool call output to a custom tool call. |
| `output` | `string \| (OpenAI.FunctionAndCustomToolCallOutputInputTextContent \| OpenAI.FunctionAndCustomToolCallOutputInputImageContent \| OpenAI.FunctionAndCustomToolCallOutputInputFileContent)[]` | Yes | The output from the custom tool call generated by your code. Can be a string or an list of output content. |

###### `output` — `string | (OpenAI.FunctionAndCustomToolCallOutputInputTextContent | OpenAI.FunctionAndCustomToolCallOutputInputImageContent | OpenAI.FunctionAndCustomToolCallOutputInputFileContent)[]`

The output from the custom tool call generated by your code. Can be a string or an list of output content.

**One of the following:**

- **`string`** — `string`

| Type | Description |
|------|-------------|
| `string` | — |

- **`(OpenAI.FunctionAndCustomToolCallOutputInputTextContent | OpenAI.FunctionAndCustomToolCallOutputInputImageContent | OpenAI.FunctionAndCustomToolCallOutputInputFileContent)[]`** — `(OpenAI.FunctionAndCustomToolCallOutputInputTextContent | OpenAI.FunctionAndCustomToolCallOutputInputImageContent | OpenAI.FunctionAndCustomToolCallOutputInputFileContent)[]`

**One of the following:**

- **`input_text`** — `input_text (OpenAI.FunctionAndCustomToolCallOutputInputTextContent)`

A text input to the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the input item. Always `input_text`. _Default:_ `"input_text"` _Constant:_ `input_text` |
| `text` | `string` | Yes | The text input to the model. |

- **`input_image`** — `input_image (OpenAI.FunctionAndCustomToolCallOutputInputImageContent)`

An image input to the model. Learn about [image inputs](/docs/guides/vision).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the input item. Always `input_image`. _Default:_ `"input_image"` _Constant:_ `input_image` |
| `image_url` | `string \| null` | No |  |
| `file_id` | `string \| null` | No |  |
| `detail` | `OpenAI.ImageDetail` | Yes | The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. _Enum:_ `low`, `high`, `auto`, `original` |

- **`input_file`** — `input_file (OpenAI.FunctionAndCustomToolCallOutputInputFileContent)`

A file input to the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the input item. Always `input_file`. _Default:_ `"input_file"` _Constant:_ `input_file` |
| `file_id` | `string \| null` | No |  |
| `filename` | `string` | No | The name of the file to be sent to the model. |
| `file_data` | `string` | No | The content of the file to be sent to the model. |
| `file_url` | `string` | No | The URL of the file to be sent to the model. _Format:_ `uri` |
| `detail` | `OpenAI.FileInputDetail` | No | The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. _Enum:_ `low`, `high` |

##### `custom_tool_call` — `custom_tool_call (OpenAI.InputItemCustomToolCall)`

A call to a custom tool created by the model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `enum` | Yes | The type of the custom tool call. Always `custom_tool_call`. _Constant:_ `custom_tool_call` |
| `id` | `string` | No | The unique ID of the custom tool call in the OpenAI platform. |
| `call_id` | `string` | Yes | An identifier used to map this custom tool call to a tool call output. |
| `namespace` | `string` | No | The namespace of the custom tool being called. |
| `name` | `string` | Yes | The name of the custom tool being called. |
| `input` | `string` | Yes | The input for the custom tool call generated by the model. |

#### `null` — `null`

| Type | Description |
|------|-------------|
| `null` | — |

## Responses

### 200 — The request has succeeded.

Content-Type: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | The unique ID of the conversation. |
| `object` | `enum` | Yes | The object type, which is always `conversation`. _Default:_ `"conversation"` _Constant:_ `conversation` |
| `metadata` | `OpenAI.Metadata` | Yes | 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. |
| `created_at` | `integer` | Yes | The time at which the conversation was created, measured in seconds since the Unix epoch. _Format:_ `unixtime` |

### 4XX — Client error

Content-Type: `application/json`

Error response for API failures.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `error` | `OpenAI.Error` | Yes |  |

#### `error` — `OpenAI.Error`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `code` | `string \| null` | Yes |  |
| `message` | `string` | Yes |  |
| `param` | `string \| null` | No |  |
| `type` | `string` | No |  |
| `details` | `OpenAI.Error[]` | No |  |
| `additionalInfo` | `object` | No |  |
| `debugInfo` | `object` | No |  |

### 5XX — Server error

Content-Type: `application/json`

Error response for API failures.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `error` | `OpenAI.Error` | Yes |  |

#### `error` — `OpenAI.Error`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `code` | `string \| null` | Yes |  |
| `message` | `string` | Yes |  |
| `param` | `string \| null` | No |  |
| `type` | `string` | No |  |
| `details` | `OpenAI.Error[]` | No |  |
| `additionalInfo` | `object` | No |  |
| `debugInfo` | `object` | No |  |
