# OpenAI Response Get

> Large Language Models

## Endpoint

`GET https://api.modelverse.cn/v1/responses/{response_id}`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| response_id | path | string | Yes | The ID of the response to retrieve. |
| include | query | array | No | Additional fields to include in the response. See the `include` parameter for Response creation above for more information. |
| stream | query | boolean | No | If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) for more information. |
| starting_after | query | integer | No | The sequence number of the event after which to start streaming. |
| include_obfuscation | query | boolean | No | When true, stream obfuscation will be enabled. Stream obfuscation adds random characters to an `obfuscation` field on streaming delta events to normalize payload sizes as a mitigation to certain side-channel attacks. These obfuscation fields are included by default, but add a small amount of overhead to the data stream. You can set `include_obfuscation` to false to optimize for bandwidth if you trust the network links between your application and the OpenAI API. |

## Responses

- **200** — OK
- **4XX** — Error response.

## OpenAPI Definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenAI API",
    "description": "The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.",
    "version": "2.3.0",
    "termsOfService": "https://openai.com/policies/terms-of-use",
    "contact": {
      "name": "OpenAI Support",
      "url": "https://help.openai.com/"
    },
    "license": {
      "name": "MIT",
      "url": "https://github.com/openai/openai-openapi/blob/master/LICENSE"
    }
  },
  "servers": [
    {
      "url": "https://api.modelverse.cn",
      "description": "中国大陆节点，国内用户推荐，访问延迟低。"
    },
    {
      "url": "https://api-sg.umodelverse.ai",
      "description": "新加坡节点，东南亚用户推荐，访问更快。"
    },
    {
      "url": "https://api-us-ca.umodelverse.ai",
      "description": "美国洛杉矶节点，海外用户推荐，数据不回国。"
    },
    {
      "url": "https://api-ge-fra.umodelverse.ai",
      "description": "法兰克福节点，欧洲用户推荐，访问更快。"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Responses",
      "description": "Create, retrieve, cancel, delete, compact, and count input tokens for Responses."
    }
  ],
  "paths": {
    "/v1/responses": {
      "post": {
        "operationId": "createResponse",
        "tags": [
          "Responses"
        ],
        "summary": "OpenAI Response Create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateResponse"
              },
              "example": {
                "model": "model-name",
                "input": "Write a haiku about APIs."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response"
                }
              },
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseStreamEvent"
                }
              }
            }
          },
          "4XX": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/responses/{response_id}": {
      "get": {
        "operationId": "getResponse",
        "tags": [
          "Responses"
        ],
        "summary": "OpenAI Response Get",
        "parameters": [
          {
            "in": "path",
            "name": "response_id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "resp_677efb5139a88190b512bc3fef8e535d"
            },
            "description": "The ID of the response to retrieve."
          },
          {
            "in": "query",
            "name": "include",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/IncludeEnum"
              }
            },
            "description": "Additional fields to include in the response. See the `include`\nparameter for Response creation above for more information.\n"
          },
          {
            "in": "query",
            "name": "stream",
            "schema": {
              "type": "boolean"
            },
            "description": "If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\nSee the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)\nfor more information.\n"
          },
          {
            "in": "query",
            "name": "starting_after",
            "schema": {
              "type": "integer"
            },
            "description": "The sequence number of the event after which to start streaming.\n"
          },
          {
            "in": "query",
            "name": "include_obfuscation",
            "schema": {
              "type": "boolean"
            },
            "description": "When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events\nto normalize payload sizes as a mitigation to certain side-channel\nattacks. These obfuscation fields are included by default, but add a\nsmall amount of overhead to the data stream. You can set\n`include_obfuscation` to false to optimize for bandwidth if you trust\nthe network links between your application and the OpenAI API.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response"
                }
              }
            }
          },
          "4XX": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteResponse",
        "tags": [
          "Responses"
        ],
        "summary": "OpenAI Response Delete",
        "parameters": [
          {
            "in": "path",
            "name": "response_id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "resp_677efb5139a88190b512bc3fef8e535d"
            },
            "description": "The ID of the response to delete."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/responses/{response_id}/cancel": {
      "post": {
        "operationId": "cancelResponse",
        "tags": [
          "Responses"
        ],
        "summary": "OpenAI Response Cancel",
        "parameters": [
          {
            "in": "path",
            "name": "response_id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "resp_677efb5139a88190b512bc3fef8e535d"
            },
            "description": "The ID of the response to cancel."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/responses/input_tokens": {
      "post": {
        "summary": "OpenAI Input Token Count",
        "operationId": "Getinputtokencounts",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenCountsBody"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/TokenCountsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenCountsResource"
                }
              }
            }
          },
          "4XX": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Responses"
        ]
      }
    },
    "/v1/responses/compact": {
      "post": {
        "summary": "OpenAI Conversation Compaction",
        "operationId": "Compactconversation",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompactResponseMethodPublicBody"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CompactResponseMethodPublicBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompactResource"
                }
              }
            }
          },
          "4XX": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Responses"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "CreateResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CreateModelResponseProperties"
          },
          {
            "$ref": "#/components/schemas/ResponseProperties"
          },
          {
            "type": "object",
            "properties": {
              "input": {
                "$ref": "#/components/schemas/InputParam"
              },
              "include": {
                "anyOf": [
                  {
                    "type": "array",
                    "description": "Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program).",
                    "items": {
                      "$ref": "#/components/schemas/IncludeEnum"
                    },
                    "title": "array"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "parallel_tool_calls": {
                "anyOf": [
                  {
                    "type": "boolean",
                    "description": "Whether to allow the model to run tool calls in parallel.\n",
                    "default": true,
                    "title": "boolean"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "store": {
                "anyOf": [
                  {
                    "type": "boolean",
                    "description": "Whether to store the generated model response for later retrieval via\nAPI.\n",
                    "default": true,
                    "title": "boolean"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "instructions": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n",
                    "title": "string"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "stream": {
                "anyOf": [
                  {
                    "description": "If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\nSee the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)\nfor more information.\n",
                    "type": "boolean",
                    "default": false,
                    "title": "boolean"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "stream_options": {
                "$ref": "#/components/schemas/ResponseStreamOptions"
              },
              "conversation": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ConversationParam"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "context_management": {
                "anyOf": [
                  {
                    "type": "array",
                    "description": "Context management configuration for this request.\n",
                    "minItems": 1,
                    "items": {
                      "$ref": "#/components/schemas/ContextManagementParam"
                    },
                    "title": "array"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "max_output_tokens": {
                "anyOf": [
                  {
                    "description": "An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).\n",
                    "type": "integer",
                    "minimum": 16,
                    "title": "integer"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              }
            }
          }
        ]
      },
      "Response": {
        "title": "The response object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ModelResponseProperties"
          },
          {
            "$ref": "#/components/schemas/ResponseProperties"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier for this Response.\n"
              },
              "object": {
                "type": "string",
                "description": "The object type of this resource - always set to `response`.\n",
                "enum": [
                  "response"
                ],
                "x-stainless-const": true
              },
              "status": {
                "type": "string",
                "description": "The status of the response generation. One of `completed`, `failed`,\n`in_progress`, `cancelled`, `queued`, or `incomplete`.\n",
                "enum": [
                  "completed",
                  "failed",
                  "in_progress",
                  "cancelled",
                  "queued",
                  "incomplete"
                ]
              },
              "created_at": {
                "type": "number",
                "format": "unixtime",
                "description": "Unix timestamp (in seconds) of when this Response was created.\n"
              },
              "completed_at": {
                "anyOf": [
                  {
                    "type": "number",
                    "format": "unixtime",
                    "description": "Unix timestamp (in seconds) of when this Response was completed.\nOnly present when the status is `completed`.\n",
                    "title": "number"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "error": {
                "$ref": "#/components/schemas/ResponseError"
              },
              "incomplete_details": {
                "anyOf": [
                  {
                    "type": "object",
                    "description": "Details about why the response is incomplete.\n",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "description": "The reason why the response is incomplete.",
                        "enum": [
                          "max_output_tokens",
                          "content_filter"
                        ]
                      }
                    },
                    "title": "object"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "output": {
                "type": "array",
                "description": "An array of content items generated by the model.\n\n- The length and order of items in the `output` array is dependent\n  on the model's response.\n- Rather than accessing the first item in the `output` array and\n  assuming it's an `assistant` message with the content generated by\n  the model, you might consider using the `output_text` property where\n  supported in SDKs.\n",
                "items": {
                  "$ref": "#/components/schemas/OutputItem"
                }
              },
              "instructions": {
                "anyOf": [
                  {
                    "description": "A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n",
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "A text input to the model, equivalent to a text input with the\n`developer` role.\n",
                        "title": "string"
                      },
                      {
                        "type": "array",
                        "title": "Input item list",
                        "description": "A list of one or many input items to the model, containing\ndifferent content types.\n",
                        "items": {
                          "$ref": "#/components/schemas/InputItem"
                        }
                      }
                    ]
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "output_text": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "SDK-only convenience property that contains the aggregated text output\nfrom all `output_text` items in the `output` array, if any are present.\nSupported in the Python and JavaScript SDKs.\n",
                    "x-oaiSupportedSDKs": [
                      "python",
                      "javascript"
                    ],
                    "title": "string"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "usage": {
                "$ref": "#/components/schemas/ResponseUsage"
              },
              "parallel_tool_calls": {
                "type": "boolean",
                "description": "Whether to allow the model to run tool calls in parallel.\n",
                "default": true
              },
              "conversation": {
                "anyOf": [
                  {
                    "default": null,
                    "$ref": "#/components/schemas/Conversation-2"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "max_output_tokens": {
                "anyOf": [
                  {
                    "description": "An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).\n",
                    "type": "integer",
                    "title": "integer"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "object",
              "created_at",
              "error",
              "incomplete_details",
              "instructions",
              "model",
              "tools",
              "output",
              "parallel_tool_calls",
              "metadata",
              "tool_choice",
              "temperature",
              "top_p"
            ]
          }
        ],
        "example": {
          "id": "resp_123",
          "object": "response",
          "created_at": 1741476777,
          "status": "completed",
          "error": null,
          "incomplete_details": null,
          "instructions": null,
          "model": "model-name",
          "output": [
            {
              "type": "message",
              "id": "msg_123",
              "status": "completed",
              "role": "assistant",
              "content": [
                {
                  "type": "output_text",
                  "text": "Hi! How can I help?",
                  "annotations": []
                }
              ]
            }
          ],
          "parallel_tool_calls": true,
          "temperature": 1,
          "tool_choice": "auto",
          "tools": [],
          "top_p": 1,
          "metadata": {}
        }
      },
      "ResponseStreamEvent": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ResponseAudioDeltaEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseAudioDoneEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseAudioTranscriptDeltaEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseAudioTranscriptDoneEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseCodeInterpreterCallCodeDeltaEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseCodeInterpreterCallCodeDoneEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseCodeInterpreterCallCompletedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseCodeInterpreterCallInProgressEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseCodeInterpreterCallInterpretingEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseCompletedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseContentPartAddedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseContentPartDoneEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseErrorEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseFileSearchCallCompletedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseFileSearchCallInProgressEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseFileSearchCallSearchingEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseFunctionCallArgumentsDoneEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseInProgressEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseFailedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseIncompleteEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseOutputItemAddedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseOutputItemDoneEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseReasoningSummaryPartAddedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseReasoningSummaryPartDoneEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseReasoningSummaryTextDeltaEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseReasoningSummaryTextDoneEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseReasoningTextDeltaEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseReasoningTextDoneEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseRefusalDeltaEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseRefusalDoneEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseTextDeltaEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseTextDoneEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseWebSearchCallCompletedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseWebSearchCallInProgressEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseWebSearchCallSearchingEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseImageGenCallCompletedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseImageGenCallGeneratingEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseImageGenCallInProgressEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseImageGenCallPartialImageEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseMCPCallArgumentsDeltaEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseMCPCallArgumentsDoneEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseMCPCallCompletedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseMCPCallFailedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseMCPCallInProgressEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseMCPListToolsCompletedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseMCPListToolsFailedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseMCPListToolsInProgressEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseOutputTextAnnotationAddedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseQueuedEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseCustomToolCallInputDeltaEvent"
          },
          {
            "$ref": "#/components/schemas/ResponseCustomToolCallInputDoneEvent"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/Error"
          }
        },
        "required": [
          "error"
        ]
      },
      "IncludeEnum": {
        "type": "string",
        "enum": [
          "file_search_call.results",
          "web_search_call.results",
          "web_search_call.action.sources",
          "message.input_image.image_url",
          "computer_call_output.output.image_url",
          "code_interpreter_call.outputs",
          "reasoning.encrypted_content",
          "message.output_text.logprobs"
        ],
        "description": "Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.results`: Include the search results of the web search tool call.\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program)."
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "anyOf": [
              {
                "type": "string",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "message": {
            "type": "string"
          },
          "param": {
            "anyOf": [
              {
                "type": "string",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "message",
          "param",
          "code"
        ]
      },
      "TokenCountsBody": {
        "properties": {
          "model": {
            "anyOf": [
              {
                "type": "string",
                "description": "Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "input": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 10485760,
                    "description": "A text input to the model, equivalent to a text input with the `user` role.",
                    "title": "string"
                  },
                  {
                    "items": {
                      "$ref": "#/components/schemas/InputItem"
                    },
                    "type": "array",
                    "description": "A list of one or many input items to the model, containing different content types.",
                    "title": "array"
                  }
                ],
                "description": "Text, image, or file inputs to the model, used to generate a response"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "previous_response_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.",
                "example": "resp_123",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Tool"
                },
                "type": "array",
                "description": "An array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter.",
                "title": "array"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "text": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResponseTextParam"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "reasoning": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Reasoning",
                "description": "**gpt-5 and o-series models only** Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning)."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "truncation": {
            "$ref": "#/components/schemas/TruncationEnum",
            "description": "The truncation strategy to use for the model response. - `auto`: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. - `disabled` (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error."
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string",
                "description": "A system (or developer) message inserted into the model's context.\nWhen used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "conversation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConversationParam"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "tool_choice": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolChoiceParam",
                "description": "Controls which tool the model should use, if any."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "parallel_tool_calls": {
            "anyOf": [
              {
                "type": "boolean",
                "description": "Whether to allow the model to run tool calls in parallel.",
                "title": "boolean"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": []
      },
      "TokenCountsResource": {
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "response.input_tokens"
            ],
            "default": "response.input_tokens",
            "x-stainless-const": true
          },
          "input_tokens": {
            "type": "integer"
          }
        },
        "type": "object",
        "required": [
          "object",
          "input_tokens"
        ],
        "title": "Token counts",
        "example": {
          "object": "response.input_tokens",
          "input_tokens": 123
        }
      },
      "CompactResponseMethodPublicBody": {
        "properties": {
          "model": {
            "$ref": "#/components/schemas/ModelIdsCompaction"
          },
          "input": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 10485760,
                    "description": "A text input to the model, equivalent to a text input with the `user` role.",
                    "title": "string"
                  },
                  {
                    "items": {
                      "$ref": "#/components/schemas/InputItem"
                    },
                    "type": "array",
                    "description": "A list of one or many input items to the model, containing different content types.",
                    "title": "array"
                  }
                ],
                "description": "Text, image, or file inputs to the model, used to generate a response"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "previous_response_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.",
                "example": "resp_123",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string",
                "description": "A system (or developer) message inserted into the model's context.\nWhen used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "prompt_cache_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64,
                "description": "A key to use when reading from or writing to the prompt cache.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "prompt_cache_retention": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PromptCacheRetentionEnum",
                "description": "How long to retain a prompt cache entry created by this request."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "service_tier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ServiceTierEnum",
                "description": "The service tier to use for this request."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "model"
        ]
      },
      "CompactResource": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the compacted response."
          },
          "object": {
            "type": "string",
            "enum": [
              "response.compaction"
            ],
            "description": "The object type. Always `response.compaction`.",
            "default": "response.compaction",
            "x-stainless-const": true
          },
          "output": {
            "items": {
              "$ref": "#/components/schemas/ItemField"
            },
            "type": "array",
            "description": "The compacted list of output items."
          },
          "created_at": {
            "type": "integer",
            "format": "unixtime",
            "description": "Unix timestamp (in seconds) when the compacted conversation was created."
          },
          "usage": {
            "$ref": "#/components/schemas/ResponseUsage",
            "description": "Token accounting for the compaction pass, including cached, reasoning, and total tokens."
          }
        },
        "type": "object",
        "required": [
          "id",
          "object",
          "output",
          "created_at",
          "usage"
        ],
        "title": "The compacted response object",
        "example": {
          "id": "cmp_123",
          "object": "response.compaction",
          "output": [
            {
              "type": "message",
              "role": "user",
              "content": [
                {
                  "type": "input_text",
                  "text": "Summarize our plan."
                }
              ]
            },
            {
              "type": "compaction",
              "id": "cmp_item_123",
              "encrypted_content": "encrypted_content"
            }
          ],
          "created_at": 1731459200,
          "usage": {
            "input_tokens": 1200,
            "input_tokens_details": {
              "cached_tokens": 0
            },
            "output_tokens": 300,
            "output_tokens_details": {
              "reasoning_tokens": 0
            },
            "total_tokens": 1500
          }
        }
      },
      "CreateModelResponseProperties": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ModelResponseProperties"
          },
          {
            "type": "object",
            "properties": {
              "top_logprobs": {
                "description": "An integer between 0 and 20 specifying the maximum number of most likely\ntokens to return at each token position, each with an associated log\nprobability. In some cases, the number of returned tokens may be fewer than\nrequested.\n",
                "type": "integer",
                "minimum": 0,
                "maximum": 20
              }
            }
          }
        ]
      },
      "ResponseProperties": {
        "type": "object",
        "properties": {
          "previous_response_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the previous response to the model. Use this to\ncreate multi-turn conversations. Learn more about\n[conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "model": {
            "description": "Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)\nto browse and compare available models.\n",
            "$ref": "#/components/schemas/ModelIdsResponses"
          },
          "reasoning": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Reasoning"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "background": {
            "anyOf": [
              {
                "type": "boolean",
                "description": "Whether to run the model response in the background.\n[Learn more](https://platform.openai.com/docs/guides/background).\n",
                "default": false,
                "title": "boolean"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "max_tool_calls": {
            "anyOf": [
              {
                "description": "The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n",
                "type": "integer",
                "title": "integer"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "text": {
            "$ref": "#/components/schemas/ResponseTextParam"
          },
          "tools": {
            "$ref": "#/components/schemas/ToolsArray"
          },
          "tool_choice": {
            "$ref": "#/components/schemas/ToolChoiceParam"
          },
          "prompt": {
            "$ref": "#/components/schemas/Prompt"
          },
          "truncation": {
            "anyOf": [
              {
                "type": "string",
                "description": "The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n  the model's context window size, the model will truncate the\n  response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n  size for a model, the request will fail with a 400 error.\n",
                "enum": [
                  "auto",
                  "disabled"
                ],
                "default": "disabled",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        }
      },
      "InputParam": {
        "description": "Text, image, or file inputs to the model, used to generate a response.\n\nLearn more:\n- [Text inputs and outputs](https://platform.openai.com/docs/guides/text)\n- [Image inputs](https://platform.openai.com/docs/guides/images)\n- [File inputs](https://platform.openai.com/docs/guides/pdf-files)\n- [Conversation state](https://platform.openai.com/docs/guides/conversation-state)\n- [Function calling](https://platform.openai.com/docs/guides/function-calling)\n",
        "oneOf": [
          {
            "type": "string",
            "title": "Text input",
            "description": "A text input to the model, equivalent to a text input with the\n`user` role.\n"
          },
          {
            "type": "array",
            "title": "Input item list",
            "description": "A list of one or many input items to the model, containing\ndifferent content types.\n",
            "items": {
              "$ref": "#/components/schemas/InputItem"
            }
          }
        ]
      },
      "ResponseStreamOptions": {
        "anyOf": [
          {
            "description": "Options for streaming responses. Only set this when you set `stream: true`.\n",
            "type": "object",
            "default": null,
            "properties": {
              "include_obfuscation": {
                "type": "boolean",
                "description": "When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events to\nnormalize payload sizes as a mitigation to certain side-channel attacks.\nThese obfuscation fields are included by default, but add a small amount\nof overhead to the data stream. You can set `include_obfuscation` to\nfalse to optimize for bandwidth if you trust the network links between\nyour application and the OpenAI API.\n"
              }
            },
            "title": "object"
          },
          {
            "type": "null",
            "title": "null"
          }
        ]
      },
      "ConversationParam": {
        "description": "The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.\nInput items and output items from this response are automatically added to this conversation after this response completes.\n",
        "default": null,
        "oneOf": [
          {
            "type": "string",
            "title": "Conversation ID",
            "description": "The unique ID of the conversation.\n"
          },
          {
            "$ref": "#/components/schemas/ConversationParam-2"
          }
        ]
      },
      "ContextManagementParam": {
        "properties": {
          "type": {
            "type": "string",
            "description": "The context management entry type. Currently only 'compaction' is supported."
          },
          "compact_threshold": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1000,
                "description": "Token threshold at which compaction should be triggered for this entry.",
                "title": "integer"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "ModelResponseProperties": {
        "type": "object",
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "top_logprobs": {
            "anyOf": [
              {
                "description": "An integer between 0 and 20 specifying the maximum number of most likely\ntokens to return at each token position, each with an associated log\nprobability. In some cases, the number of returned tokens may be fewer than\nrequested.\n",
                "type": "integer",
                "minimum": 0,
                "maximum": 20,
                "title": "integer"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 2,
                "default": 1,
                "example": 1,
                "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n",
                "title": "number"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "default": 1,
                "example": 1,
                "description": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n",
                "title": "number"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "user": {
            "type": "string",
            "example": "user-1234",
            "deprecated": true,
            "description": "This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\nA stable identifier for your end-users.\nUsed to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).\n"
          },
          "safety_identifier": {
            "type": "string",
            "maxLength": 64,
            "example": "safety-identifier-1234",
            "description": "A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).\n"
          },
          "prompt_cache_key": {
            "type": "string",
            "example": "prompt-cache-key-1234",
            "description": "Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).\n"
          },
          "service_tier": {
            "$ref": "#/components/schemas/ServiceTier"
          },
          "prompt_cache_retention": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "in_memory",
                  "24h"
                ],
                "description": "The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        }
      },
      "ResponseError": {
        "anyOf": [
          {
            "type": "object",
            "description": "An error object returned when the model fails to generate a Response.\n",
            "properties": {
              "code": {
                "$ref": "#/components/schemas/ResponseErrorCode"
              },
              "message": {
                "type": "string",
                "description": "A human-readable description of the error.\n"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "title": "object"
          },
          {
            "type": "null",
            "title": "null"
          }
        ]
      },
      "OutputItem": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/OutputMessage"
          },
          {
            "$ref": "#/components/schemas/FileSearchToolCall"
          },
          {
            "$ref": "#/components/schemas/FunctionToolCall"
          },
          {
            "$ref": "#/components/schemas/FunctionToolCallOutputResource"
          },
          {
            "$ref": "#/components/schemas/WebSearchToolCall"
          },
          {
            "$ref": "#/components/schemas/ComputerToolCall"
          },
          {
            "$ref": "#/components/schemas/ComputerToolCallOutputResource"
          },
          {
            "$ref": "#/components/schemas/ReasoningItem"
          },
          {
            "$ref": "#/components/schemas/ToolSearchCall"
          },
          {
            "$ref": "#/components/schemas/ToolSearchOutput"
          },
          {
            "$ref": "#/components/schemas/CompactionBody"
          },
          {
            "$ref": "#/components/schemas/ImageGenToolCall"
          },
          {
            "$ref": "#/components/schemas/CodeInterpreterToolCall"
          },
          {
            "$ref": "#/components/schemas/LocalShellToolCall"
          },
          {
            "$ref": "#/components/schemas/LocalShellToolCallOutput"
          },
          {
            "$ref": "#/components/schemas/FunctionShellCall"
          },
          {
            "$ref": "#/components/schemas/FunctionShellCallOutput"
          },
          {
            "$ref": "#/components/schemas/ApplyPatchToolCall"
          },
          {
            "$ref": "#/components/schemas/ApplyPatchToolCallOutput"
          },
          {
            "$ref": "#/components/schemas/MCPToolCall"
          },
          {
            "$ref": "#/components/schemas/MCPListTools"
          },
          {
            "$ref": "#/components/schemas/MCPApprovalRequest"
          },
          {
            "$ref": "#/components/schemas/MCPApprovalResponseResource"
          },
          {
            "$ref": "#/components/schemas/CustomToolCall"
          },
          {
            "$ref": "#/components/schemas/CustomToolCallOutputResource"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "InputItem": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/EasyInputMessage"
          },
          {
            "type": "object",
            "title": "Item",
            "description": "An item representing part of the context for the response to be\ngenerated by the model. Can contain text, images, and audio inputs,\nas well as previous assistant responses and tool call outputs.\n",
            "$ref": "#/components/schemas/Item"
          },
          {
            "$ref": "#/components/schemas/ItemReferenceParam"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "ResponseUsage": {
        "type": "object",
        "description": "Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.\n",
        "properties": {
          "input_tokens": {
            "type": "integer",
            "description": "The number of input tokens."
          },
          "input_tokens_details": {
            "type": "object",
            "description": "A detailed breakdown of the input tokens.",
            "properties": {
              "cached_tokens": {
                "type": "integer",
                "description": "The number of tokens that were retrieved from the cache. \n[More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).\n"
              }
            },
            "required": [
              "cached_tokens"
            ]
          },
          "output_tokens": {
            "type": "integer",
            "description": "The number of output tokens."
          },
          "output_tokens_details": {
            "type": "object",
            "description": "A detailed breakdown of the output tokens.",
            "properties": {
              "reasoning_tokens": {
                "type": "integer",
                "description": "The number of reasoning tokens."
              }
            },
            "required": [
              "reasoning_tokens"
            ]
          },
          "total_tokens": {
            "type": "integer",
            "description": "The total number of tokens used."
          }
        },
        "required": [
          "input_tokens",
          "input_tokens_details",
          "output_tokens",
          "output_tokens_details",
          "total_tokens"
        ]
      },
      "Conversation-2": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID of the conversation that this response was associated with."
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "Conversation",
        "description": "The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation."
      },
      "ResponseAudioDeltaEvent": {
        "type": "object",
        "description": "Emitted when there is a partial audio response.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.audio.delta`.\n",
            "enum": [
              "response.audio.delta"
            ],
            "x-stainless-const": true
          },
          "sequence_number": {
            "type": "integer",
            "description": "A sequence number for this chunk of the stream response.\n"
          },
          "delta": {
            "type": "string",
            "description": "A chunk of Base64 encoded response audio bytes.\n"
          }
        },
        "required": [
          "type",
          "delta",
          "sequence_number"
        ]
      },
      "ResponseAudioDoneEvent": {
        "type": "object",
        "description": "Emitted when the audio response is complete.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.audio.done`.\n",
            "enum": [
              "response.audio.done"
            ],
            "x-stainless-const": true
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of the delta.\n"
          }
        },
        "required": [
          "type",
          "sequence_number",
          "response_id"
        ]
      },
      "ResponseAudioTranscriptDeltaEvent": {
        "type": "object",
        "description": "Emitted when there is a partial transcript of audio.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.audio.transcript.delta`.\n",
            "enum": [
              "response.audio.transcript.delta"
            ],
            "x-stainless-const": true
          },
          "delta": {
            "type": "string",
            "description": "The partial transcript of the audio response.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "response_id",
          "delta",
          "sequence_number"
        ]
      },
      "ResponseAudioTranscriptDoneEvent": {
        "type": "object",
        "description": "Emitted when the full audio transcript is completed.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.audio.transcript.done`.\n",
            "enum": [
              "response.audio.transcript.done"
            ],
            "x-stainless-const": true
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "response_id",
          "sequence_number"
        ]
      },
      "ResponseCodeInterpreterCallCodeDeltaEvent": {
        "type": "object",
        "description": "Emitted when a partial code snippet is streamed by the code interpreter.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.code_interpreter_call_code.delta`.",
            "enum": [
              "response.code_interpreter_call_code.delta"
            ],
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item in the response for which the code is being streamed."
          },
          "item_id": {
            "type": "string",
            "description": "The unique identifier of the code interpreter tool call item."
          },
          "delta": {
            "type": "string",
            "description": "The partial code snippet being streamed by the code interpreter."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event, used to order streaming events."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "delta",
          "sequence_number"
        ]
      },
      "ResponseCodeInterpreterCallCodeDoneEvent": {
        "type": "object",
        "description": "Emitted when the code snippet is finalized by the code interpreter.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.code_interpreter_call_code.done`.",
            "enum": [
              "response.code_interpreter_call_code.done"
            ],
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item in the response for which the code is finalized."
          },
          "item_id": {
            "type": "string",
            "description": "The unique identifier of the code interpreter tool call item."
          },
          "code": {
            "type": "string",
            "description": "The final code snippet output by the code interpreter."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event, used to order streaming events."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "code",
          "sequence_number"
        ]
      },
      "ResponseCodeInterpreterCallCompletedEvent": {
        "type": "object",
        "description": "Emitted when the code interpreter call is completed.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.code_interpreter_call.completed`.",
            "enum": [
              "response.code_interpreter_call.completed"
            ],
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item in the response for which the code interpreter call is completed."
          },
          "item_id": {
            "type": "string",
            "description": "The unique identifier of the code interpreter tool call item."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event, used to order streaming events."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number"
        ]
      },
      "ResponseCodeInterpreterCallInProgressEvent": {
        "type": "object",
        "description": "Emitted when a code interpreter call is in progress.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.code_interpreter_call.in_progress`.",
            "enum": [
              "response.code_interpreter_call.in_progress"
            ],
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item in the response for which the code interpreter call is in progress."
          },
          "item_id": {
            "type": "string",
            "description": "The unique identifier of the code interpreter tool call item."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event, used to order streaming events."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number"
        ]
      },
      "ResponseCodeInterpreterCallInterpretingEvent": {
        "type": "object",
        "description": "Emitted when the code interpreter is actively interpreting the code snippet.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.code_interpreter_call.interpreting`.",
            "enum": [
              "response.code_interpreter_call.interpreting"
            ],
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item in the response for which the code interpreter is interpreting code."
          },
          "item_id": {
            "type": "string",
            "description": "The unique identifier of the code interpreter tool call item."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event, used to order streaming events."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number"
        ]
      },
      "ResponseCompletedEvent": {
        "type": "object",
        "description": "Emitted when the model response is complete.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.completed`.\n",
            "enum": [
              "response.completed"
            ],
            "x-stainless-const": true
          },
          "response": {
            "$ref": "#/components/schemas/Response",
            "description": "Properties of the completed response.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number for this event."
          }
        },
        "required": [
          "type",
          "response",
          "sequence_number"
        ]
      },
      "ResponseContentPartAddedEvent": {
        "type": "object",
        "description": "Emitted when a new content part is added.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.content_part.added`.\n",
            "enum": [
              "response.content_part.added"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the output item that the content part was added to.\n"
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that the content part was added to.\n"
          },
          "content_index": {
            "type": "integer",
            "description": "The index of the content part that was added.\n"
          },
          "part": {
            "$ref": "#/components/schemas/OutputContent",
            "description": "The content part that was added.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "content_index",
          "part",
          "sequence_number"
        ]
      },
      "ResponseContentPartDoneEvent": {
        "type": "object",
        "description": "Emitted when a content part is done.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.content_part.done`.\n",
            "enum": [
              "response.content_part.done"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the output item that the content part was added to.\n"
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that the content part was added to.\n"
          },
          "content_index": {
            "type": "integer",
            "description": "The index of the content part that is done.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          },
          "part": {
            "$ref": "#/components/schemas/OutputContent",
            "description": "The content part that is done.\n"
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "content_index",
          "part",
          "sequence_number"
        ]
      },
      "ResponseCreatedEvent": {
        "type": "object",
        "description": "An event that is emitted when a response is created.\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.created`.\n",
            "enum": [
              "response.created"
            ],
            "x-stainless-const": true
          },
          "response": {
            "$ref": "#/components/schemas/Response",
            "description": "The response that was created.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number for this event."
          }
        },
        "required": [
          "type",
          "response",
          "sequence_number"
        ]
      },
      "ResponseErrorEvent": {
        "type": "object",
        "description": "Emitted when an error occurs.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `error`.\n",
            "enum": [
              "error"
            ],
            "x-stainless-const": true
          },
          "code": {
            "anyOf": [
              {
                "type": "string",
                "description": "The error code.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "message": {
            "type": "string",
            "description": "The error message.\n"
          },
          "param": {
            "anyOf": [
              {
                "type": "string",
                "description": "The error parameter.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "code",
          "message",
          "param",
          "sequence_number"
        ]
      },
      "ResponseFileSearchCallCompletedEvent": {
        "type": "object",
        "description": "Emitted when a file search call is completed (results found).",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.file_search_call.completed`.\n",
            "enum": [
              "response.file_search_call.completed"
            ],
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that the file search call is initiated.\n"
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the output item that the file search call is initiated.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number"
        ]
      },
      "ResponseFileSearchCallInProgressEvent": {
        "type": "object",
        "description": "Emitted when a file search call is initiated.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.file_search_call.in_progress`.\n",
            "enum": [
              "response.file_search_call.in_progress"
            ],
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that the file search call is initiated.\n"
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the output item that the file search call is initiated.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number"
        ]
      },
      "ResponseFileSearchCallSearchingEvent": {
        "type": "object",
        "description": "Emitted when a file search is currently searching.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.file_search_call.searching`.\n",
            "enum": [
              "response.file_search_call.searching"
            ],
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that the file search call is searching.\n"
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the output item that the file search call is initiated.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number"
        ]
      },
      "ResponseFunctionCallArgumentsDeltaEvent": {
        "type": "object",
        "description": "Emitted when there is a partial function-call arguments delta.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.function_call_arguments.delta`.\n",
            "enum": [
              "response.function_call_arguments.delta"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the output item that the function-call arguments delta is added to.\n"
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that the function-call arguments delta is added to.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          },
          "delta": {
            "type": "string",
            "description": "The function-call arguments delta that is added.\n"
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "delta",
          "sequence_number"
        ]
      },
      "ResponseFunctionCallArgumentsDoneEvent": {
        "type": "object",
        "description": "Emitted when function-call arguments are finalized.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.function_call_arguments.done"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the item."
          },
          "name": {
            "type": "string",
            "description": "The name of the function that was called."
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          },
          "arguments": {
            "type": "string",
            "description": "The function-call arguments."
          }
        },
        "required": [
          "type",
          "item_id",
          "name",
          "output_index",
          "arguments",
          "sequence_number"
        ]
      },
      "ResponseInProgressEvent": {
        "type": "object",
        "description": "Emitted when the response is in progress.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.in_progress`.\n",
            "enum": [
              "response.in_progress"
            ],
            "x-stainless-const": true
          },
          "response": {
            "$ref": "#/components/schemas/Response",
            "description": "The response that is in progress.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "response",
          "sequence_number"
        ]
      },
      "ResponseFailedEvent": {
        "type": "object",
        "description": "An event that is emitted when a response fails.\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.failed`.\n",
            "enum": [
              "response.failed"
            ],
            "x-stainless-const": true
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          },
          "response": {
            "$ref": "#/components/schemas/Response",
            "description": "The response that failed.\n"
          }
        },
        "required": [
          "type",
          "response",
          "sequence_number"
        ]
      },
      "ResponseIncompleteEvent": {
        "type": "object",
        "description": "An event that is emitted when a response finishes as incomplete.\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.incomplete`.\n",
            "enum": [
              "response.incomplete"
            ],
            "x-stainless-const": true
          },
          "response": {
            "$ref": "#/components/schemas/Response",
            "description": "The response that was incomplete.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "response",
          "sequence_number"
        ]
      },
      "ResponseOutputItemAddedEvent": {
        "type": "object",
        "description": "Emitted when a new output item is added.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.output_item.added`.\n",
            "enum": [
              "response.output_item.added"
            ],
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that was added.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event.\n"
          },
          "item": {
            "$ref": "#/components/schemas/OutputItem",
            "description": "The output item that was added.\n"
          }
        },
        "required": [
          "type",
          "output_index",
          "item",
          "sequence_number"
        ]
      },
      "ResponseOutputItemDoneEvent": {
        "type": "object",
        "description": "Emitted when an output item is marked done.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.output_item.done`.\n",
            "enum": [
              "response.output_item.done"
            ],
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that was marked done.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event.\n"
          },
          "item": {
            "$ref": "#/components/schemas/OutputItem",
            "description": "The output item that was marked done.\n"
          }
        },
        "required": [
          "type",
          "output_index",
          "item",
          "sequence_number"
        ]
      },
      "ResponseReasoningSummaryPartAddedEvent": {
        "type": "object",
        "description": "Emitted when a new reasoning summary part is added.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.reasoning_summary_part.added`.\n",
            "enum": [
              "response.reasoning_summary_part.added"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the item this summary part is associated with.\n"
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item this summary part is associated with.\n"
          },
          "summary_index": {
            "type": "integer",
            "description": "The index of the summary part within the reasoning summary.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event.\n"
          },
          "part": {
            "type": "object",
            "description": "The summary part that was added.\n",
            "properties": {
              "type": {
                "type": "string",
                "description": "The type of the summary part. Always `summary_text`.",
                "enum": [
                  "summary_text"
                ],
                "x-stainless-const": true
              },
              "text": {
                "type": "string",
                "description": "The text of the summary part."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "summary_index",
          "part",
          "sequence_number"
        ]
      },
      "ResponseReasoningSummaryPartDoneEvent": {
        "type": "object",
        "description": "Emitted when a reasoning summary part is completed.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.reasoning_summary_part.done`.\n",
            "enum": [
              "response.reasoning_summary_part.done"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the item this summary part is associated with.\n"
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item this summary part is associated with.\n"
          },
          "summary_index": {
            "type": "integer",
            "description": "The index of the summary part within the reasoning summary.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event.\n"
          },
          "part": {
            "type": "object",
            "description": "The completed summary part.\n",
            "properties": {
              "type": {
                "type": "string",
                "description": "The type of the summary part. Always `summary_text`.",
                "enum": [
                  "summary_text"
                ],
                "x-stainless-const": true
              },
              "text": {
                "type": "string",
                "description": "The text of the summary part."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "summary_index",
          "part",
          "sequence_number"
        ]
      },
      "ResponseReasoningSummaryTextDeltaEvent": {
        "type": "object",
        "description": "Emitted when a delta is added to a reasoning summary text.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.reasoning_summary_text.delta`.\n",
            "enum": [
              "response.reasoning_summary_text.delta"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the item this summary text delta is associated with.\n"
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item this summary text delta is associated with.\n"
          },
          "summary_index": {
            "type": "integer",
            "description": "The index of the summary part within the reasoning summary.\n"
          },
          "delta": {
            "type": "string",
            "description": "The text delta that was added to the summary.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event.\n"
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "summary_index",
          "delta",
          "sequence_number"
        ]
      },
      "ResponseReasoningSummaryTextDoneEvent": {
        "type": "object",
        "description": "Emitted when a reasoning summary text is completed.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.reasoning_summary_text.done`.\n",
            "enum": [
              "response.reasoning_summary_text.done"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the item this summary text is associated with.\n"
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item this summary text is associated with.\n"
          },
          "summary_index": {
            "type": "integer",
            "description": "The index of the summary part within the reasoning summary.\n"
          },
          "text": {
            "type": "string",
            "description": "The full text of the completed reasoning summary.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event.\n"
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "summary_index",
          "text",
          "sequence_number"
        ]
      },
      "ResponseReasoningTextDeltaEvent": {
        "type": "object",
        "description": "Emitted when a delta is added to a reasoning text.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.reasoning_text.delta`.\n",
            "enum": [
              "response.reasoning_text.delta"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the item this reasoning text delta is associated with.\n"
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item this reasoning text delta is associated with.\n"
          },
          "content_index": {
            "type": "integer",
            "description": "The index of the reasoning content part this delta is associated with.\n"
          },
          "delta": {
            "type": "string",
            "description": "The text delta that was added to the reasoning content.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event.\n"
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "content_index",
          "delta",
          "sequence_number"
        ]
      },
      "ResponseReasoningTextDoneEvent": {
        "type": "object",
        "description": "Emitted when a reasoning text is completed.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.reasoning_text.done`.\n",
            "enum": [
              "response.reasoning_text.done"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the item this reasoning text is associated with.\n"
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item this reasoning text is associated with.\n"
          },
          "content_index": {
            "type": "integer",
            "description": "The index of the reasoning content part.\n"
          },
          "text": {
            "type": "string",
            "description": "The full text of the completed reasoning content.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event.\n"
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "content_index",
          "text",
          "sequence_number"
        ]
      },
      "ResponseRefusalDeltaEvent": {
        "type": "object",
        "description": "Emitted when there is a partial refusal text.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.refusal.delta`.\n",
            "enum": [
              "response.refusal.delta"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the output item that the refusal text is added to.\n"
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that the refusal text is added to.\n"
          },
          "content_index": {
            "type": "integer",
            "description": "The index of the content part that the refusal text is added to.\n"
          },
          "delta": {
            "type": "string",
            "description": "The refusal text that is added.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event.\n"
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "content_index",
          "delta",
          "sequence_number"
        ]
      },
      "ResponseRefusalDoneEvent": {
        "type": "object",
        "description": "Emitted when refusal text is finalized.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.refusal.done`.\n",
            "enum": [
              "response.refusal.done"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the output item that the refusal text is finalized.\n"
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that the refusal text is finalized.\n"
          },
          "content_index": {
            "type": "integer",
            "description": "The index of the content part that the refusal text is finalized.\n"
          },
          "refusal": {
            "type": "string",
            "description": "The refusal text that is finalized.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event.\n"
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "content_index",
          "refusal",
          "sequence_number"
        ]
      },
      "ResponseTextDeltaEvent": {
        "type": "object",
        "description": "Emitted when there is an additional text delta.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.output_text.delta`.\n",
            "enum": [
              "response.output_text.delta"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the output item that the text delta was added to.\n"
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that the text delta was added to.\n"
          },
          "content_index": {
            "type": "integer",
            "description": "The index of the content part that the text delta was added to.\n"
          },
          "delta": {
            "type": "string",
            "description": "The text delta that was added.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number for this event."
          },
          "logprobs": {
            "type": "array",
            "description": "The log probabilities of the tokens in the delta.\n",
            "items": {
              "$ref": "#/components/schemas/ResponseLogProb"
            }
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "content_index",
          "delta",
          "sequence_number",
          "logprobs"
        ]
      },
      "ResponseTextDoneEvent": {
        "type": "object",
        "description": "Emitted when text content is finalized.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.output_text.done`.\n",
            "enum": [
              "response.output_text.done"
            ],
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the output item that the text content is finalized.\n"
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that the text content is finalized.\n"
          },
          "content_index": {
            "type": "integer",
            "description": "The index of the content part that the text content is finalized.\n"
          },
          "text": {
            "type": "string",
            "description": "The text content that is finalized.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number for this event."
          },
          "logprobs": {
            "type": "array",
            "description": "The log probabilities of the tokens in the delta.\n",
            "items": {
              "$ref": "#/components/schemas/ResponseLogProb"
            }
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "content_index",
          "text",
          "sequence_number",
          "logprobs"
        ]
      },
      "ResponseWebSearchCallCompletedEvent": {
        "type": "object",
        "description": "Emitted when a web search call is completed.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.web_search_call.completed`.\n",
            "enum": [
              "response.web_search_call.completed"
            ],
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that the web search call is associated with.\n"
          },
          "item_id": {
            "type": "string",
            "description": "Unique ID for the output item associated with the web search call.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of the web search call being processed."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number"
        ]
      },
      "ResponseWebSearchCallInProgressEvent": {
        "type": "object",
        "description": "Emitted when a web search call is initiated.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.web_search_call.in_progress`.\n",
            "enum": [
              "response.web_search_call.in_progress"
            ],
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that the web search call is associated with.\n"
          },
          "item_id": {
            "type": "string",
            "description": "Unique ID for the output item associated with the web search call.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of the web search call being processed."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number"
        ]
      },
      "ResponseWebSearchCallSearchingEvent": {
        "type": "object",
        "description": "Emitted when a web search call is executing.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the event. Always `response.web_search_call.searching`.\n",
            "enum": [
              "response.web_search_call.searching"
            ],
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that the web search call is associated with.\n"
          },
          "item_id": {
            "type": "string",
            "description": "Unique ID for the output item associated with the web search call.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of the web search call being processed."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number"
        ]
      },
      "ResponseImageGenCallCompletedEvent": {
        "type": "object",
        "title": "ResponseImageGenCallCompletedEvent",
        "description": "Emitted when an image generation tool call has completed and the final image is available.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.image_generation_call.completed"
            ],
            "description": "The type of the event. Always 'response.image_generation_call.completed'.",
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item in the response's output array."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          },
          "item_id": {
            "type": "string",
            "description": "The unique identifier of the image generation item being processed."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number"
        ]
      },
      "ResponseImageGenCallGeneratingEvent": {
        "type": "object",
        "title": "ResponseImageGenCallGeneratingEvent",
        "description": "Emitted when an image generation tool call is actively generating an image (intermediate state).\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.image_generation_call.generating"
            ],
            "description": "The type of the event. Always 'response.image_generation_call.generating'.",
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item in the response's output array."
          },
          "item_id": {
            "type": "string",
            "description": "The unique identifier of the image generation item being processed."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of the image generation item being processed."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number"
        ]
      },
      "ResponseImageGenCallInProgressEvent": {
        "type": "object",
        "title": "ResponseImageGenCallInProgressEvent",
        "description": "Emitted when an image generation tool call is in progress.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.image_generation_call.in_progress"
            ],
            "description": "The type of the event. Always 'response.image_generation_call.in_progress'.",
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item in the response's output array."
          },
          "item_id": {
            "type": "string",
            "description": "The unique identifier of the image generation item being processed."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of the image generation item being processed."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number"
        ]
      },
      "ResponseImageGenCallPartialImageEvent": {
        "type": "object",
        "title": "ResponseImageGenCallPartialImageEvent",
        "description": "Emitted when a partial image is available during image generation streaming.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.image_generation_call.partial_image"
            ],
            "description": "The type of the event. Always 'response.image_generation_call.partial_image'.",
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item in the response's output array."
          },
          "item_id": {
            "type": "string",
            "description": "The unique identifier of the image generation item being processed."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of the image generation item being processed."
          },
          "partial_image_index": {
            "type": "integer",
            "description": "0-based index for the partial image (backend is 1-based, but this is 0-based for the user)."
          },
          "partial_image_b64": {
            "type": "string",
            "description": "Base64-encoded partial image data, suitable for rendering as an image."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number",
          "partial_image_index",
          "partial_image_b64"
        ]
      },
      "ResponseMCPCallArgumentsDeltaEvent": {
        "type": "object",
        "title": "ResponseMCPCallArgumentsDeltaEvent",
        "description": "Emitted when there is a delta (partial update) to the arguments of an MCP tool call.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.mcp_call_arguments.delta"
            ],
            "description": "The type of the event. Always 'response.mcp_call_arguments.delta'.",
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item in the response's output array."
          },
          "item_id": {
            "type": "string",
            "description": "The unique identifier of the MCP tool call item being processed."
          },
          "delta": {
            "type": "string",
            "description": "A JSON string containing the partial update to the arguments for the MCP tool call.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "delta",
          "sequence_number"
        ]
      },
      "ResponseMCPCallArgumentsDoneEvent": {
        "type": "object",
        "title": "ResponseMCPCallArgumentsDoneEvent",
        "description": "Emitted when the arguments for an MCP tool call are finalized.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.mcp_call_arguments.done"
            ],
            "description": "The type of the event. Always 'response.mcp_call_arguments.done'.",
            "x-stainless-const": true
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item in the response's output array."
          },
          "item_id": {
            "type": "string",
            "description": "The unique identifier of the MCP tool call item being processed."
          },
          "arguments": {
            "type": "string",
            "description": "A JSON string containing the finalized arguments for the MCP tool call.\n"
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "arguments",
          "sequence_number"
        ]
      },
      "ResponseMCPCallCompletedEvent": {
        "type": "object",
        "title": "ResponseMCPCallCompletedEvent",
        "description": "Emitted when an MCP  tool call has completed successfully.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.mcp_call.completed"
            ],
            "description": "The type of the event. Always 'response.mcp_call.completed'.",
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the MCP tool call item that completed."
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that completed."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "sequence_number"
        ]
      },
      "ResponseMCPCallFailedEvent": {
        "type": "object",
        "title": "ResponseMCPCallFailedEvent",
        "description": "Emitted when an MCP  tool call has failed.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.mcp_call.failed"
            ],
            "description": "The type of the event. Always 'response.mcp_call.failed'.",
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the MCP tool call item that failed."
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that failed."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "sequence_number"
        ]
      },
      "ResponseMCPCallInProgressEvent": {
        "type": "object",
        "title": "ResponseMCPCallInProgressEvent",
        "description": "Emitted when an MCP  tool call is in progress.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.mcp_call.in_progress"
            ],
            "description": "The type of the event. Always 'response.mcp_call.in_progress'.",
            "x-stainless-const": true
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item in the response's output array."
          },
          "item_id": {
            "type": "string",
            "description": "The unique identifier of the MCP tool call item being processed."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "sequence_number"
        ]
      },
      "ResponseMCPListToolsCompletedEvent": {
        "type": "object",
        "title": "ResponseMCPListToolsCompletedEvent",
        "description": "Emitted when the list of available MCP tools has been successfully retrieved.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.mcp_list_tools.completed"
            ],
            "description": "The type of the event. Always 'response.mcp_list_tools.completed'.",
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the MCP tool call item that produced this output."
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that was processed."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "sequence_number"
        ]
      },
      "ResponseMCPListToolsFailedEvent": {
        "type": "object",
        "title": "ResponseMCPListToolsFailedEvent",
        "description": "Emitted when the attempt to list available MCP tools has failed.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.mcp_list_tools.failed"
            ],
            "description": "The type of the event. Always 'response.mcp_list_tools.failed'.",
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the MCP tool call item that failed."
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that failed."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "sequence_number"
        ]
      },
      "ResponseMCPListToolsInProgressEvent": {
        "type": "object",
        "title": "ResponseMCPListToolsInProgressEvent",
        "description": "Emitted when the system is in the process of retrieving the list of available MCP tools.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.mcp_list_tools.in_progress"
            ],
            "description": "The type of the event. Always 'response.mcp_list_tools.in_progress'.",
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The ID of the MCP tool call item that is being processed."
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item that is being processed."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "sequence_number"
        ]
      },
      "ResponseOutputTextAnnotationAddedEvent": {
        "type": "object",
        "title": "ResponseOutputTextAnnotationAddedEvent",
        "description": "Emitted when an annotation is added to output text content.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.output_text.annotation.added"
            ],
            "description": "The type of the event. Always 'response.output_text.annotation.added'.",
            "x-stainless-const": true
          },
          "item_id": {
            "type": "string",
            "description": "The unique identifier of the item to which the annotation is being added."
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output item in the response's output array."
          },
          "content_index": {
            "type": "integer",
            "description": "The index of the content part within the output item."
          },
          "annotation_index": {
            "type": "integer",
            "description": "The index of the annotation within the content part."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          },
          "annotation": {
            "type": "object",
            "description": "The annotation object being added. (See annotation schema for details.)"
          }
        },
        "required": [
          "type",
          "item_id",
          "output_index",
          "content_index",
          "annotation_index",
          "annotation",
          "sequence_number"
        ]
      },
      "ResponseQueuedEvent": {
        "type": "object",
        "title": "ResponseQueuedEvent",
        "description": "Emitted when a response is queued and waiting to be processed.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.queued"
            ],
            "description": "The type of the event. Always 'response.queued'.",
            "x-stainless-const": true
          },
          "response": {
            "$ref": "#/components/schemas/Response",
            "description": "The full response object that is queued."
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number for this event."
          }
        },
        "required": [
          "type",
          "response",
          "sequence_number"
        ]
      },
      "ResponseCustomToolCallInputDeltaEvent": {
        "title": "ResponseCustomToolCallInputDelta",
        "type": "object",
        "description": "Event representing a delta (partial update) to the input of a custom tool call.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.custom_tool_call_input.delta"
            ],
            "description": "The event type identifier.",
            "x-stainless-const": true
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output this delta applies to."
          },
          "item_id": {
            "type": "string",
            "description": "Unique identifier for the API item associated with this event."
          },
          "delta": {
            "type": "string",
            "description": "The incremental input data (delta) for the custom tool call."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "delta",
          "sequence_number"
        ]
      },
      "ResponseCustomToolCallInputDoneEvent": {
        "title": "ResponseCustomToolCallInputDone",
        "type": "object",
        "description": "Event indicating that input for a custom tool call is complete.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "response.custom_tool_call_input.done"
            ],
            "description": "The event type identifier.",
            "x-stainless-const": true
          },
          "sequence_number": {
            "type": "integer",
            "description": "The sequence number of this event."
          },
          "output_index": {
            "type": "integer",
            "description": "The index of the output this event applies to."
          },
          "item_id": {
            "type": "string",
            "description": "Unique identifier for the API item associated with this event."
          },
          "input": {
            "type": "string",
            "description": "The complete input data for the custom tool call."
          }
        },
        "required": [
          "type",
          "output_index",
          "item_id",
          "input",
          "sequence_number"
        ]
      },
      "Tool": {
        "description": "A tool that can be used to generate a response.\n",
        "discriminator": {
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/FunctionTool"
          },
          {
            "$ref": "#/components/schemas/FileSearchTool"
          },
          {
            "$ref": "#/components/schemas/ComputerTool"
          },
          {
            "$ref": "#/components/schemas/ComputerUsePreviewTool"
          },
          {
            "$ref": "#/components/schemas/WebSearchTool"
          },
          {
            "$ref": "#/components/schemas/MCPTool"
          },
          {
            "$ref": "#/components/schemas/CodeInterpreterTool"
          },
          {
            "$ref": "#/components/schemas/ImageGenTool"
          },
          {
            "$ref": "#/components/schemas/LocalShellToolParam"
          },
          {
            "$ref": "#/components/schemas/FunctionShellToolParam"
          },
          {
            "$ref": "#/components/schemas/CustomToolParam"
          },
          {
            "$ref": "#/components/schemas/NamespaceToolParam"
          },
          {
            "$ref": "#/components/schemas/ToolSearchToolParam"
          },
          {
            "$ref": "#/components/schemas/WebSearchPreviewTool"
          },
          {
            "$ref": "#/components/schemas/ApplyPatchToolParam"
          }
        ]
      },
      "ResponseTextParam": {
        "type": "object",
        "description": "Configuration options for a text response from the model. Can be plain\ntext or structured JSON data. Learn more:\n- [Text inputs and outputs](https://platform.openai.com/docs/guides/text)\n- [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)\n",
        "properties": {
          "format": {
            "$ref": "#/components/schemas/TextResponseFormatConfiguration"
          },
          "verbosity": {
            "$ref": "#/components/schemas/Verbosity"
          }
        }
      },
      "Reasoning": {
        "type": "object",
        "description": "**gpt-5 and o-series models only**\n\nConfiguration options for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).\n",
        "title": "Reasoning",
        "properties": {
          "effort": {
            "$ref": "#/components/schemas/ReasoningEffort"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string",
                "description": "A summary of the reasoning performed by the model. This can be\nuseful for debugging and understanding the model's reasoning process.\nOne of `auto`, `concise`, or `detailed`.\n\n`concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.\n",
                "enum": [
                  "auto",
                  "concise",
                  "detailed"
                ],
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "generate_summary": {
            "anyOf": [
              {
                "type": "string",
                "deprecated": true,
                "description": "**Deprecated:** use `summary` instead.\n\nA summary of the reasoning performed by the model. This can be\nuseful for debugging and understanding the model's reasoning process.\nOne of `auto`, `concise`, or `detailed`.\n",
                "enum": [
                  "auto",
                  "concise",
                  "detailed"
                ],
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        }
      },
      "TruncationEnum": {
        "type": "string",
        "enum": [
          "auto",
          "disabled"
        ]
      },
      "ToolChoiceParam": {
        "description": "How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call.\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/ToolChoiceOptions"
          },
          {
            "$ref": "#/components/schemas/ToolChoiceAllowed"
          },
          {
            "$ref": "#/components/schemas/ToolChoiceTypes"
          },
          {
            "$ref": "#/components/schemas/ToolChoiceFunction"
          },
          {
            "$ref": "#/components/schemas/ToolChoiceMCP"
          },
          {
            "$ref": "#/components/schemas/ToolChoiceCustom"
          },
          {
            "$ref": "#/components/schemas/SpecificApplyPatchParam"
          },
          {
            "$ref": "#/components/schemas/SpecificFunctionShellParam"
          }
        ]
      },
      "ModelIdsCompaction": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ModelIdsResponses"
          },
          {
            "type": "string",
            "title": "string"
          },
          {
            "type": "null",
            "title": "null"
          }
        ],
        "description": "Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models."
      },
      "PromptCacheRetentionEnum": {
        "type": "string",
        "enum": [
          "in_memory",
          "24h"
        ]
      },
      "ServiceTierEnum": {
        "type": "string",
        "enum": [
          "auto",
          "default",
          "flex",
          "priority"
        ]
      },
      "ItemField": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/Message"
          },
          {
            "$ref": "#/components/schemas/FunctionToolCall"
          },
          {
            "$ref": "#/components/schemas/ToolSearchCall"
          },
          {
            "$ref": "#/components/schemas/ToolSearchOutput"
          },
          {
            "$ref": "#/components/schemas/FunctionToolCallOutput"
          },
          {
            "$ref": "#/components/schemas/FileSearchToolCall"
          },
          {
            "$ref": "#/components/schemas/WebSearchToolCall"
          },
          {
            "$ref": "#/components/schemas/ImageGenToolCall"
          },
          {
            "$ref": "#/components/schemas/ComputerToolCall"
          },
          {
            "$ref": "#/components/schemas/ComputerToolCallOutputResource"
          },
          {
            "$ref": "#/components/schemas/ReasoningItem"
          },
          {
            "$ref": "#/components/schemas/CompactionBody"
          },
          {
            "$ref": "#/components/schemas/CodeInterpreterToolCall"
          },
          {
            "$ref": "#/components/schemas/LocalShellToolCall",
            "deprecated": true
          },
          {
            "$ref": "#/components/schemas/LocalShellToolCallOutput",
            "deprecated": true
          },
          {
            "$ref": "#/components/schemas/FunctionShellCall"
          },
          {
            "$ref": "#/components/schemas/FunctionShellCallOutput"
          },
          {
            "$ref": "#/components/schemas/ApplyPatchToolCall"
          },
          {
            "$ref": "#/components/schemas/ApplyPatchToolCallOutput"
          },
          {
            "$ref": "#/components/schemas/MCPListTools"
          },
          {
            "$ref": "#/components/schemas/MCPApprovalRequest"
          },
          {
            "$ref": "#/components/schemas/MCPApprovalResponseResource"
          },
          {
            "$ref": "#/components/schemas/MCPToolCall"
          },
          {
            "$ref": "#/components/schemas/CustomToolCall"
          },
          {
            "$ref": "#/components/schemas/CustomToolCallOutput"
          }
        ],
        "description": "An item representing a message, tool call, tool output, reasoning, or other response element.",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "ModelIdsResponses": {
        "example": "gpt-5.1",
        "anyOf": [
          {
            "$ref": "#/components/schemas/ModelIdsShared"
          },
          {
            "type": "string",
            "title": "ResponsesOnlyModel",
            "enum": [
              "o1-pro",
              "o1-pro-2025-03-19",
              "o3-pro",
              "o3-pro-2025-06-10",
              "o3-deep-research",
              "o3-deep-research-2025-06-26",
              "o4-mini-deep-research",
              "o4-mini-deep-research-2025-06-26",
              "computer-use-preview",
              "computer-use-preview-2025-03-11",
              "gpt-5-codex",
              "gpt-5-pro",
              "gpt-5-pro-2025-10-06",
              "gpt-5.1-codex-max"
            ]
          }
        ]
      },
      "ToolsArray": {
        "type": "array",
        "description": "An array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter.\n\nWe support the following categories of tools:\n- **Built-in tools**: Tools that are provided by OpenAI that extend the\n  model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)\n  or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about\n  [built-in tools](https://platform.openai.com/docs/guides/tools).\n- **MCP Tools**: Integrations with third-party systems via custom MCP servers\n  or predefined connectors such as Google Drive and SharePoint. Learn more about\n  [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).\n- **Function calls (custom tools)**: Functions that are defined by you,\n  enabling the model to call your own code with strongly typed arguments\n  and outputs. Learn more about\n  [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use\n  custom tools to call your own code.\n",
        "items": {
          "$ref": "#/components/schemas/Tool"
        }
      },
      "Prompt": {
        "anyOf": [
          {
            "type": "object",
            "description": "Reference to a prompt template and its variables.\n[Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).\n",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique identifier of the prompt template to use."
              },
              "version": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Optional version of the prompt template.",
                    "title": "string"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "variables": {
                "$ref": "#/components/schemas/ResponsePromptVariables"
              }
            },
            "title": "object"
          },
          {
            "type": "null",
            "title": "null"
          }
        ]
      },
      "ConversationParam-2": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID of the conversation.",
            "example": "conv_123"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "Conversation object",
        "description": "The conversation that this response belongs to."
      },
      "Metadata": {
        "anyOf": [
          {
            "type": "object",
            "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n",
            "additionalProperties": {
              "type": "string"
            },
            "x-oaiTypeLabel": "map",
            "title": "object"
          },
          {
            "type": "null",
            "title": "null"
          }
        ]
      },
      "ServiceTier": {
        "anyOf": [
          {
            "type": "string",
            "description": "Specifies the processing type used for serving the request.\n  - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n  - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n  - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.\n  - When not set, the default behavior is 'auto'.\n\n  When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n",
            "enum": [
              "auto",
              "default",
              "flex",
              "scale",
              "priority"
            ],
            "default": "auto",
            "title": "string"
          },
          {
            "type": "null",
            "title": "null"
          }
        ]
      },
      "ResponseErrorCode": {
        "type": "string",
        "description": "The error code for the response.\n",
        "enum": [
          "server_error",
          "rate_limit_exceeded",
          "invalid_prompt",
          "vector_store_timeout",
          "invalid_image",
          "invalid_image_format",
          "invalid_base64_image",
          "invalid_image_url",
          "image_too_large",
          "image_too_small",
          "image_parse_error",
          "image_content_policy_violation",
          "invalid_image_mode",
          "image_file_too_large",
          "unsupported_image_media_type",
          "empty_image_file",
          "failed_to_download_image",
          "image_file_not_found"
        ]
      },
      "OutputMessage": {
        "type": "object",
        "title": "Output message",
        "description": "An output message from the model.\n",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID of the output message.\n"
          },
          "type": {
            "type": "string",
            "description": "The type of the output message. Always `message`.\n",
            "enum": [
              "message"
            ],
            "x-stainless-const": true
          },
          "role": {
            "type": "string",
            "description": "The role of the output message. Always `assistant`.\n",
            "enum": [
              "assistant"
            ],
            "x-stainless-const": true
          },
          "content": {
            "type": "array",
            "description": "The content of the output message.\n",
            "items": {
              "$ref": "#/components/schemas/OutputMessageContent"
            }
          },
          "phase": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MessagePhase"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "description": "The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "role",
          "content",
          "status"
        ]
      },
      "FileSearchToolCall": {
        "type": "object",
        "title": "File search tool call",
        "description": "The results of a file search tool call. See the\n[file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.\n",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID of the file search tool call.\n"
          },
          "type": {
            "type": "string",
            "enum": [
              "file_search_call"
            ],
            "description": "The type of the file search tool call. Always `file_search_call`.\n",
            "x-stainless-const": true
          },
          "status": {
            "type": "string",
            "description": "The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n",
            "enum": [
              "in_progress",
              "searching",
              "completed",
              "incomplete",
              "failed"
            ]
          },
          "queries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The queries used to search for files.\n"
          },
          "results": {
            "anyOf": [
              {
                "type": "array",
                "description": "The results of the file search tool call.\n",
                "items": {
                  "type": "object",
                  "properties": {
                    "file_id": {
                      "type": "string",
                      "description": "The unique ID of the file.\n"
                    },
                    "text": {
                      "type": "string",
                      "description": "The text that was retrieved from the file.\n"
                    },
                    "filename": {
                      "type": "string",
                      "description": "The name of the file.\n"
                    },
                    "attributes": {
                      "$ref": "#/components/schemas/VectorStoreFileAttributes"
                    },
                    "score": {
                      "type": "number",
                      "format": "float",
                      "description": "The relevance score of the file - a value between 0 and 1.\n"
                    }
                  }
                },
                "title": "array"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "queries"
        ]
      },
      "FunctionToolCall": {
        "type": "object",
        "title": "Function tool call",
        "description": "A tool call to run a function. See the \n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.\n",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID of the function tool call.\n"
          },
          "type": {
            "type": "string",
            "enum": [
              "function_call"
            ],
            "description": "The type of the function tool call. Always `function_call`.\n",
            "x-stainless-const": true
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the function tool call generated by the model.\n"
          },
          "namespace": {
            "type": "string",
            "description": "The namespace of the function to run.\n"
          },
          "name": {
            "type": "string",
            "description": "The name of the function to run.\n"
          },
          "arguments": {
            "type": "string",
            "description": "A JSON string of the arguments to pass to the function.\n"
          },
          "status": {
            "type": "string",
            "description": "The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ]
          }
        },
        "required": [
          "type",
          "call_id",
          "name",
          "arguments"
        ]
      },
      "FunctionToolCallOutputResource": {
        "allOf": [
          {
            "$ref": "#/components/schemas/FunctionToolCallOutput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of the function call tool output.\n"
              },
              "status": {
                "description": "The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n",
                "$ref": "#/components/schemas/FunctionCallOutputStatusEnum"
              },
              "created_by": {
                "type": "string",
                "description": "The identifier of the actor that created the item.\n"
              }
            },
            "required": [
              "id",
              "status"
            ]
          }
        ]
      },
      "WebSearchToolCall": {
        "type": "object",
        "title": "Web search tool call",
        "description": "The results of a web search tool call. See the\n[web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.\n",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID of the web search tool call.\n"
          },
          "type": {
            "type": "string",
            "enum": [
              "web_search_call"
            ],
            "description": "The type of the web search tool call. Always `web_search_call`.\n",
            "x-stainless-const": true
          },
          "status": {
            "type": "string",
            "description": "The status of the web search tool call.\n",
            "enum": [
              "in_progress",
              "searching",
              "completed",
              "failed"
            ]
          },
          "action": {
            "type": "object",
            "description": "An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find_in_page).\n",
            "oneOf": [
              {
                "$ref": "#/components/schemas/WebSearchActionSearch"
              },
              {
                "$ref": "#/components/schemas/WebSearchActionOpenPage"
              },
              {
                "$ref": "#/components/schemas/WebSearchActionFind"
              }
            ],
            "discriminator": {
              "propertyName": "type"
            }
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "action"
        ]
      },
      "ComputerToolCall": {
        "type": "object",
        "title": "Computer tool call",
        "description": "A tool call to a computer use tool. See the\n[computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the computer call. Always `computer_call`.",
            "enum": [
              "computer_call"
            ],
            "default": "computer_call"
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the computer call."
          },
          "call_id": {
            "type": "string",
            "description": "An identifier used when responding to the tool call with output.\n"
          },
          "action": {
            "$ref": "#/components/schemas/ComputerAction"
          },
          "actions": {
            "$ref": "#/components/schemas/ComputerActionList"
          },
          "pending_safety_checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComputerCallSafetyCheckParam"
            },
            "description": "The pending safety checks for the computer call.\n"
          },
          "status": {
            "type": "string",
            "description": "The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ]
          }
        },
        "required": [
          "type",
          "id",
          "call_id",
          "pending_safety_checks",
          "status"
        ]
      },
      "ComputerToolCallOutputResource": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ComputerToolCallOutput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of the computer call tool output.\n"
              },
              "status": {
                "description": "The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n",
                "$ref": "#/components/schemas/ComputerCallOutputStatus"
              },
              "created_by": {
                "type": "string",
                "description": "The identifier of the actor that created the item.\n"
              }
            },
            "required": [
              "id",
              "status"
            ]
          }
        ]
      },
      "ReasoningItem": {
        "type": "object",
        "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](https://platform.openai.com/docs/guides/conversation-state).\n",
        "title": "Reasoning",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the object. Always `reasoning`.\n",
            "enum": [
              "reasoning"
            ],
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique identifier of the reasoning content.\n"
          },
          "encrypted_content": {
            "anyOf": [
              {
                "type": "string",
                "description": "The encrypted content of the reasoning item - populated when a response is\ngenerated with `reasoning.encrypted_content` in the `include` parameter.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "summary": {
            "type": "array",
            "description": "Reasoning summary content.\n",
            "items": {
              "$ref": "#/components/schemas/SummaryTextContent"
            }
          },
          "content": {
            "type": "array",
            "description": "Reasoning text content.\n",
            "items": {
              "$ref": "#/components/schemas/ReasoningTextContent"
            }
          },
          "status": {
            "type": "string",
            "description": "The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ]
          }
        },
        "required": [
          "id",
          "summary",
          "type"
        ]
      },
      "ToolSearchCall": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "tool_search_call"
            ],
            "description": "The type of the item. Always `tool_search_call`.",
            "default": "tool_search_call",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the tool search call item."
          },
          "call_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the tool search call generated by the model.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "execution": {
            "$ref": "#/components/schemas/ToolSearchExecutionType",
            "description": "Whether tool search was executed by the server or by the client."
          },
          "arguments": {
            "description": "Arguments used for the tool search call."
          },
          "status": {
            "$ref": "#/components/schemas/FunctionCallStatus",
            "description": "The status of the tool search call item that was recorded."
          },
          "created_by": {
            "type": "string",
            "description": "The identifier of the actor that created the item."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "execution",
          "arguments",
          "status"
        ]
      },
      "ToolSearchOutput": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "tool_search_output"
            ],
            "description": "The type of the item. Always `tool_search_output`.",
            "default": "tool_search_output",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the tool search output item."
          },
          "call_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the tool search call generated by the model.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "execution": {
            "$ref": "#/components/schemas/ToolSearchExecutionType",
            "description": "Whether tool search was executed by the server or by the client."
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/Tool"
            },
            "type": "array",
            "description": "The loaded tool definitions returned by tool search."
          },
          "status": {
            "$ref": "#/components/schemas/FunctionCallOutputStatusEnum",
            "description": "The status of the tool search output item that was recorded."
          },
          "created_by": {
            "type": "string",
            "description": "The identifier of the actor that created the item."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "execution",
          "tools",
          "status"
        ]
      },
      "CompactionBody": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "compaction"
            ],
            "description": "The type of the item. Always `compaction`.",
            "default": "compaction",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the compaction item."
          },
          "encrypted_content": {
            "type": "string",
            "description": "The encrypted content that was produced by compaction."
          },
          "created_by": {
            "type": "string",
            "description": "The identifier of the actor that created the item."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "encrypted_content"
        ],
        "title": "Compaction item",
        "description": "A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact)."
      },
      "ImageGenToolCall": {
        "type": "object",
        "title": "Image generation call",
        "description": "An image generation request made by the model.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "image_generation_call"
            ],
            "description": "The type of the image generation call. Always `image_generation_call`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the image generation call.\n"
          },
          "status": {
            "type": "string",
            "enum": [
              "in_progress",
              "completed",
              "generating",
              "failed"
            ],
            "description": "The status of the image generation call.\n"
          },
          "result": {
            "anyOf": [
              {
                "type": "string",
                "description": "The generated image encoded in base64.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "id",
          "status",
          "result"
        ]
      },
      "CodeInterpreterToolCall": {
        "type": "object",
        "title": "Code interpreter tool call",
        "description": "A tool call to run code.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "code_interpreter_call"
            ],
            "default": "code_interpreter_call",
            "x-stainless-const": true,
            "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.\n"
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the code interpreter tool call.\n"
          },
          "status": {
            "type": "string",
            "enum": [
              "in_progress",
              "completed",
              "incomplete",
              "interpreting",
              "failed"
            ],
            "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"
          },
          "container_id": {
            "type": "string",
            "description": "The ID of the container used to run the code.\n"
          },
          "code": {
            "anyOf": [
              {
                "type": "string",
                "description": "The code to run, or null if not available.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "outputs": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CodeInterpreterOutputLogs"
                    },
                    {
                      "$ref": "#/components/schemas/CodeInterpreterOutputImage"
                    }
                  ],
                  "discriminator": {
                    "propertyName": "type"
                  }
                },
                "discriminator": {
                  "propertyName": "type"
                },
                "description": "The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n",
                "title": "array"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "id",
          "status",
          "container_id",
          "code",
          "outputs"
        ]
      },
      "LocalShellToolCall": {
        "type": "object",
        "title": "Local shell call",
        "description": "A tool call to run a command on the local shell.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "local_shell_call"
            ],
            "description": "The type of the local shell call. Always `local_shell_call`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the local shell call.\n"
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the local shell tool call generated by the model.\n"
          },
          "action": {
            "$ref": "#/components/schemas/LocalShellExecAction"
          },
          "status": {
            "type": "string",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ],
            "description": "The status of the local shell call.\n"
          }
        },
        "required": [
          "type",
          "id",
          "call_id",
          "action",
          "status"
        ]
      },
      "LocalShellToolCallOutput": {
        "type": "object",
        "title": "Local shell call output",
        "description": "The output of a local shell tool call.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "local_shell_call_output"
            ],
            "description": "The type of the local shell tool call output. Always `local_shell_call_output`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the local shell tool call generated by the model.\n"
          },
          "output": {
            "type": "string",
            "description": "A JSON string of the output of the local shell tool call.\n"
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "in_progress",
                  "completed",
                  "incomplete"
                ],
                "description": "The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "type",
          "call_id",
          "output"
        ]
      },
      "FunctionShellCall": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "shell_call"
            ],
            "description": "The type of the item. Always `shell_call`.",
            "default": "shell_call",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the shell tool call. Populated when this item is returned via API."
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the shell tool call generated by the model."
          },
          "action": {
            "$ref": "#/components/schemas/FunctionShellAction",
            "description": "The shell commands and limits that describe how to run the tool call."
          },
          "status": {
            "$ref": "#/components/schemas/FunctionShellCallStatus",
            "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."
          },
          "environment": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/LocalEnvironmentResource"
                  },
                  {
                    "$ref": "#/components/schemas/ContainerReferenceResource"
                  }
                ],
                "discriminator": {
                  "propertyName": "type"
                }
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "created_by": {
            "type": "string",
            "description": "The ID of the entity that created this tool call."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "action",
          "status",
          "environment"
        ],
        "title": "Shell tool call",
        "description": "A tool call that executes one or more shell commands in a managed environment."
      },
      "FunctionShellCallOutput": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "shell_call_output"
            ],
            "description": "The type of the shell call output. Always `shell_call_output`.",
            "default": "shell_call_output",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the shell call output. Populated when this item is returned via API."
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the shell tool call generated by the model."
          },
          "status": {
            "$ref": "#/components/schemas/FunctionShellCallOutputStatusEnum",
            "description": "The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`."
          },
          "output": {
            "items": {
              "$ref": "#/components/schemas/FunctionShellCallOutputContent"
            },
            "type": "array",
            "description": "An array of shell call output contents"
          },
          "max_output_length": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.",
                "title": "integer"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "created_by": {
            "type": "string",
            "description": "The identifier of the actor that created the item."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "status",
          "output",
          "max_output_length"
        ],
        "title": "Shell call output",
        "description": "The output of a shell tool call that was emitted."
      },
      "ApplyPatchToolCall": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "apply_patch_call"
            ],
            "description": "The type of the item. Always `apply_patch_call`.",
            "default": "apply_patch_call",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API."
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the apply patch tool call generated by the model."
          },
          "status": {
            "$ref": "#/components/schemas/ApplyPatchCallStatus",
            "description": "The status of the apply patch tool call. One of `in_progress` or `completed`."
          },
          "operation": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ApplyPatchCreateFileOperation"
              },
              {
                "$ref": "#/components/schemas/ApplyPatchDeleteFileOperation"
              },
              {
                "$ref": "#/components/schemas/ApplyPatchUpdateFileOperation"
              }
            ],
            "title": "Apply patch operation",
            "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.",
            "discriminator": {
              "propertyName": "type"
            }
          },
          "created_by": {
            "type": "string",
            "description": "The ID of the entity that created this tool call."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "status",
          "operation"
        ],
        "title": "Apply patch tool call",
        "description": "A tool call that applies file diffs by creating, deleting, or updating files."
      },
      "ApplyPatchToolCallOutput": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "apply_patch_call_output"
            ],
            "description": "The type of the item. Always `apply_patch_call_output`.",
            "default": "apply_patch_call_output",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API."
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the apply patch tool call generated by the model."
          },
          "status": {
            "$ref": "#/components/schemas/ApplyPatchCallOutputStatus",
            "description": "The status of the apply patch tool call output. One of `completed` or `failed`."
          },
          "output": {
            "anyOf": [
              {
                "type": "string",
                "description": "Optional textual output returned by the apply patch tool.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "created_by": {
            "type": "string",
            "description": "The ID of the entity that created this tool call output."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "status"
        ],
        "title": "Apply patch tool call output",
        "description": "The output emitted by an apply patch tool call."
      },
      "MCPToolCall": {
        "type": "object",
        "title": "MCP tool call",
        "description": "An invocation of a tool on an MCP server.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "mcp_call"
            ],
            "description": "The type of the item. Always `mcp_call`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the tool call.\n"
          },
          "server_label": {
            "type": "string",
            "description": "The label of the MCP server running the tool.\n"
          },
          "name": {
            "type": "string",
            "description": "The name of the tool that was run.\n"
          },
          "arguments": {
            "type": "string",
            "description": "A JSON string of the arguments passed to the tool.\n"
          },
          "output": {
            "anyOf": [
              {
                "type": "string",
                "description": "The output from the tool call.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string",
                "description": "The error from the tool call, if any.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/MCPToolCallStatus",
            "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"
          },
          "approval_request_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "id",
          "server_label",
          "name",
          "arguments"
        ]
      },
      "MCPListTools": {
        "type": "object",
        "title": "MCP list tools",
        "description": "A list of tools available on an MCP server.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "mcp_list_tools"
            ],
            "description": "The type of the item. Always `mcp_list_tools`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the list.\n"
          },
          "server_label": {
            "type": "string",
            "description": "The label of the MCP server.\n"
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MCPListToolsTool"
            },
            "description": "The tools available on the server.\n"
          },
          "error": {
            "anyOf": [
              {
                "type": "string",
                "description": "Error message if the server could not list tools.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "id",
          "server_label",
          "tools"
        ]
      },
      "MCPApprovalRequest": {
        "type": "object",
        "title": "MCP approval request",
        "description": "A request for human approval of a tool invocation.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "mcp_approval_request"
            ],
            "description": "The type of the item. Always `mcp_approval_request`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the approval request.\n"
          },
          "server_label": {
            "type": "string",
            "description": "The label of the MCP server making the request.\n"
          },
          "name": {
            "type": "string",
            "description": "The name of the tool to run.\n"
          },
          "arguments": {
            "type": "string",
            "description": "A JSON string of arguments for the tool.\n"
          }
        },
        "required": [
          "type",
          "id",
          "server_label",
          "name",
          "arguments"
        ]
      },
      "MCPApprovalResponseResource": {
        "type": "object",
        "title": "MCP approval response",
        "description": "A response to an MCP approval request.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "mcp_approval_response"
            ],
            "description": "The type of the item. Always `mcp_approval_response`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the approval response\n"
          },
          "approval_request_id": {
            "type": "string",
            "description": "The ID of the approval request being answered.\n"
          },
          "approve": {
            "type": "boolean",
            "description": "Whether the request was approved.\n"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "description": "Optional reason for the decision.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "id",
          "request_id",
          "approve",
          "approval_request_id"
        ]
      },
      "CustomToolCall": {
        "type": "object",
        "title": "Custom tool call",
        "description": "A call to a custom tool created by the model.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "custom_tool_call"
            ],
            "x-stainless-const": true,
            "description": "The type of the custom tool call. Always `custom_tool_call`.\n"
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the custom tool call in the OpenAI platform.\n"
          },
          "call_id": {
            "type": "string",
            "description": "An identifier used to map this custom tool call to a tool call output.\n"
          },
          "namespace": {
            "type": "string",
            "description": "The namespace of the custom tool being called.\n"
          },
          "name": {
            "type": "string",
            "description": "The name of the custom tool being called.\n"
          },
          "input": {
            "type": "string",
            "description": "The input for the custom tool call generated by the model.\n"
          }
        },
        "required": [
          "type",
          "call_id",
          "name",
          "input"
        ]
      },
      "CustomToolCallOutputResource": {
        "title": "ResponseCustomToolCallOutputItem",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomToolCallOutput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of the custom tool call output item.\n"
              },
              "status": {
                "description": "The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n",
                "$ref": "#/components/schemas/FunctionCallOutputStatusEnum"
              },
              "created_by": {
                "type": "string",
                "description": "The identifier of the actor that created the item.\n"
              }
            },
            "required": [
              "id",
              "status"
            ]
          }
        ]
      },
      "EasyInputMessage": {
        "type": "object",
        "title": "Input message",
        "description": "A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n",
        "properties": {
          "role": {
            "type": "string",
            "description": "The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n",
            "enum": [
              "user",
              "assistant",
              "system",
              "developer"
            ]
          },
          "content": {
            "description": "Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n",
            "oneOf": [
              {
                "type": "string",
                "title": "Text input",
                "description": "A text input to the model.\n"
              },
              {
                "$ref": "#/components/schemas/InputMessageContentList"
              }
            ]
          },
          "phase": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MessagePhase"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "description": "The type of the message input. Always `message`.\n",
            "enum": [
              "message"
            ],
            "x-stainless-const": true
          }
        },
        "required": [
          "role",
          "content"
        ]
      },
      "Item": {
        "type": "object",
        "description": "Content item used to generate a response.\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/InputMessage"
          },
          {
            "$ref": "#/components/schemas/OutputMessage"
          },
          {
            "$ref": "#/components/schemas/FileSearchToolCall"
          },
          {
            "$ref": "#/components/schemas/ComputerToolCall"
          },
          {
            "$ref": "#/components/schemas/ComputerCallOutputItemParam"
          },
          {
            "$ref": "#/components/schemas/WebSearchToolCall"
          },
          {
            "$ref": "#/components/schemas/FunctionToolCall"
          },
          {
            "$ref": "#/components/schemas/FunctionCallOutputItemParam"
          },
          {
            "$ref": "#/components/schemas/ToolSearchCallItemParam"
          },
          {
            "$ref": "#/components/schemas/ToolSearchOutputItemParam"
          },
          {
            "$ref": "#/components/schemas/ReasoningItem"
          },
          {
            "$ref": "#/components/schemas/CompactionSummaryItemParam"
          },
          {
            "$ref": "#/components/schemas/ImageGenToolCall"
          },
          {
            "$ref": "#/components/schemas/CodeInterpreterToolCall"
          },
          {
            "$ref": "#/components/schemas/LocalShellToolCall"
          },
          {
            "$ref": "#/components/schemas/LocalShellToolCallOutput"
          },
          {
            "$ref": "#/components/schemas/FunctionShellCallItemParam"
          },
          {
            "$ref": "#/components/schemas/FunctionShellCallOutputItemParam"
          },
          {
            "$ref": "#/components/schemas/ApplyPatchToolCallItemParam"
          },
          {
            "$ref": "#/components/schemas/ApplyPatchToolCallOutputItemParam"
          },
          {
            "$ref": "#/components/schemas/MCPListTools"
          },
          {
            "$ref": "#/components/schemas/MCPApprovalRequest"
          },
          {
            "$ref": "#/components/schemas/MCPApprovalResponse"
          },
          {
            "$ref": "#/components/schemas/MCPToolCall"
          },
          {
            "$ref": "#/components/schemas/CustomToolCallOutput"
          },
          {
            "$ref": "#/components/schemas/CustomToolCall"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "ItemReferenceParam": {
        "properties": {
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "item_reference"
                ],
                "description": "The type of item to reference. Always `item_reference`.",
                "default": "item_reference",
                "x-stainless-const": true,
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "description": "The ID of the item to reference."
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "Item reference",
        "description": "An internal identifier for an item to reference."
      },
      "OutputContent": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/OutputTextContent"
          },
          {
            "$ref": "#/components/schemas/RefusalContent"
          },
          {
            "$ref": "#/components/schemas/ReasoningTextContent"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "ResponseLogProb": {
        "type": "object",
        "description": "A logprob is the logarithmic probability that the model assigns to producing \na particular token at a given position in the sequence. Less-negative (higher) \nlogprob values indicate greater model confidence in that token choice.\n",
        "properties": {
          "token": {
            "description": "A possible text token.",
            "type": "string"
          },
          "logprob": {
            "description": "The log probability of this token.\n",
            "type": "number"
          },
          "top_logprobs": {
            "description": "The log probabilities of up to 20 of the most likely tokens.\n",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "token": {
                  "description": "A possible text token.",
                  "type": "string"
                },
                "logprob": {
                  "description": "The log probability of this token.",
                  "type": "number"
                }
              }
            }
          }
        },
        "required": [
          "token",
          "logprob"
        ]
      },
      "FunctionTool": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "function"
            ],
            "description": "The type of the function tool. Always `function`.",
            "default": "function",
            "x-stainless-const": true
          },
          "name": {
            "type": "string",
            "description": "The name of the function to call."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "description": "A description of the function. Used by the model to determine whether or not to call the function.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "parameters": {
            "anyOf": [
              {
                "additionalProperties": {},
                "type": "object",
                "description": "A JSON schema object describing the parameters of the function.",
                "x-oaiTypeLabel": "map",
                "title": "object"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean",
                "description": "Whether to enforce strict parameter validation. Default `true`.",
                "title": "boolean"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "defer_loading": {
            "type": "boolean",
            "description": "Whether this function is deferred and loaded via tool search."
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "strict",
          "parameters"
        ],
        "title": "Function",
        "description": "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)."
      },
      "FileSearchTool": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "file_search"
            ],
            "description": "The type of the file search tool. Always `file_search`.",
            "default": "file_search",
            "x-stainless-const": true
          },
          "vector_store_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "The IDs of the vector stores to search."
          },
          "max_num_results": {
            "type": "integer",
            "description": "The maximum number of results to return. This number should be between 1 and 50 inclusive."
          },
          "ranking_options": {
            "$ref": "#/components/schemas/RankingOptions",
            "description": "Ranking options for search."
          },
          "filters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Filters",
                "description": "A filter to apply."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "vector_store_ids"
        ],
        "title": "File search",
        "description": "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)."
      },
      "ComputerTool": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "computer"
            ],
            "description": "The type of the computer tool. Always `computer`.",
            "default": "computer",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Computer",
        "description": "A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use)."
      },
      "ComputerUsePreviewTool": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "computer_use_preview"
            ],
            "description": "The type of the computer use tool. Always `computer_use_preview`.",
            "default": "computer_use_preview",
            "x-stainless-const": true
          },
          "environment": {
            "$ref": "#/components/schemas/ComputerEnvironment",
            "description": "The type of computer environment to control."
          },
          "display_width": {
            "type": "integer",
            "description": "The width of the computer display."
          },
          "display_height": {
            "type": "integer",
            "description": "The height of the computer display."
          }
        },
        "type": "object",
        "required": [
          "type",
          "environment",
          "display_width",
          "display_height"
        ],
        "title": "Computer use preview",
        "description": "A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use)."
      },
      "WebSearchTool": {
        "type": "object",
        "title": "Web search",
        "description": "Search the Internet for sources related to the prompt. Learn more about the\n[web search tool](https://platform.openai.com/docs/guides/tools-web-search).\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "web_search",
              "web_search_2025_08_26"
            ],
            "description": "The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.",
            "default": "web_search"
          },
          "filters": {
            "anyOf": [
              {
                "type": "object",
                "description": "Filters for the search.\n",
                "properties": {
                  "allowed_domains": {
                    "anyOf": [
                      {
                        "type": "array",
                        "title": "Allowed domains for the search.",
                        "description": "Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well.\n\nExample: `[\"pubmed.ncbi.nlm.nih.gov\"]`\n",
                        "items": {
                          "type": "string",
                          "description": "Allowed domain for the search."
                        },
                        "default": []
                      },
                      {
                        "type": "null",
                        "title": "null"
                      }
                    ]
                  }
                },
                "title": "object"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "user_location": {
            "$ref": "#/components/schemas/WebSearchApproximateLocation"
          },
          "search_context_size": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "default": "medium",
            "description": "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."
          }
        },
        "required": [
          "type"
        ]
      },
      "MCPTool": {
        "type": "object",
        "title": "MCP tool",
        "description": "Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "mcp"
            ],
            "description": "The type of the MCP tool. Always `mcp`.",
            "x-stainless-const": true
          },
          "server_label": {
            "type": "string",
            "description": "A label for this MCP server, used to identify it in tool calls.\n"
          },
          "server_url": {
            "type": "string",
            "format": "uri",
            "description": "The URL for the MCP server. One of `server_url` or `connector_id` must be\nprovided.\n"
          },
          "connector_id": {
            "type": "string",
            "enum": [
              "connector_dropbox",
              "connector_gmail",
              "connector_googlecalendar",
              "connector_googledrive",
              "connector_microsoftteams",
              "connector_outlookcalendar",
              "connector_outlookemail",
              "connector_sharepoint"
            ],
            "description": "Identifier for service connectors, like those available in ChatGPT. One of\n`server_url` or `connector_id` must be provided. Learn more about service\nconnectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).\n\nCurrently supported `connector_id` values are:\n\n- Dropbox: `connector_dropbox`\n- Gmail: `connector_gmail`\n- Google Calendar: `connector_googlecalendar`\n- Google Drive: `connector_googledrive`\n- Microsoft Teams: `connector_microsoftteams`\n- Outlook Calendar: `connector_outlookcalendar`\n- Outlook Email: `connector_outlookemail`\n- SharePoint: `connector_sharepoint`\n"
          },
          "authorization": {
            "type": "string",
            "description": "An OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.\n"
          },
          "server_description": {
            "type": "string",
            "description": "Optional description of the MCP server, used to provide more context.\n"
          },
          "headers": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Optional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.\n",
                "title": "object"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "allowed_tools": {
            "anyOf": [
              {
                "description": "List of allowed tool names or a filter object.\n",
                "oneOf": [
                  {
                    "type": "array",
                    "title": "MCP allowed tools",
                    "description": "A string array of allowed tool names",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "$ref": "#/components/schemas/MCPToolFilter"
                  }
                ]
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "require_approval": {
            "anyOf": [
              {
                "description": "Specify which of the MCP server's tools require approval.",
                "oneOf": [
                  {
                    "type": "object",
                    "title": "MCP tool approval filter",
                    "description": "Specify which of the MCP server's tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.\n",
                    "properties": {
                      "always": {
                        "$ref": "#/components/schemas/MCPToolFilter"
                      },
                      "never": {
                        "$ref": "#/components/schemas/MCPToolFilter"
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "string",
                    "title": "MCP tool approval setting",
                    "description": "Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.\n",
                    "enum": [
                      "always",
                      "never"
                    ]
                  }
                ],
                "default": "always"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "defer_loading": {
            "type": "boolean",
            "description": "Whether this MCP tool is deferred and discovered via tool search.\n"
          }
        },
        "required": [
          "type",
          "server_label"
        ]
      },
      "CodeInterpreterTool": {
        "type": "object",
        "title": "Code interpreter",
        "description": "A tool that runs Python code to help generate a response to a prompt.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "code_interpreter"
            ],
            "description": "The type of the code interpreter tool. Always `code_interpreter`.\n",
            "x-stainless-const": true
          },
          "container": {
            "description": "The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code, along with an\noptional `memory_limit` setting.\n",
            "oneOf": [
              {
                "type": "string",
                "description": "The container ID.",
                "title": "string"
              },
              {
                "$ref": "#/components/schemas/AutoCodeInterpreterToolParam"
              }
            ]
          }
        },
        "required": [
          "type",
          "container"
        ]
      },
      "ImageGenTool": {
        "type": "object",
        "title": "Image generation tool",
        "description": "A tool that generates images using the GPT image models.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "image_generation"
            ],
            "description": "The type of the image generation tool. Always `image_generation`.\n",
            "x-stainless-const": true
          },
          "model": {
            "anyOf": [
              {
                "type": "string",
                "title": "string"
              },
              {
                "type": "string",
                "enum": [
                  "gpt-image-1",
                  "gpt-image-1-mini",
                  "gpt-image-1.5"
                ],
                "description": "The image generation model to use. Default: `gpt-image-1`.\n",
                "default": "gpt-image-1",
                "title": "string"
              }
            ]
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "auto"
            ],
            "description": "The quality of the generated image. One of `low`, `medium`, `high`,\nor `auto`. Default: `auto`.\n",
            "default": "auto"
          },
          "size": {
            "anyOf": [
              {
                "type": "string",
                "title": "string"
              },
              {
                "type": "string",
                "enum": [
                  "1024x1024",
                  "1024x1536",
                  "1536x1024",
                  "auto"
                ],
                "title": "string"
              }
            ],
            "description": "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"
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "webp",
              "jpeg"
            ],
            "description": "The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.\n",
            "default": "png"
          },
          "output_compression": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Compression level for the output image. Default: 100.\n",
            "default": 100
          },
          "moderation": {
            "type": "string",
            "enum": [
              "auto",
              "low"
            ],
            "description": "Moderation level for the generated image. Default: `auto`.\n",
            "default": "auto"
          },
          "background": {
            "type": "string",
            "enum": [
              "transparent",
              "opaque",
              "auto"
            ],
            "description": "Background type for the generated image. One of `transparent`,\n`opaque`, or `auto`. Default: `auto`.\n",
            "default": "auto"
          },
          "input_fidelity": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InputFidelity"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "input_image_mask": {
            "type": "object",
            "description": "Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).\n",
            "properties": {
              "image_url": {
                "type": "string",
                "description": "Base64-encoded mask image.\n"
              },
              "file_id": {
                "type": "string",
                "description": "File ID for the mask image.\n"
              }
            },
            "required": [],
            "additionalProperties": false
          },
          "partial_images": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3,
            "description": "Number of partial images to generate in streaming mode, from 0 (default value) to 3.\n",
            "default": 0
          },
          "action": {
            "description": "Whether to generate a new image or edit an existing image. Default: `auto`.\n",
            "$ref": "#/components/schemas/ImageGenActionEnum"
          }
        },
        "required": [
          "type"
        ]
      },
      "LocalShellToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "local_shell"
            ],
            "description": "The type of the local shell tool. Always `local_shell`.",
            "default": "local_shell",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Local shell tool",
        "description": "A tool that allows the model to execute shell commands in a local environment."
      },
      "FunctionShellToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "shell"
            ],
            "description": "The type of the shell tool. Always `shell`.",
            "default": "shell",
            "x-stainless-const": true
          },
          "environment": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ContainerAutoParam"
                  },
                  {
                    "$ref": "#/components/schemas/LocalEnvironmentParam"
                  },
                  {
                    "$ref": "#/components/schemas/ContainerReferenceParam"
                  }
                ],
                "discriminator": {
                  "propertyName": "type"
                }
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Shell tool",
        "description": "A tool that allows the model to execute shell commands."
      },
      "CustomToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "custom"
            ],
            "description": "The type of the custom tool. Always `custom`.",
            "default": "custom",
            "x-stainless-const": true
          },
          "name": {
            "type": "string",
            "description": "The name of the custom tool, used to identify it in tool calls."
          },
          "description": {
            "type": "string",
            "description": "Optional description of the custom tool, used to provide more context."
          },
          "format": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CustomTextFormatParam"
              },
              {
                "$ref": "#/components/schemas/CustomGrammarFormatParam"
              }
            ],
            "description": "The input format for the custom tool. Default is unconstrained text.",
            "discriminator": {
              "propertyName": "type"
            }
          },
          "defer_loading": {
            "type": "boolean",
            "description": "Whether this tool should be deferred and discovered via tool search."
          }
        },
        "type": "object",
        "required": [
          "type",
          "name"
        ],
        "title": "Custom tool",
        "description": "A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)"
      },
      "NamespaceToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "namespace"
            ],
            "description": "The type of the tool. Always `namespace`.",
            "default": "namespace",
            "x-stainless-const": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The namespace name used in tool calls (for example, `crm`)."
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "description": "A description of the namespace shown to the model."
          },
          "tools": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/FunctionToolParam"
                },
                {
                  "$ref": "#/components/schemas/CustomToolParam"
                }
              ],
              "description": "A function or custom tool that belongs to a namespace.",
              "discriminator": {
                "propertyName": "type"
              }
            },
            "type": "array",
            "minItems": 1,
            "description": "The function/custom tools available inside this namespace."
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "description",
          "tools"
        ],
        "title": "Namespace",
        "description": "Groups function/custom tools under a shared namespace."
      },
      "ToolSearchToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "tool_search"
            ],
            "description": "The type of the tool. Always `tool_search`.",
            "default": "tool_search",
            "x-stainless-const": true
          },
          "execution": {
            "$ref": "#/components/schemas/ToolSearchExecutionType",
            "description": "Whether tool search is executed by the server or by the client."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "description": "Description shown to the model for a client-executed tool search tool.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "parameters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmptyModelParam",
                "description": "Parameter schema for a client-executed tool search tool."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Tool search tool",
        "description": "Hosted or BYOT tool search configuration for deferred tools."
      },
      "WebSearchPreviewTool": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "web_search_preview",
              "web_search_preview_2025_03_11"
            ],
            "description": "The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.",
            "default": "web_search_preview",
            "x-stainless-const": true
          },
          "user_location": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApproximateLocation",
                "description": "The user's location."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "search_context_size": {
            "$ref": "#/components/schemas/SearchContextSize",
            "description": "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."
          },
          "search_content_types": {
            "items": {
              "$ref": "#/components/schemas/SearchContentType"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Web search preview",
        "description": "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)."
      },
      "ApplyPatchToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "apply_patch"
            ],
            "description": "The type of the tool. Always `apply_patch`.",
            "default": "apply_patch",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Apply patch tool",
        "description": "Allows the assistant to create, delete, or update files using unified diffs."
      },
      "TextResponseFormatConfiguration": {
        "description": "An object specifying the format that the model must output.\n\nConfiguring `{ \"type\": \"json_schema\" }` enables Structured Outputs, \nwhich ensures the model will match your supplied JSON schema. Learn more in the \n[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).\n\nThe default format is `{ \"type\": \"text\" }` with no additional options.\n\n**Not recommended for gpt-4o and newer models:**\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/ResponseFormatText"
          },
          {
            "$ref": "#/components/schemas/TextResponseFormatJsonSchema"
          },
          {
            "$ref": "#/components/schemas/ResponseFormatJsonObject"
          }
        ]
      },
      "Verbosity": {
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "default": "medium",
            "description": "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n",
            "title": "string"
          },
          {
            "type": "null",
            "title": "null"
          }
        ]
      },
      "ReasoningEffort": {
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ],
            "default": "medium",
            "description": "Constrains effort on reasoning for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).\nCurrently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing\nreasoning effort can result in faster responses and fewer tokens used\non reasoning in a response.\n\n- `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.\n- All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.\n- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.\n- `xhigh` is supported for all models after `gpt-5.1-codex-max`.\n",
            "title": "string"
          },
          {
            "type": "null",
            "title": "null"
          }
        ]
      },
      "ToolChoiceOptions": {
        "type": "string",
        "title": "Tool choice mode",
        "description": "Controls which (if any) tool is called by the model.\n\n`none` means the model will not call any tool and instead generates a message.\n\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n\n`required` means the model must call one or more tools.\n",
        "enum": [
          "none",
          "auto",
          "required"
        ]
      },
      "ToolChoiceAllowed": {
        "type": "object",
        "title": "Allowed tools",
        "description": "Constrains the tools available to the model to a pre-defined set.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "allowed_tools"
            ],
            "description": "Allowed tool configuration type. Always `allowed_tools`.",
            "x-stainless-const": true
          },
          "mode": {
            "type": "string",
            "enum": [
              "auto",
              "required"
            ],
            "description": "Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n"
          },
          "tools": {
            "type": "array",
            "description": "A list of tool definitions that the model should be allowed to call.\n\nFor the Responses API, the list of tool definitions might look like:\n```json\n[\n  { \"type\": \"function\", \"name\": \"get_weather\" },\n  { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n  { \"type\": \"image_generation\" }\n]\n```\n",
            "items": {
              "type": "object",
              "description": "A tool definition that the model should be allowed to call.\n",
              "additionalProperties": true,
              "x-oaiExpandable": false
            }
          }
        },
        "required": [
          "type",
          "mode",
          "tools"
        ]
      },
      "ToolChoiceTypes": {
        "type": "object",
        "title": "Hosted tool",
        "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of hosted tool the model should to use. Learn more about\n[built-in tools](https://platform.openai.com/docs/guides/tools).\n\nAllowed values are:\n- `file_search`\n- `web_search_preview`\n- `computer`\n- `computer_use_preview`\n- `computer_use`\n- `code_interpreter`\n- `image_generation`\n",
            "enum": [
              "file_search",
              "web_search_preview",
              "computer",
              "computer_use_preview",
              "computer_use",
              "web_search_preview_2025_03_11",
              "image_generation",
              "code_interpreter"
            ]
          }
        },
        "required": [
          "type"
        ]
      },
      "ToolChoiceFunction": {
        "type": "object",
        "title": "Function tool",
        "description": "Use this option to force the model to call a specific function.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "function"
            ],
            "description": "For function calling, the type is always `function`.",
            "x-stainless-const": true
          },
          "name": {
            "type": "string",
            "description": "The name of the function to call."
          }
        },
        "required": [
          "type",
          "name"
        ]
      },
      "ToolChoiceMCP": {
        "type": "object",
        "title": "MCP tool",
        "description": "Use this option to force the model to call a specific tool on a remote MCP server.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "mcp"
            ],
            "description": "For MCP tools, the type is always `mcp`.",
            "x-stainless-const": true
          },
          "server_label": {
            "type": "string",
            "description": "The label of the MCP server to use.\n"
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "description": "The name of the tool to call on the server.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "server_label"
        ]
      },
      "ToolChoiceCustom": {
        "type": "object",
        "title": "Custom tool",
        "description": "Use this option to force the model to call a specific custom tool.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "custom"
            ],
            "description": "For custom tool calling, the type is always `custom`.",
            "x-stainless-const": true
          },
          "name": {
            "type": "string",
            "description": "The name of the custom tool to call."
          }
        },
        "required": [
          "type",
          "name"
        ]
      },
      "SpecificApplyPatchParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "apply_patch"
            ],
            "description": "The tool to call. Always `apply_patch`.",
            "default": "apply_patch",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Specific apply patch tool choice",
        "description": "Forces the model to call the apply_patch tool when executing a tool call."
      },
      "SpecificFunctionShellParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "shell"
            ],
            "description": "The tool to call. Always `shell`.",
            "default": "shell",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Specific shell tool choice",
        "description": "Forces the model to call the shell tool when a tool call is required."
      },
      "Message": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "message"
            ],
            "description": "The type of the message. Always set to `message`.",
            "default": "message",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the message."
          },
          "status": {
            "$ref": "#/components/schemas/MessageStatus",
            "description": "The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API."
          },
          "role": {
            "$ref": "#/components/schemas/MessageRole",
            "description": "The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`."
          },
          "content": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/InputTextContent"
                },
                {
                  "$ref": "#/components/schemas/OutputTextContent"
                },
                {
                  "$ref": "#/components/schemas/TextContent"
                },
                {
                  "$ref": "#/components/schemas/SummaryTextContent"
                },
                {
                  "$ref": "#/components/schemas/ReasoningTextContent"
                },
                {
                  "$ref": "#/components/schemas/RefusalContent"
                },
                {
                  "$ref": "#/components/schemas/InputImageContent"
                },
                {
                  "$ref": "#/components/schemas/ComputerScreenshotContent"
                },
                {
                  "$ref": "#/components/schemas/InputFileContent"
                }
              ],
              "description": "A content part that makes up an input or output item.",
              "discriminator": {
                "propertyName": "type"
              }
            },
            "type": "array",
            "description": "The content of the message"
          },
          "phase": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MessagePhase-2",
                "description": "Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "status",
          "role",
          "content"
        ],
        "title": "Message",
        "description": "A message to or from the model."
      },
      "FunctionToolCallOutput": {
        "type": "object",
        "title": "Function tool call output",
        "description": "The output of a function tool call.\n",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID of the function tool call output. Populated when this item\nis returned via API.\n"
          },
          "type": {
            "type": "string",
            "enum": [
              "function_call_output"
            ],
            "description": "The type of the function tool call output. Always `function_call_output`.\n",
            "x-stainless-const": true
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the function tool call generated by the model.\n"
          },
          "output": {
            "description": "The output from the function call generated by your code.\nCan be a string or an list of output content.\n",
            "oneOf": [
              {
                "type": "string",
                "description": "A string of the output of the function call.\n",
                "title": "string output"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FunctionAndCustomToolCallOutput"
                },
                "title": "output content list",
                "description": "Text, image, or file output of the function call.\n"
              }
            ]
          },
          "status": {
            "type": "string",
            "description": "The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ]
          }
        },
        "required": [
          "type",
          "call_id",
          "output"
        ]
      },
      "CustomToolCallOutput": {
        "type": "object",
        "title": "Custom tool call output",
        "description": "The output of a custom tool call from your code, being sent back to the model.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "custom_tool_call_output"
            ],
            "x-stainless-const": true,
            "description": "The type of the custom tool call output. Always `custom_tool_call_output`.\n"
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the custom tool call output in the OpenAI platform.\n"
          },
          "call_id": {
            "type": "string",
            "description": "The call ID, used to map this custom tool call output to a custom tool call.\n"
          },
          "output": {
            "description": "The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n",
            "oneOf": [
              {
                "type": "string",
                "description": "A string of the output of the custom tool call.\n",
                "title": "string output"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FunctionAndCustomToolCallOutput"
                },
                "title": "output content list",
                "description": "Text, image, or file output of the custom tool call.\n"
              }
            ]
          }
        },
        "required": [
          "type",
          "call_id",
          "output"
        ]
      },
      "ModelIdsShared": {
        "example": "gpt-5.4",
        "anyOf": [
          {
            "type": "string",
            "title": "string"
          },
          {
            "type": "string",
            "enum": [
              "gpt-5.4",
              "gpt-5.4-mini",
              "gpt-5.4-nano",
              "gpt-5.4-mini-2026-03-17",
              "gpt-5.4-nano-2026-03-17",
              "gpt-5.3-chat-latest",
              "gpt-5.2",
              "gpt-5.2-2025-12-11",
              "gpt-5.2-chat-latest",
              "gpt-5.2-pro",
              "gpt-5.2-pro-2025-12-11",
              "gpt-5.1",
              "gpt-5.1-2025-11-13",
              "gpt-5.1-codex",
              "gpt-5.1-mini",
              "gpt-5.1-chat-latest",
              "gpt-5",
              "gpt-5-mini",
              "gpt-5-nano",
              "gpt-5-2025-08-07",
              "gpt-5-mini-2025-08-07",
              "gpt-5-nano-2025-08-07",
              "gpt-5-chat-latest",
              "gpt-4.1",
              "gpt-4.1-mini",
              "gpt-4.1-nano",
              "gpt-4.1-2025-04-14",
              "gpt-4.1-mini-2025-04-14",
              "gpt-4.1-nano-2025-04-14",
              "o4-mini",
              "o4-mini-2025-04-16",
              "o3",
              "o3-2025-04-16",
              "o3-mini",
              "o3-mini-2025-01-31",
              "o1",
              "o1-2024-12-17",
              "o1-preview",
              "o1-preview-2024-09-12",
              "o1-mini",
              "o1-mini-2024-09-12",
              "gpt-4o",
              "gpt-4o-2024-11-20",
              "gpt-4o-2024-08-06",
              "gpt-4o-2024-05-13",
              "gpt-4o-audio-preview",
              "gpt-4o-audio-preview-2024-10-01",
              "gpt-4o-audio-preview-2024-12-17",
              "gpt-4o-audio-preview-2025-06-03",
              "gpt-4o-mini-audio-preview",
              "gpt-4o-mini-audio-preview-2024-12-17",
              "gpt-4o-search-preview",
              "gpt-4o-mini-search-preview",
              "gpt-4o-search-preview-2025-03-11",
              "gpt-4o-mini-search-preview-2025-03-11",
              "chatgpt-4o-latest",
              "codex-mini-latest",
              "gpt-4o-mini",
              "gpt-4o-mini-2024-07-18",
              "gpt-4-turbo",
              "gpt-4-turbo-2024-04-09",
              "gpt-4-0125-preview",
              "gpt-4-turbo-preview",
              "gpt-4-1106-preview",
              "gpt-4-vision-preview",
              "gpt-4",
              "gpt-4-0314",
              "gpt-4-0613",
              "gpt-4-32k",
              "gpt-4-32k-0314",
              "gpt-4-32k-0613",
              "gpt-3.5-turbo",
              "gpt-3.5-turbo-16k",
              "gpt-3.5-turbo-0301",
              "gpt-3.5-turbo-0613",
              "gpt-3.5-turbo-1106",
              "gpt-3.5-turbo-0125",
              "gpt-3.5-turbo-16k-0613"
            ],
            "title": "string"
          }
        ]
      },
      "ResponsePromptVariables": {
        "anyOf": [
          {
            "type": "object",
            "title": "Prompt Variables",
            "description": "Optional map of values to substitute in for variables in your\nprompt. The substitution values can either be strings, or other\nResponse input types like images or files.\n",
            "x-oaiExpandable": true,
            "x-oaiTypeLabel": "map",
            "additionalProperties": {
              "x-oaiExpandable": true,
              "x-oaiTypeLabel": "map",
              "oneOf": [
                {
                  "type": "string",
                  "title": "string"
                },
                {
                  "$ref": "#/components/schemas/InputTextContent"
                },
                {
                  "$ref": "#/components/schemas/InputImageContent"
                },
                {
                  "$ref": "#/components/schemas/InputFileContent"
                }
              ]
            }
          },
          {
            "type": "null",
            "title": "null"
          }
        ]
      },
      "OutputMessageContent": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/OutputTextContent"
          },
          {
            "$ref": "#/components/schemas/RefusalContent"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "MessagePhase": {
        "type": "string",
        "description": "Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).\nFor models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend\nphase on all assistant messages — dropping it can degrade performance. Not used for user messages.\n",
        "enum": [
          "commentary",
          "final_answer"
        ]
      },
      "VectorStoreFileAttributes": {
        "anyOf": [
          {
            "type": "object",
            "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n",
            "maxProperties": 16,
            "propertyNames": {
              "type": "string",
              "maxLength": 64
            },
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "string",
                  "maxLength": 512,
                  "title": "string"
                },
                {
                  "type": "number",
                  "title": "number"
                },
                {
                  "type": "boolean",
                  "title": "boolean"
                }
              ]
            },
            "x-oaiTypeLabel": "map",
            "title": "object"
          },
          {
            "type": "null",
            "title": "null"
          }
        ]
      },
      "FunctionCallOutputStatusEnum": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ]
      },
      "WebSearchActionSearch": {
        "type": "object",
        "title": "Search action",
        "description": "Action type \"search\" - Performs a web search query.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "search"
            ],
            "description": "The action type.\n",
            "x-stainless-const": true
          },
          "query": {
            "type": "string",
            "description": "[DEPRECATED] The search query.\n"
          },
          "queries": {
            "type": "array",
            "title": "Search queries",
            "description": "The search queries.\n",
            "items": {
              "type": "string",
              "description": "A search query.\n"
            }
          },
          "sources": {
            "type": "array",
            "title": "Web search sources",
            "description": "The sources used in the search.\n",
            "items": {
              "type": "object",
              "title": "Web search source",
              "description": "A source used in the search.\n",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "url"
                  ],
                  "description": "The type of source. Always `url`.\n",
                  "x-stainless-const": true
                },
                "url": {
                  "type": "string",
                  "format": "uri",
                  "description": "The URL of the source.\n"
                }
              },
              "required": [
                "type",
                "url"
              ]
            }
          }
        },
        "required": [
          "type",
          "query"
        ]
      },
      "WebSearchActionOpenPage": {
        "type": "object",
        "title": "Open page action",
        "description": "Action type \"open_page\" - Opens a specific URL from search results.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "open_page"
            ],
            "description": "The action type.\n",
            "x-stainless-const": true
          },
          "url": {
            "description": "The URL opened by the model.\n",
            "anyOf": [
              {
                "type": "string",
                "format": "uri",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "required": [
          "type"
        ]
      },
      "WebSearchActionFind": {
        "type": "object",
        "title": "Find action",
        "description": "Action type \"find_in_page\": Searches for a pattern within a loaded page.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "find_in_page"
            ],
            "description": "The action type.\n",
            "x-stainless-const": true
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the page searched for the pattern.\n"
          },
          "pattern": {
            "type": "string",
            "description": "The pattern or text to search for within the page.\n"
          }
        },
        "required": [
          "type",
          "url",
          "pattern"
        ]
      },
      "ComputerAction": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ClickParam"
          },
          {
            "$ref": "#/components/schemas/DoubleClickAction"
          },
          {
            "$ref": "#/components/schemas/DragParam"
          },
          {
            "$ref": "#/components/schemas/KeyPressAction"
          },
          {
            "$ref": "#/components/schemas/MoveParam"
          },
          {
            "$ref": "#/components/schemas/ScreenshotParam"
          },
          {
            "$ref": "#/components/schemas/ScrollParam"
          },
          {
            "$ref": "#/components/schemas/TypeParam"
          },
          {
            "$ref": "#/components/schemas/WaitParam"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "ComputerActionList": {
        "title": "Computer Action List",
        "type": "array",
        "description": "Flattened batched actions for `computer_use`. Each action includes an\n`type` discriminator and action-specific fields.\n",
        "items": {
          "$ref": "#/components/schemas/ComputerAction"
        }
      },
      "ComputerCallSafetyCheckParam": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the pending safety check."
          },
          "code": {
            "anyOf": [
              {
                "type": "string",
                "description": "The type of the pending safety check.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "message": {
            "anyOf": [
              {
                "type": "string",
                "description": "Details about the pending safety check.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "description": "A pending safety check for the computer call."
      },
      "ComputerToolCallOutput": {
        "type": "object",
        "title": "Computer tool call output",
        "description": "The output of a computer tool call.\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the computer tool call output. Always `computer_call_output`.\n",
            "enum": [
              "computer_call_output"
            ],
            "default": "computer_call_output",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The ID of the computer tool call output.\n"
          },
          "call_id": {
            "type": "string",
            "description": "The ID of the computer tool call that produced the output.\n"
          },
          "acknowledged_safety_checks": {
            "type": "array",
            "description": "The safety checks reported by the API that have been acknowledged by the\ndeveloper.\n",
            "items": {
              "$ref": "#/components/schemas/ComputerCallSafetyCheckParam"
            }
          },
          "output": {
            "$ref": "#/components/schemas/ComputerScreenshotImage"
          },
          "status": {
            "type": "string",
            "description": "The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ]
          }
        },
        "required": [
          "type",
          "call_id",
          "output"
        ]
      },
      "ComputerCallOutputStatus": {
        "type": "string",
        "enum": [
          "completed",
          "incomplete",
          "failed"
        ]
      },
      "SummaryTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "summary_text"
            ],
            "description": "The type of the object. Always `summary_text`.",
            "default": "summary_text",
            "x-stainless-const": true
          },
          "text": {
            "type": "string",
            "description": "A summary of the reasoning output from the model so far."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "Summary text",
        "description": "A summary text from the model."
      },
      "ReasoningTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "reasoning_text"
            ],
            "description": "The type of the reasoning text. Always `reasoning_text`.",
            "default": "reasoning_text",
            "x-stainless-const": true
          },
          "text": {
            "type": "string",
            "description": "The reasoning text from the model."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "Reasoning text",
        "description": "Reasoning text from the model."
      },
      "ToolSearchExecutionType": {
        "type": "string",
        "enum": [
          "server",
          "client"
        ]
      },
      "FunctionCallStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ]
      },
      "CodeInterpreterOutputLogs": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "logs"
            ],
            "description": "The type of the output. Always `logs`.",
            "default": "logs",
            "x-stainless-const": true
          },
          "logs": {
            "type": "string",
            "description": "The logs output from the code interpreter."
          }
        },
        "type": "object",
        "required": [
          "type",
          "logs"
        ],
        "title": "Code interpreter output logs",
        "description": "The logs output from the code interpreter."
      },
      "CodeInterpreterOutputImage": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "image"
            ],
            "description": "The type of the output. Always `image`.",
            "default": "image",
            "x-stainless-const": true
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the image output from the code interpreter."
          }
        },
        "type": "object",
        "required": [
          "type",
          "url"
        ],
        "title": "Code interpreter output image",
        "description": "The image output from the code interpreter."
      },
      "LocalShellExecAction": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "exec"
            ],
            "description": "The type of the local shell action. Always `exec`.",
            "default": "exec",
            "x-stainless-const": true
          },
          "command": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "The command to run."
          },
          "timeout_ms": {
            "anyOf": [
              {
                "type": "integer",
                "description": "Optional timeout in milliseconds for the command.",
                "title": "integer"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "working_directory": {
            "anyOf": [
              {
                "type": "string",
                "description": "Optional working directory to run the command in.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "env": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "description": "Environment variables to set for the command.",
            "x-oaiTypeLabel": "map"
          },
          "user": {
            "anyOf": [
              {
                "type": "string",
                "description": "Optional user to run the command as.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "command",
          "env"
        ],
        "title": "Local shell exec action",
        "description": "Execute a shell command on the server."
      },
      "FunctionShellAction": {
        "properties": {
          "commands": {
            "items": {
              "type": "string",
              "description": "A list of commands to run."
            },
            "type": "array"
          },
          "timeout_ms": {
            "anyOf": [
              {
                "type": "integer",
                "description": "Optional timeout in milliseconds for the commands.",
                "title": "integer"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "max_output_length": {
            "anyOf": [
              {
                "type": "integer",
                "description": "Optional maximum number of characters to return from each command.",
                "title": "integer"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "commands",
          "timeout_ms",
          "max_output_length"
        ],
        "title": "Shell exec action",
        "description": "Execute a shell command."
      },
      "FunctionShellCallStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ]
      },
      "LocalEnvironmentResource": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "local"
            ],
            "description": "The environment type. Always `local`.",
            "default": "local",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Local Environment",
        "description": "Represents the use of a local environment to perform shell actions."
      },
      "ContainerReferenceResource": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "container_reference"
            ],
            "description": "The environment type. Always `container_reference`.",
            "default": "container_reference",
            "x-stainless-const": true
          },
          "container_id": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "type",
          "container_id"
        ],
        "title": "Container Reference",
        "description": "Represents a container created with /v1/containers."
      },
      "FunctionShellCallOutputStatusEnum": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ]
      },
      "FunctionShellCallOutputContent": {
        "properties": {
          "stdout": {
            "type": "string",
            "description": "The standard output that was captured."
          },
          "stderr": {
            "type": "string",
            "description": "The standard error output that was captured."
          },
          "outcome": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FunctionShellCallOutputTimeoutOutcome"
              },
              {
                "$ref": "#/components/schemas/FunctionShellCallOutputExitOutcome"
              }
            ],
            "title": "Shell call outcome",
            "description": "Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.",
            "discriminator": {
              "propertyName": "type"
            }
          },
          "created_by": {
            "type": "string",
            "description": "The identifier of the actor that created the item."
          }
        },
        "type": "object",
        "required": [
          "stdout",
          "stderr",
          "outcome"
        ],
        "title": "Shell call output content",
        "description": "The content of a shell tool call output that was emitted."
      },
      "ApplyPatchCallStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed"
        ]
      },
      "ApplyPatchCreateFileOperation": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "create_file"
            ],
            "description": "Create a new file with the provided diff.",
            "default": "create_file",
            "x-stainless-const": true
          },
          "path": {
            "type": "string",
            "description": "Path of the file to create."
          },
          "diff": {
            "type": "string",
            "description": "Diff to apply."
          }
        },
        "type": "object",
        "required": [
          "type",
          "path",
          "diff"
        ],
        "title": "Apply patch create file operation",
        "description": "Instruction describing how to create a file via the apply_patch tool."
      },
      "ApplyPatchDeleteFileOperation": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "delete_file"
            ],
            "description": "Delete the specified file.",
            "default": "delete_file",
            "x-stainless-const": true
          },
          "path": {
            "type": "string",
            "description": "Path of the file to delete."
          }
        },
        "type": "object",
        "required": [
          "type",
          "path"
        ],
        "title": "Apply patch delete file operation",
        "description": "Instruction describing how to delete a file via the apply_patch tool."
      },
      "ApplyPatchUpdateFileOperation": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "update_file"
            ],
            "description": "Update an existing file with the provided diff.",
            "default": "update_file",
            "x-stainless-const": true
          },
          "path": {
            "type": "string",
            "description": "Path of the file to update."
          },
          "diff": {
            "type": "string",
            "description": "Diff to apply."
          }
        },
        "type": "object",
        "required": [
          "type",
          "path",
          "diff"
        ],
        "title": "Apply patch update file operation",
        "description": "Instruction describing how to update a file via the apply_patch tool."
      },
      "ApplyPatchCallOutputStatus": {
        "type": "string",
        "enum": [
          "completed",
          "failed"
        ]
      },
      "MCPToolCallStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete",
          "calling",
          "failed"
        ]
      },
      "MCPListToolsTool": {
        "type": "object",
        "title": "MCP list tools tool",
        "description": "A tool available on an MCP server.\n",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the tool.\n"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "description": "The description of the tool.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "input_schema": {
            "type": "object",
            "description": "The JSON schema describing the tool's input.\n"
          },
          "annotations": {
            "anyOf": [
              {
                "type": "object",
                "description": "Additional annotations about the tool.\n",
                "title": "object"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "required": [
          "name",
          "input_schema"
        ]
      },
      "InputMessageContentList": {
        "type": "array",
        "title": "Input item content list",
        "description": "A list of one or many input items to the model, containing different content \ntypes.\n",
        "items": {
          "$ref": "#/components/schemas/InputContent"
        }
      },
      "InputMessage": {
        "type": "object",
        "title": "Input message",
        "description": "A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the message input. Always set to `message`.\n",
            "enum": [
              "message"
            ],
            "x-stainless-const": true
          },
          "role": {
            "type": "string",
            "description": "The role of the message input. One of `user`, `system`, or `developer`.\n",
            "enum": [
              "user",
              "system",
              "developer"
            ]
          },
          "status": {
            "type": "string",
            "description": "The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ]
          },
          "content": {
            "$ref": "#/components/schemas/InputMessageContentList"
          }
        },
        "required": [
          "role",
          "content"
        ]
      },
      "ComputerCallOutputItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The ID of the computer tool call output.",
                "example": "cuo_123",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The ID of the computer tool call that produced the output."
          },
          "type": {
            "type": "string",
            "enum": [
              "computer_call_output"
            ],
            "description": "The type of the computer tool call output. Always `computer_call_output`.",
            "default": "computer_call_output",
            "x-stainless-const": true
          },
          "output": {
            "$ref": "#/components/schemas/ComputerScreenshotImage"
          },
          "acknowledged_safety_checks": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ComputerCallSafetyCheckParam"
                },
                "type": "array",
                "description": "The safety checks reported by the API that have been acknowledged by the developer.",
                "title": "array"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FunctionCallItemStatus",
                "description": "The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "call_id",
          "type",
          "output"
        ],
        "title": "Computer tool call output",
        "description": "The output of a computer tool call."
      },
      "FunctionCallOutputItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the function tool call output. Populated when this item is returned via API.",
                "example": "fc_123",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The unique ID of the function tool call generated by the model."
          },
          "type": {
            "type": "string",
            "enum": [
              "function_call_output"
            ],
            "description": "The type of the function tool call output. Always `function_call_output`.",
            "default": "function_call_output",
            "x-stainless-const": true
          },
          "output": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 10485760,
                "description": "A JSON string of the output of the function tool call.",
                "title": "string"
              },
              {
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InputTextContentParam"
                    },
                    {
                      "$ref": "#/components/schemas/InputImageContentParamAutoParam"
                    },
                    {
                      "$ref": "#/components/schemas/InputFileContentParam"
                    }
                  ],
                  "description": "A piece of message content, such as text, an image, or a file.",
                  "discriminator": {
                    "propertyName": "type"
                  }
                },
                "type": "array",
                "description": "An array of content outputs (text, image, file) for the function tool call.",
                "title": "array"
              }
            ],
            "description": "Text, image, or file output of the function tool call."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FunctionCallItemStatus",
                "description": "The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "call_id",
          "type",
          "output"
        ],
        "title": "Function tool call output",
        "description": "The output of a function tool call."
      },
      "ToolSearchCallItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of this tool search call.",
                "example": "tsc_123",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "call_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64,
                "minLength": 1,
                "description": "The unique ID of the tool search call generated by the model.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "tool_search_call"
            ],
            "description": "The item type. Always `tool_search_call`.",
            "default": "tool_search_call",
            "x-stainless-const": true
          },
          "execution": {
            "$ref": "#/components/schemas/ToolSearchExecutionType",
            "description": "Whether tool search was executed by the server or by the client."
          },
          "arguments": {
            "$ref": "#/components/schemas/EmptyModelParam",
            "description": "The arguments supplied to the tool search call."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FunctionCallItemStatus",
                "description": "The status of the tool search call."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "arguments"
        ]
      },
      "ToolSearchOutputItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of this tool search output.",
                "example": "tso_123",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "call_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64,
                "minLength": 1,
                "description": "The unique ID of the tool search call generated by the model.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "tool_search_output"
            ],
            "description": "The item type. Always `tool_search_output`.",
            "default": "tool_search_output",
            "x-stainless-const": true
          },
          "execution": {
            "$ref": "#/components/schemas/ToolSearchExecutionType",
            "description": "Whether tool search was executed by the server or by the client."
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/Tool"
            },
            "type": "array",
            "description": "The loaded tool definitions returned by the tool search output."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FunctionCallItemStatus",
                "description": "The status of the tool search output."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "tools"
        ]
      },
      "CompactionSummaryItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The ID of the compaction item.",
                "example": "cmp_123",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "compaction"
            ],
            "description": "The type of the item. Always `compaction`.",
            "default": "compaction",
            "x-stainless-const": true
          },
          "encrypted_content": {
            "type": "string",
            "maxLength": 10485760,
            "description": "The encrypted content of the compaction summary."
          }
        },
        "type": "object",
        "required": [
          "type",
          "encrypted_content"
        ],
        "title": "Compaction item",
        "description": "A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact)."
      },
      "FunctionShellCallItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the shell tool call. Populated when this item is returned via API.",
                "example": "sh_123",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The unique ID of the shell tool call generated by the model."
          },
          "type": {
            "type": "string",
            "enum": [
              "shell_call"
            ],
            "description": "The type of the item. Always `shell_call`.",
            "default": "shell_call",
            "x-stainless-const": true
          },
          "action": {
            "$ref": "#/components/schemas/FunctionShellActionParam",
            "description": "The shell commands and limits that describe how to run the tool call."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FunctionShellCallItemStatus",
                "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "environment": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/LocalEnvironmentParam"
                  },
                  {
                    "$ref": "#/components/schemas/ContainerReferenceParam"
                  }
                ],
                "description": "The environment to execute the shell commands in.",
                "discriminator": {
                  "propertyName": "type"
                }
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "call_id",
          "type",
          "action"
        ],
        "title": "Shell tool call",
        "description": "A tool representing a request to execute one or more shell commands."
      },
      "FunctionShellCallOutputItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the shell tool call output. Populated when this item is returned via API.",
                "example": "sho_123",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The unique ID of the shell tool call generated by the model."
          },
          "type": {
            "type": "string",
            "enum": [
              "shell_call_output"
            ],
            "description": "The type of the item. Always `shell_call_output`.",
            "default": "shell_call_output",
            "x-stainless-const": true
          },
          "output": {
            "items": {
              "$ref": "#/components/schemas/FunctionShellCallOutputContentParam"
            },
            "type": "array",
            "description": "Captured chunks of stdout and stderr output, along with their associated outcomes."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FunctionShellCallItemStatus",
                "description": "The status of the shell call output."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "max_output_length": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The maximum number of UTF-8 characters captured for this shell call's combined output.",
                "title": "integer"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "call_id",
          "type",
          "output"
        ],
        "title": "Shell tool call output",
        "description": "The streamed output items emitted by a shell tool call."
      },
      "ApplyPatchToolCallItemParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "apply_patch_call"
            ],
            "description": "The type of the item. Always `apply_patch_call`.",
            "default": "apply_patch_call",
            "x-stainless-const": true
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API.",
                "example": "apc_123",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The unique ID of the apply patch tool call generated by the model."
          },
          "status": {
            "$ref": "#/components/schemas/ApplyPatchCallStatusParam",
            "description": "The status of the apply patch tool call. One of `in_progress` or `completed`."
          },
          "operation": {
            "$ref": "#/components/schemas/ApplyPatchOperationParam",
            "description": "The specific create, delete, or update instruction for the apply_patch tool call."
          }
        },
        "type": "object",
        "required": [
          "type",
          "call_id",
          "status",
          "operation"
        ],
        "title": "Apply patch tool call",
        "description": "A tool call representing a request to create, delete, or update files using diff patches."
      },
      "ApplyPatchToolCallOutputItemParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "apply_patch_call_output"
            ],
            "description": "The type of the item. Always `apply_patch_call_output`.",
            "default": "apply_patch_call_output",
            "x-stainless-const": true
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API.",
                "example": "apco_123",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The unique ID of the apply patch tool call generated by the model."
          },
          "status": {
            "$ref": "#/components/schemas/ApplyPatchCallOutputStatusParam",
            "description": "The status of the apply patch tool call output. One of `completed` or `failed`."
          },
          "output": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10485760,
                "description": "Optional human-readable log text from the apply patch tool (e.g., patch results or errors).",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "call_id",
          "status"
        ],
        "title": "Apply patch tool call output",
        "description": "The streamed output emitted by an apply patch tool call."
      },
      "MCPApprovalResponse": {
        "type": "object",
        "title": "MCP approval response",
        "description": "A response to an MCP approval request.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "mcp_approval_response"
            ],
            "description": "The type of the item. Always `mcp_approval_response`.\n",
            "x-stainless-const": true
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the approval response\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "approval_request_id": {
            "type": "string",
            "description": "The ID of the approval request being answered.\n"
          },
          "approve": {
            "type": "boolean",
            "description": "Whether the request was approved.\n"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "description": "Optional reason for the decision.\n",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "request_id",
          "approve",
          "approval_request_id"
        ]
      },
      "OutputTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "output_text"
            ],
            "description": "The type of the output text. Always `output_text`.",
            "default": "output_text",
            "x-stainless-const": true
          },
          "text": {
            "type": "string",
            "description": "The text output from the model."
          },
          "annotations": {
            "items": {
              "$ref": "#/components/schemas/Annotation"
            },
            "type": "array",
            "description": "The annotations of the text output."
          },
          "logprobs": {
            "items": {
              "$ref": "#/components/schemas/LogProb"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "type",
          "text",
          "annotations",
          "logprobs"
        ],
        "title": "Output text",
        "description": "A text output from the model."
      },
      "RefusalContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "refusal"
            ],
            "description": "The type of the refusal. Always `refusal`.",
            "default": "refusal",
            "x-stainless-const": true
          },
          "refusal": {
            "type": "string",
            "description": "The refusal explanation from the model."
          }
        },
        "type": "object",
        "required": [
          "type",
          "refusal"
        ],
        "title": "Refusal",
        "description": "A refusal from the model."
      },
      "RankingOptions": {
        "properties": {
          "ranker": {
            "$ref": "#/components/schemas/RankerVersionType",
            "description": "The ranker to use for the file search."
          },
          "score_threshold": {
            "type": "number",
            "description": "The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results."
          },
          "hybrid_search": {
            "$ref": "#/components/schemas/HybridSearchOptions",
            "description": "Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled."
          }
        },
        "type": "object",
        "required": []
      },
      "Filters": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ComparisonFilter"
          },
          {
            "$ref": "#/components/schemas/CompoundFilter"
          }
        ]
      },
      "ComputerEnvironment": {
        "type": "string",
        "enum": [
          "windows",
          "mac",
          "linux",
          "ubuntu",
          "browser"
        ]
      },
      "WebSearchApproximateLocation": {
        "anyOf": [
          {
            "type": "object",
            "title": "Web search approximate location",
            "description": "The approximate location of the user.\n",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "approximate"
                ],
                "description": "The type of location approximation. Always `approximate`.",
                "default": "approximate",
                "x-stainless-const": true
              },
              "country": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.",
                    "title": "string"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "region": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Free text input for the region of the user, e.g. `California`.",
                    "title": "string"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "city": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Free text input for the city of the user, e.g. `San Francisco`.",
                    "title": "string"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              },
              "timezone": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.",
                    "title": "string"
                  },
                  {
                    "type": "null",
                    "title": "null"
                  }
                ]
              }
            }
          },
          {
            "type": "null",
            "title": "null"
          }
        ]
      },
      "MCPToolFilter": {
        "type": "object",
        "title": "MCP tool filter",
        "description": "A filter object to specify which tools are allowed.\n",
        "properties": {
          "tool_names": {
            "type": "array",
            "title": "MCP allowed tools",
            "items": {
              "type": "string"
            },
            "description": "List of allowed tool names."
          },
          "read_only": {
            "type": "boolean",
            "description": "Indicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.\n"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "AutoCodeInterpreterToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "auto"
            ],
            "description": "Always `auto`.",
            "default": "auto",
            "x-stainless-const": true
          },
          "file_ids": {
            "items": {
              "type": "string",
              "example": "file-123"
            },
            "type": "array",
            "maxItems": 50,
            "description": "An optional list of uploaded files to make available to your code."
          },
          "memory_limit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContainerMemoryLimit",
                "description": "The memory limit for the code interpreter container."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "network_policy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContainerNetworkPolicyDisabledParam"
              },
              {
                "$ref": "#/components/schemas/ContainerNetworkPolicyAllowlistParam"
              }
            ],
            "description": "Network access policy for the container.",
            "discriminator": {
              "propertyName": "type"
            }
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "CodeInterpreterToolAuto",
        "description": "Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on."
      },
      "InputFidelity": {
        "type": "string",
        "enum": [
          "high",
          "low"
        ],
        "description": "Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`."
      },
      "ImageGenActionEnum": {
        "type": "string",
        "enum": [
          "generate",
          "edit",
          "auto"
        ]
      },
      "ContainerAutoParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "container_auto"
            ],
            "description": "Automatically creates a container for this request",
            "default": "container_auto",
            "x-stainless-const": true
          },
          "file_ids": {
            "items": {
              "type": "string",
              "example": "file-123"
            },
            "type": "array",
            "maxItems": 50,
            "description": "An optional list of uploaded files to make available to your code."
          },
          "memory_limit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContainerMemoryLimit",
                "description": "The memory limit for the container."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "network_policy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContainerNetworkPolicyDisabledParam"
              },
              {
                "$ref": "#/components/schemas/ContainerNetworkPolicyAllowlistParam"
              }
            ],
            "description": "Network access policy for the container.",
            "discriminator": {
              "propertyName": "type"
            }
          },
          "skills": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/SkillReferenceParam"
                },
                {
                  "$ref": "#/components/schemas/InlineSkillParam"
                }
              ],
              "discriminator": {
                "propertyName": "type"
              }
            },
            "type": "array",
            "maxItems": 200,
            "description": "An optional list of skills referenced by id or inline data."
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "LocalEnvironmentParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "local"
            ],
            "description": "Use a local computer environment.",
            "default": "local",
            "x-stainless-const": true
          },
          "skills": {
            "items": {
              "$ref": "#/components/schemas/LocalSkillParam"
            },
            "type": "array",
            "maxItems": 200,
            "description": "An optional list of skills."
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "ContainerReferenceParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "container_reference"
            ],
            "description": "References a container created with the /v1/containers endpoint",
            "default": "container_reference",
            "x-stainless-const": true
          },
          "container_id": {
            "type": "string",
            "description": "The ID of the referenced container.",
            "example": "cntr_123"
          }
        },
        "type": "object",
        "required": [
          "type",
          "container_id"
        ]
      },
      "CustomTextFormatParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "text"
            ],
            "description": "Unconstrained text format. Always `text`.",
            "default": "text",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Text format",
        "description": "Unconstrained free-form text."
      },
      "CustomGrammarFormatParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "grammar"
            ],
            "description": "Grammar format. Always `grammar`.",
            "default": "grammar",
            "x-stainless-const": true
          },
          "syntax": {
            "$ref": "#/components/schemas/GrammarSyntax1",
            "description": "The syntax of the grammar definition. One of `lark` or `regex`."
          },
          "definition": {
            "type": "string",
            "description": "The grammar definition."
          }
        },
        "type": "object",
        "required": [
          "type",
          "syntax",
          "definition"
        ],
        "title": "Grammar format",
        "description": "A grammar defined by the user."
      },
      "FunctionToolParam": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "parameters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmptyModelParam"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean",
                "title": "boolean"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "function"
            ],
            "default": "function",
            "x-stainless-const": true
          },
          "defer_loading": {
            "type": "boolean",
            "description": "Whether this function should be deferred and discovered via tool search."
          }
        },
        "type": "object",
        "required": [
          "name",
          "type"
        ]
      },
      "EmptyModelParam": {
        "properties": {},
        "type": "object",
        "required": []
      },
      "ApproximateLocation": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "approximate"
            ],
            "description": "The type of location approximation. Always `approximate`.",
            "default": "approximate",
            "x-stainless-const": true
          },
          "country": {
            "anyOf": [
              {
                "type": "string",
                "description": "The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "region": {
            "anyOf": [
              {
                "type": "string",
                "description": "Free text input for the region of the user, e.g. `California`.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string",
                "description": "Free text input for the city of the user, e.g. `San Francisco`.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string",
                "description": "The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "SearchContextSize": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high"
        ]
      },
      "SearchContentType": {
        "type": "string",
        "enum": [
          "text",
          "image"
        ]
      },
      "ResponseFormatText": {
        "type": "object",
        "title": "Text",
        "description": "Default response format. Used to generate text responses.\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of response format being defined. Always `text`.",
            "enum": [
              "text"
            ],
            "x-stainless-const": true
          }
        },
        "required": [
          "type"
        ]
      },
      "TextResponseFormatJsonSchema": {
        "type": "object",
        "title": "JSON schema",
        "description": "JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of response format being defined. Always `json_schema`.",
            "enum": [
              "json_schema"
            ],
            "x-stainless-const": true
          },
          "description": {
            "type": "string",
            "description": "A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n"
          },
          "name": {
            "type": "string",
            "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n"
          },
          "schema": {
            "$ref": "#/components/schemas/ResponseFormatJsonSchemaSchema"
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean",
                "default": false,
                "description": "Whether to enable strict schema adherence when generating the output.\nIf set to true, the model will always follow the exact schema defined\nin the `schema` field. Only a subset of JSON Schema is supported when\n`strict` is `true`. To learn more, read the [Structured Outputs\nguide](https://platform.openai.com/docs/guides/structured-outputs).\n",
                "title": "boolean"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "schema",
          "name"
        ]
      },
      "ResponseFormatJsonObject": {
        "type": "object",
        "title": "JSON object",
        "description": "JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of response format being defined. Always `json_object`.",
            "enum": [
              "json_object"
            ],
            "x-stainless-const": true
          }
        },
        "required": [
          "type"
        ]
      },
      "MessageStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ]
      },
      "MessageRole": {
        "type": "string",
        "enum": [
          "unknown",
          "user",
          "assistant",
          "system",
          "critic",
          "discriminator",
          "developer",
          "tool"
        ]
      },
      "InputTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_text"
            ],
            "description": "The type of the input item. Always `input_text`.",
            "default": "input_text",
            "x-stainless-const": true
          },
          "text": {
            "type": "string",
            "description": "The text input to the model."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "Input text",
        "description": "A text input to the model."
      },
      "TextContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "text"
            ],
            "default": "text",
            "x-stainless-const": true
          },
          "text": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "Text Content",
        "description": "A text content."
      },
      "InputImageContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_image"
            ],
            "description": "The type of the input item. Always `input_image`.",
            "default": "input_image",
            "x-stainless-const": true
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri",
                "description": "The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The ID of the file to be sent to the model.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "detail": {
            "$ref": "#/components/schemas/ImageDetail",
            "description": "The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`."
          }
        },
        "type": "object",
        "required": [
          "type",
          "detail"
        ],
        "title": "Input image",
        "description": "An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)."
      },
      "ComputerScreenshotContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "computer_screenshot"
            ],
            "description": "Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.",
            "default": "computer_screenshot",
            "x-stainless-const": true
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri",
                "description": "The URL of the screenshot image.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The identifier of an uploaded file that contains the screenshot.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "detail": {
            "$ref": "#/components/schemas/ImageDetail",
            "description": "The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`."
          }
        },
        "type": "object",
        "required": [
          "type",
          "image_url",
          "file_id",
          "detail"
        ],
        "title": "Computer screenshot",
        "description": "A screenshot of a computer."
      },
      "InputFileContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_file"
            ],
            "description": "The type of the input item. Always `input_file`.",
            "default": "input_file",
            "x-stainless-const": true
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The ID of the file to be sent to the model.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "filename": {
            "type": "string",
            "description": "The name of the file to be sent to the model."
          },
          "file_data": {
            "type": "string",
            "description": "The content of the file to be sent to the model.\n"
          },
          "file_url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the file to be sent to the model."
          },
          "detail": {
            "$ref": "#/components/schemas/FileInputDetail",
            "description": "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`."
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Input file",
        "description": "A file input to the model."
      },
      "MessagePhase-2": {
        "type": "string",
        "enum": [
          "commentary",
          "final_answer"
        ]
      },
      "FunctionAndCustomToolCallOutput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/InputTextContent"
          },
          {
            "$ref": "#/components/schemas/InputImageContent"
          },
          {
            "$ref": "#/components/schemas/InputFileContent"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "ClickParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "click"
            ],
            "description": "Specifies the event type. For a click action, this property is always `click`.",
            "default": "click",
            "x-stainless-const": true
          },
          "button": {
            "$ref": "#/components/schemas/ClickButtonType",
            "description": "Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."
          },
          "x": {
            "type": "integer",
            "description": "The x-coordinate where the click occurred."
          },
          "y": {
            "type": "integer",
            "description": "The y-coordinate where the click occurred."
          },
          "keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "description": "The keys being held while clicking.",
                "title": "array"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "button",
          "x",
          "y"
        ],
        "title": "Click",
        "description": "A click action."
      },
      "DoubleClickAction": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "double_click"
            ],
            "description": "Specifies the event type. For a double click action, this property is always set to `double_click`.",
            "default": "double_click",
            "x-stainless-const": true
          },
          "x": {
            "type": "integer",
            "description": "The x-coordinate where the double click occurred."
          },
          "y": {
            "type": "integer",
            "description": "The y-coordinate where the double click occurred."
          },
          "keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "description": "The keys being held while double-clicking.",
                "title": "array"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "x",
          "y",
          "keys"
        ],
        "title": "DoubleClick",
        "description": "A double click action."
      },
      "DragParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "drag"
            ],
            "description": "Specifies the event type. For a drag action, this property is always set to `drag`.",
            "default": "drag",
            "x-stainless-const": true
          },
          "path": {
            "items": {
              "$ref": "#/components/schemas/CoordParam"
            },
            "type": "array",
            "description": "An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg\n```\n[\n  { x: 100, y: 200 },\n  { x: 200, y: 300 }\n]\n```"
          },
          "keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "description": "The keys being held while dragging the mouse.",
                "title": "array"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "path"
        ],
        "title": "Drag",
        "description": "A drag action."
      },
      "KeyPressAction": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "keypress"
            ],
            "description": "Specifies the event type. For a keypress action, this property is always set to `keypress`.",
            "default": "keypress",
            "x-stainless-const": true
          },
          "keys": {
            "items": {
              "type": "string",
              "description": "One of the keys the model is requesting to be pressed."
            },
            "type": "array",
            "description": "The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key."
          }
        },
        "type": "object",
        "required": [
          "type",
          "keys"
        ],
        "title": "KeyPress",
        "description": "A collection of keypresses the model would like to perform."
      },
      "MoveParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "move"
            ],
            "description": "Specifies the event type. For a move action, this property is always set to `move`.",
            "default": "move",
            "x-stainless-const": true
          },
          "x": {
            "type": "integer",
            "description": "The x-coordinate to move to."
          },
          "y": {
            "type": "integer",
            "description": "The y-coordinate to move to."
          },
          "keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "description": "The keys being held while moving the mouse.",
                "title": "array"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "x",
          "y"
        ],
        "title": "Move",
        "description": "A mouse move action."
      },
      "ScreenshotParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "screenshot"
            ],
            "description": "Specifies the event type. For a screenshot action, this property is always set to `screenshot`.",
            "default": "screenshot",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Screenshot",
        "description": "A screenshot action."
      },
      "ScrollParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "scroll"
            ],
            "description": "Specifies the event type. For a scroll action, this property is always set to `scroll`.",
            "default": "scroll",
            "x-stainless-const": true
          },
          "x": {
            "type": "integer",
            "description": "The x-coordinate where the scroll occurred."
          },
          "y": {
            "type": "integer",
            "description": "The y-coordinate where the scroll occurred."
          },
          "scroll_x": {
            "type": "integer",
            "description": "The horizontal scroll distance."
          },
          "scroll_y": {
            "type": "integer",
            "description": "The vertical scroll distance."
          },
          "keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "description": "The keys being held while scrolling.",
                "title": "array"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "x",
          "y",
          "scroll_x",
          "scroll_y"
        ],
        "title": "Scroll",
        "description": "A scroll action."
      },
      "TypeParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "type"
            ],
            "description": "Specifies the event type. For a type action, this property is always set to `type`.",
            "default": "type",
            "x-stainless-const": true
          },
          "text": {
            "type": "string",
            "description": "The text to type."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "Type",
        "description": "An action to type in text."
      },
      "WaitParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "wait"
            ],
            "description": "Specifies the event type. For a wait action, this property is always set to `wait`.",
            "default": "wait",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Wait",
        "description": "A wait action."
      },
      "ComputerScreenshotImage": {
        "type": "object",
        "description": "A computer screenshot image used with the computer use tool.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "computer_screenshot"
            ],
            "default": "computer_screenshot",
            "description": "Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n",
            "x-stainless-const": true
          },
          "image_url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the screenshot image."
          },
          "file_id": {
            "type": "string",
            "description": "The identifier of an uploaded file that contains the screenshot."
          }
        },
        "required": [
          "type"
        ]
      },
      "FunctionShellCallOutputTimeoutOutcome": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "timeout"
            ],
            "description": "The outcome type. Always `timeout`.",
            "default": "timeout",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Shell call timeout outcome",
        "description": "Indicates that the shell call exceeded its configured time limit."
      },
      "FunctionShellCallOutputExitOutcome": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "exit"
            ],
            "description": "The outcome type. Always `exit`.",
            "default": "exit",
            "x-stainless-const": true
          },
          "exit_code": {
            "type": "integer",
            "description": "Exit code from the shell process."
          }
        },
        "type": "object",
        "required": [
          "type",
          "exit_code"
        ],
        "title": "Shell call exit outcome",
        "description": "Indicates that the shell commands finished and returned an exit code."
      },
      "InputContent": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/InputTextContent"
          },
          {
            "$ref": "#/components/schemas/InputImageContent"
          },
          {
            "$ref": "#/components/schemas/InputFileContent"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "FunctionCallItemStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ]
      },
      "InputTextContentParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_text"
            ],
            "description": "The type of the input item. Always `input_text`.",
            "default": "input_text",
            "x-stainless-const": true
          },
          "text": {
            "type": "string",
            "maxLength": 10485760,
            "description": "The text input to the model."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "Input text",
        "description": "A text input to the model."
      },
      "InputImageContentParamAutoParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_image"
            ],
            "description": "The type of the input item. Always `input_image`.",
            "default": "input_image",
            "x-stainless-const": true
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20971520,
                "format": "uri",
                "description": "The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The ID of the file to be sent to the model.",
                "example": "file-123",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "detail": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DetailEnum",
                "description": "The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`."
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Input image",
        "description": "An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)"
      },
      "InputFileContentParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_file"
            ],
            "description": "The type of the input item. Always `input_file`.",
            "default": "input_file",
            "x-stainless-const": true
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The ID of the file to be sent to the model.",
                "example": "file-123",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "filename": {
            "anyOf": [
              {
                "type": "string",
                "description": "The name of the file to be sent to the model.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "file_data": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 73400320,
                "description": "The base64-encoded data of the file to be sent to the model.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "file_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri",
                "description": "The URL of the file to be sent to the model.",
                "title": "string"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "detail": {
            "$ref": "#/components/schemas/FileDetailEnum",
            "description": "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`."
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Input file",
        "description": "A file input to the model."
      },
      "FunctionShellActionParam": {
        "properties": {
          "commands": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "Ordered shell commands for the execution environment to run."
          },
          "timeout_ms": {
            "anyOf": [
              {
                "type": "integer",
                "description": "Maximum wall-clock time in milliseconds to allow the shell commands to run.",
                "title": "integer"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          },
          "max_output_length": {
            "anyOf": [
              {
                "type": "integer",
                "description": "Maximum number of UTF-8 characters to capture from combined stdout and stderr output.",
                "title": "integer"
              },
              {
                "type": "null",
                "title": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "commands"
        ],
        "title": "Shell action",
        "description": "Commands and limits describing how to run the shell tool call."
      },
      "FunctionShellCallItemStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ],
        "title": "Shell call status",
        "description": "Status values reported for shell tool calls."
      },
      "FunctionShellCallOutputContentParam": {
        "properties": {
          "stdout": {
            "type": "string",
            "maxLength": 10485760,
            "description": "Captured stdout output for the shell call."
          },
          "stderr": {
            "type": "string",
            "maxLength": 10485760,
            "description": "Captured stderr output for the shell call."
          },
          "outcome": {
            "$ref": "#/components/schemas/FunctionShellCallOutputOutcomeParam",
            "description": "The exit or timeout outcome associated with this shell call."
          }
        },
        "type": "object",
        "required": [
          "stdout",
          "stderr",
          "outcome"
        ],
        "title": "Shell output content",
        "description": "Captured stdout and stderr for a portion of a shell tool call output."
      },
      "ApplyPatchCallStatusParam": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed"
        ],
        "title": "Apply patch call status",
        "description": "Status values reported for apply_patch tool calls."
      },
      "ApplyPatchOperationParam": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ApplyPatchCreateFileOperationParam"
          },
          {
            "$ref": "#/components/schemas/ApplyPatchDeleteFileOperationParam"
          },
          {
            "$ref": "#/components/schemas/ApplyPatchUpdateFileOperationParam"
          }
        ],
        "title": "Apply patch operation",
        "description": "One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "ApplyPatchCallOutputStatusParam": {
        "type": "string",
        "enum": [
          "completed",
          "failed"
        ],
        "title": "Apply patch call output status",
        "description": "Outcome values reported for apply_patch tool call outputs."
      },
      "Annotation": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/FileCitationBody"
          },
          {
            "$ref": "#/components/schemas/UrlCitationBody"
          },
          {
            "$ref": "#/components/schemas/ContainerFileCitationBody"
          },
          {
            "$ref": "#/components/schemas/FilePath"
          }
        ],
        "description": "An annotation that applies to a span of output text.",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "LogProb": {
        "properties": {
          "token": {
            "type": "string"
          },
          "logprob": {
            "type": "number"
          },
          "bytes": {
            "items": {
              "type": "integer"
            },
            "type": "array"
          },
          "top_logprobs": {
            "items": {
              "$ref": "#/components/schemas/TopLogProb"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "token",
          "logprob",
          "bytes",
          "top_logprobs"
        ],
        "title": "Log probability",
        "description": "The log probability of a token."
      },
      "RankerVersionType": {
        "type": "string",
        "enum": [
          "auto",
          "default-2024-11-15"
        ]
      },
      "HybridSearchOptions": {
        "properties": {
          "embedding_weight": {
            "type": "number",
            "description": "The weight of the embedding in the reciprocal ranking fusion."
          },
          "text_weight": {
            "type": "number",
            "description": "The weight of the text in the reciprocal ranking fusion."
          }
        },
        "type": "object",
        "required": [
          "embedding_weight",
          "text_weight"
        ]
      },
      "ComparisonFilter": {
        "type": "object",
        "additionalProperties": false,
        "title": "Comparison Filter",
        "description": "A filter used to compare a specified attribute key to a given value using a defined comparison operation.\n",
        "properties": {
          "type": {
            "type": "string",
            "default": "eq",
            "enum": [
              "eq",
              "ne",
              "gt",
              "gte",
              "lt",
              "lte",
              "in",
              "nin"
            ],
            "description": "Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.\n- `eq`: equals\n- `ne`: not equal\n- `gt`: greater than\n- `gte`: greater than or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `in`: in\n- `nin`: not in\n"
          },
          "key": {
            "type": "string",
            "description": "The key to compare against the value."
          },
          "value": {
            "oneOf": [
              {
                "type": "string",
                "title": "string"
              },
              {
                "type": "number",
                "title": "number"
              },
              {
                "type": "boolean",
                "title": "boolean"
              },
              {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "string",
                      "title": "string"
                    },
                    {
                      "type": "number",
                      "title": "number"
                    }
                  ]
                },
                "title": "array"
              }
            ],
            "description": "The value to compare against the attribute key; supports string, number, or boolean types."
          }
        },
        "required": [
          "type",
          "key",
          "value"
        ]
      },
      "CompoundFilter": {
        "type": "object",
        "additionalProperties": false,
        "title": "Compound Filter",
        "description": "Combine multiple filters using `and` or `or`.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of operation: `and` or `or`.",
            "enum": [
              "and",
              "or"
            ]
          },
          "filters": {
            "type": "array",
            "description": "Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ComparisonFilter"
                },
                {
                  "$ref": "#/components/schemas/CompoundFilter"
                }
              ],
              "discriminator": {
                "propertyName": "type"
              }
            }
          }
        },
        "required": [
          "type",
          "filters"
        ]
      },
      "ContainerMemoryLimit": {
        "type": "string",
        "enum": [
          "1g",
          "4g",
          "16g",
          "64g"
        ]
      },
      "ContainerNetworkPolicyDisabledParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "disabled"
            ],
            "description": "Disable outbound network access. Always `disabled`.",
            "default": "disabled",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "ContainerNetworkPolicyAllowlistParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "allowlist"
            ],
            "description": "Allow outbound network access only to specified domains. Always `allowlist`.",
            "default": "allowlist",
            "x-stainless-const": true
          },
          "allowed_domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "description": "A list of allowed domains when type is `allowlist`."
          },
          "domain_secrets": {
            "items": {
              "$ref": "#/components/schemas/ContainerNetworkPolicyDomainSecretParam"
            },
            "type": "array",
            "minItems": 1,
            "description": "Optional domain-scoped secrets for allowlisted domains."
          }
        },
        "type": "object",
        "required": [
          "type",
          "allowed_domains"
        ]
      },
      "SkillReferenceParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "skill_reference"
            ],
            "description": "References a skill created with the /v1/skills endpoint.",
            "default": "skill_reference",
            "x-stainless-const": true
          },
          "skill_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The ID of the referenced skill."
          },
          "version": {
            "type": "string",
            "description": "Optional skill version. Use a positive integer or 'latest'. Omit for default."
          }
        },
        "type": "object",
        "required": [
          "type",
          "skill_id"
        ]
      },
      "InlineSkillParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "inline"
            ],
            "description": "Defines an inline skill for this request.",
            "default": "inline",
            "x-stainless-const": true
          },
          "name": {
            "type": "string",
            "description": "The name of the skill."
          },
          "description": {
            "type": "string",
            "description": "The description of the skill."
          },
          "source": {
            "$ref": "#/components/schemas/InlineSkillSourceParam",
            "description": "Inline skill payload"
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "description",
          "source"
        ]
      },
      "LocalSkillParam": {
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the skill."
          },
          "description": {
            "type": "string",
            "description": "The description of the skill."
          },
          "path": {
            "type": "string",
            "description": "The path to the directory containing the skill."
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "path"
        ]
      },
      "GrammarSyntax1": {
        "type": "string",
        "enum": [
          "lark",
          "regex"
        ]
      },
      "ResponseFormatJsonSchemaSchema": {
        "type": "object",
        "title": "JSON schema",
        "description": "The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n",
        "additionalProperties": true
      },
      "ImageDetail": {
        "type": "string",
        "enum": [
          "low",
          "high",
          "auto",
          "original"
        ]
      },
      "FileInputDetail": {
        "type": "string",
        "enum": [
          "low",
          "high"
        ]
      },
      "ClickButtonType": {
        "type": "string",
        "enum": [
          "left",
          "right",
          "wheel",
          "back",
          "forward"
        ]
      },
      "CoordParam": {
        "properties": {
          "x": {
            "type": "integer",
            "description": "The x-coordinate."
          },
          "y": {
            "type": "integer",
            "description": "The y-coordinate."
          }
        },
        "type": "object",
        "required": [
          "x",
          "y"
        ],
        "title": "Coordinate",
        "description": "An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."
      },
      "DetailEnum": {
        "type": "string",
        "enum": [
          "low",
          "high",
          "auto",
          "original"
        ]
      },
      "FileDetailEnum": {
        "type": "string",
        "enum": [
          "low",
          "high"
        ]
      },
      "FunctionShellCallOutputOutcomeParam": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/FunctionShellCallOutputTimeoutOutcomeParam"
          },
          {
            "$ref": "#/components/schemas/FunctionShellCallOutputExitOutcomeParam"
          }
        ],
        "title": "Shell call outcome",
        "description": "The exit or timeout outcome associated with this shell call.",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "ApplyPatchCreateFileOperationParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "create_file"
            ],
            "description": "The operation type. Always `create_file`.",
            "default": "create_file",
            "x-stainless-const": true
          },
          "path": {
            "type": "string",
            "minLength": 1,
            "description": "Path of the file to create relative to the workspace root."
          },
          "diff": {
            "type": "string",
            "maxLength": 10485760,
            "description": "Unified diff content to apply when creating the file."
          }
        },
        "type": "object",
        "required": [
          "type",
          "path",
          "diff"
        ],
        "title": "Apply patch create file operation",
        "description": "Instruction for creating a new file via the apply_patch tool."
      },
      "ApplyPatchDeleteFileOperationParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "delete_file"
            ],
            "description": "The operation type. Always `delete_file`.",
            "default": "delete_file",
            "x-stainless-const": true
          },
          "path": {
            "type": "string",
            "minLength": 1,
            "description": "Path of the file to delete relative to the workspace root."
          }
        },
        "type": "object",
        "required": [
          "type",
          "path"
        ],
        "title": "Apply patch delete file operation",
        "description": "Instruction for deleting an existing file via the apply_patch tool."
      },
      "ApplyPatchUpdateFileOperationParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "update_file"
            ],
            "description": "The operation type. Always `update_file`.",
            "default": "update_file",
            "x-stainless-const": true
          },
          "path": {
            "type": "string",
            "minLength": 1,
            "description": "Path of the file to update relative to the workspace root."
          },
          "diff": {
            "type": "string",
            "maxLength": 10485760,
            "description": "Unified diff content to apply to the existing file."
          }
        },
        "type": "object",
        "required": [
          "type",
          "path",
          "diff"
        ],
        "title": "Apply patch update file operation",
        "description": "Instruction for updating an existing file via the apply_patch tool."
      },
      "FileCitationBody": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "file_citation"
            ],
            "description": "The type of the file citation. Always `file_citation`.",
            "default": "file_citation",
            "x-stainless-const": true
          },
          "file_id": {
            "type": "string",
            "description": "The ID of the file."
          },
          "index": {
            "type": "integer",
            "description": "The index of the file in the list of files."
          },
          "filename": {
            "type": "string",
            "description": "The filename of the file cited."
          }
        },
        "type": "object",
        "required": [
          "type",
          "file_id",
          "index",
          "filename"
        ],
        "title": "File citation",
        "description": "A citation to a file."
      },
      "UrlCitationBody": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "url_citation"
            ],
            "description": "The type of the URL citation. Always `url_citation`.",
            "default": "url_citation",
            "x-stainless-const": true
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the web resource."
          },
          "start_index": {
            "type": "integer",
            "description": "The index of the first character of the URL citation in the message."
          },
          "end_index": {
            "type": "integer",
            "description": "The index of the last character of the URL citation in the message."
          },
          "title": {
            "type": "string",
            "description": "The title of the web resource."
          }
        },
        "type": "object",
        "required": [
          "type",
          "url",
          "start_index",
          "end_index",
          "title"
        ],
        "title": "URL citation",
        "description": "A citation for a web resource used to generate a model response."
      },
      "ContainerFileCitationBody": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "container_file_citation"
            ],
            "description": "The type of the container file citation. Always `container_file_citation`.",
            "default": "container_file_citation",
            "x-stainless-const": true
          },
          "container_id": {
            "type": "string",
            "description": "The ID of the container file."
          },
          "file_id": {
            "type": "string",
            "description": "The ID of the file."
          },
          "start_index": {
            "type": "integer",
            "description": "The index of the first character of the container file citation in the message."
          },
          "end_index": {
            "type": "integer",
            "description": "The index of the last character of the container file citation in the message."
          },
          "filename": {
            "type": "string",
            "description": "The filename of the container file cited."
          }
        },
        "type": "object",
        "required": [
          "type",
          "container_id",
          "file_id",
          "start_index",
          "end_index",
          "filename"
        ],
        "title": "Container file citation",
        "description": "A citation for a container file used to generate a model response."
      },
      "FilePath": {
        "type": "object",
        "title": "File path",
        "description": "A path to a file.\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the file path. Always `file_path`.\n",
            "enum": [
              "file_path"
            ],
            "x-stainless-const": true
          },
          "file_id": {
            "type": "string",
            "description": "The ID of the file.\n"
          },
          "index": {
            "type": "integer",
            "description": "The index of the file in the list of files.\n"
          }
        },
        "required": [
          "type",
          "file_id",
          "index"
        ]
      },
      "TopLogProb": {
        "properties": {
          "token": {
            "type": "string"
          },
          "logprob": {
            "type": "number"
          },
          "bytes": {
            "items": {
              "type": "integer"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "token",
          "logprob",
          "bytes"
        ],
        "title": "Top log probability",
        "description": "The top log probability of a token."
      },
      "ContainerNetworkPolicyDomainSecretParam": {
        "properties": {
          "domain": {
            "type": "string",
            "minLength": 1,
            "description": "The domain associated with the secret."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The name of the secret to inject for the domain."
          },
          "value": {
            "type": "string",
            "maxLength": 10485760,
            "minLength": 1,
            "description": "The secret value to inject for the domain."
          }
        },
        "type": "object",
        "required": [
          "domain",
          "name",
          "value"
        ]
      },
      "InlineSkillSourceParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "base64"
            ],
            "description": "The type of the inline skill source. Must be `base64`.",
            "default": "base64",
            "x-stainless-const": true
          },
          "media_type": {
            "type": "string",
            "enum": [
              "application/zip"
            ],
            "description": "The media type of the inline skill payload. Must be `application/zip`.",
            "default": "application/zip",
            "x-stainless-const": true
          },
          "data": {
            "type": "string",
            "maxLength": 70254592,
            "minLength": 1,
            "description": "Base64-encoded skill zip bundle."
          }
        },
        "type": "object",
        "required": [
          "type",
          "media_type",
          "data"
        ],
        "description": "Inline skill payload"
      },
      "FunctionShellCallOutputTimeoutOutcomeParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "timeout"
            ],
            "description": "The outcome type. Always `timeout`.",
            "default": "timeout",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Shell call timeout outcome",
        "description": "Indicates that the shell call exceeded its configured time limit."
      },
      "FunctionShellCallOutputExitOutcomeParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "exit"
            ],
            "description": "The outcome type. Always `exit`.",
            "default": "exit",
            "x-stainless-const": true
          },
          "exit_code": {
            "type": "integer",
            "description": "The exit code returned by the shell process."
          }
        },
        "type": "object",
        "required": [
          "type",
          "exit_code"
        ],
        "title": "Shell call exit outcome",
        "description": "Indicates that the shell commands finished and returned an exit code."
      }
    }
  },
  "x-source-openapi": "https://raw.githubusercontent.com/openai/openai-openapi/master/openapi.yaml",
  "x-filtered-paths": [
    "POST /v1/responses",
    "GET /v1/responses/{response_id}",
    "DELETE /v1/responses/{response_id}",
    "POST /v1/responses/{response_id}/cancel",
    "POST /v1/responses/input_tokens",
    "POST /v1/responses/compact"
  ],
  "x-filtered-operation-count": 6,
  "x-filtered-schema-count": 284
}
```
