1{"responses":{"200":{"description":"Response generated successfully","content":{"application/json":{"schema":{"type":"object","description":"The complete response returned by the Responses API.","required":["created_at","id","model","object","output","status"],"properties":{"background":{"type":["boolean","null"],"description":"Whether to run the model response in the background.\n[Learn more](https://platform.openai.com/docs/guides/background)."},"billing":{"oneOf":[{"type":"null"},{"description":"Billing information for the response.","type":"object","required":["payer"],"properties":{"payer":{"type":"string"}},"title":"Billing"}]},"conversation":{"oneOf":[{"type":"null"},{"description":"The conversation that this response belongs to. Input items and output\nitems from this response are automatically added to this conversation.","type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"title":"Conversation"}]},"created_at":{"type":"integer","format":"int64","description":"Unix timestamp (in seconds) when this Response was created.","minimum":0},"error":{"oneOf":[{"type":"null"},{"description":"An error object returned when the model fails to generate a Response.","type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"The error code for the response."},"message":{"type":"string","description":"A human-readable description of the error."}},"title":"ErrorObject"}]},"id":{"type":"string","description":"Unique identifier for this response."},"incomplete_details":{"oneOf":[{"type":"null"},{"description":"Details about why the response is incomplete, if any.","type":"object","required":["reason"],"properties":{"reason":{"type":"string","description":"The reason why the response is incomplete."}},"title":"IncompleteDetails"}]},"instructions":{"oneOf":[{"type":"null"},{"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 response\nwill not be carried over to the next response. This makes it simple to swap out\nsystem (or developer) messages in new responses.","oneOf":[{"type":"string","description":"A text input to the model, equivalent to a text input with the `developer` role."},{"type":"array","items":{"oneOf":[{"description":"A reference to an existing item by ID.\nHas a required `id` field and optional `type` (can be \"item_reference\" or null).\nMust be tried first as it's the most minimal structure.","type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The ID of the item to reference."},"type":{"oneOf":[{"type":"null"},{"description":"The type of item to reference. Can be \"item_reference\" or null.","type":"string","enum":["item_reference"],"title":"ItemReferenceType"}]}},"title":"ItemReference"},{"description":"All structured items with proper type discrimination.\nIncludes InputMessage, OutputMessage, and all tool calls/outputs.\nUses the discriminated `Item` enum for efficient, type-safe deserialization.","oneOf":[{"allOf":[{"description":"A message (type: \"message\").\nCan represent InputMessage (user/system/developer) or OutputMessage (assistant).\n\nInputMessage:\n A message input to the model with a role indicating instruction following hierarchy.\n Instructions given with the developer or system role take precedence over instructions given with the user role.\nOutputMessage:\n A message output from the model.","oneOf":[{"description":"An output message from the model (role: assistant, has required id & status).\nThis must come first as it has the most specific structure (required id and status fields).","type":"object","required":["content","id","role","status"],"properties":{"content":{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A text output from the model.","type":"object","required":["annotations","text"],"properties":{"annotations":{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A citation to a file.","type":"object","required":["file_id","filename","index"],"properties":{"file_id":{"type":"string","description":"The ID of the file."},"filename":{"type":"string","description":"The filename of the file cited."},"index":{"type":"integer","format":"int32","description":"The index of the file in the list of files.","minimum":0}},"title":"FileCitationBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_citation"]}}}],"description":"A citation to a file."},{"allOf":[{"description":"A citation for a web resource used to generate a model response.","type":"object","required":["end_index","start_index","title","url"],"properties":{"end_index":{"type":"integer","format":"int32","description":"The index of the last character of the URL citation in the message.","minimum":0},"start_index":{"type":"integer","format":"int32","description":"The index of the first character of the URL citation in the message.","minimum":0},"title":{"type":"string","description":"The title of the web resource."},"url":{"type":"string","description":"The URL of the web resource."}},"title":"UrlCitationBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["url_citation"]}}}],"description":"A citation for a web resource used to generate a model response."},{"allOf":[{"description":"A citation for a container file used to generate a model response.","type":"object","required":["container_id","end_index","file_id","filename","start_index"],"properties":{"container_id":{"type":"string","description":"The ID of the container file."},"end_index":{"type":"integer","format":"int32","description":"The index of the last character of the container file citation in the message.","minimum":0},"file_id":{"type":"string","description":"The ID of the file."},"filename":{"type":"string","description":"The filename of the container file cited."},"start_index":{"type":"integer","format":"int32","description":"The index of the first character of the container file citation in the message.","minimum":0}},"title":"ContainerFileCitationBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["container_file_citation"]}}}],"description":"A citation for a container file used to generate a model response."},{"allOf":[{"description":"A path to a file.","type":"object","required":["file_id","index"],"properties":{"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","format":"int32","description":"The index of the file in the list of files.","minimum":0}},"title":"FilePath"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_path"]}}}],"description":"A path to a file."}],"title":"Annotation"},"description":"The annotations of the text output."},"logprobs":{"type":["array","null"],"items":{"type":"object","required":["bytes","logprob","token","top_logprobs"],"properties":{"bytes":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"logprob":{"type":"number","format":"double"},"token":{"type":"string"},"top_logprobs":{"type":"array","items":{"type":"object","required":["bytes","logprob","token"],"properties":{"bytes":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"logprob":{"type":"number","format":"double"},"token":{"type":"string"}},"title":"TopLogProb"}}},"title":"LogProb"}},"text":{"type":"string","description":"The text output from the model."}},"title":"OutputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["output_text"]}}}],"description":"A text output from the model."},{"allOf":[{"description":"A refusal from the model.","type":"object","required":["refusal"],"properties":{"refusal":{"type":"string","description":"The refusal explanation from the model."}},"title":"RefusalContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["refusal"]}}}],"description":"A refusal from the model."}],"title":"OutputMessageContent"},"description":"The content of the output message."},"id":{"type":"string","description":"The unique ID of the output message."},"role":{"description":"The role of the output message. Always `assistant`.","type":"string","enum":["assistant"],"title":"AssistantRole"},"status":{"description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}},"title":"OutputMessage"},{"description":"A structured input message (role: user/system/developer, content is `Vec<ContentType>`).\nHas structured content list and optional id/status fields.\n\nA message input to the model with a role indicating instruction following hierarchy.\nInstructions given with the `developer` or `system` role take precedence over instructions\ngiven with the `user` role.","type":"object","required":["content","role"],"properties":{"content":{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A text input to the model.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text input to the model."}},"title":"InputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_text"]}}}],"description":"A text input to the model."},{"allOf":[{"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision).","type":"object","required":["detail"],"properties":{"detail":{"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`.\nDefaults to `auto`.","type":"string","enum":["auto","low","high"],"title":"ImageDetail"},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"image_url":{"type":["string","null"],"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image\nin a data URL."}},"title":"InputImageContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_image"]}}}],"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision)."},{"allOf":[{"description":"A file input to the model.","type":"object","properties":{"file_data":{"type":["string","null"],"description":"The content of the file to be sent to the model."},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"file_url":{"type":["string","null"],"description":"The URL of the file to be sent to the model."},"filename":{"type":["string","null"],"description":"The name of the file to be sent to the model."}},"title":"InputFileContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_file"]}}}],"description":"A file input to the model."}],"description":"Parts of a message: text, image, file, or audio.","title":"InputContent"},"description":"A list of one or many input items to the model, containing different content types."},"role":{"description":"The role of the message input. One of `user`, `system`, or `developer`.\nNote: `assistant` is NOT allowed here; use OutputMessage instead.","type":"string","enum":["user","system","developer"],"title":"InputRole"},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]}},"title":"InputMessage"}],"title":"MessageItem"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["message"]}}}],"description":"A message (type: \"message\").\nCan represent InputMessage (user/system/developer) or OutputMessage (assistant).\n\nInputMessage:\n A message input to the model with a role indicating instruction following hierarchy.\n Instructions given with the developer or system role take precedence over instructions given with the user role.\nOutputMessage:\n A message output from the model."},{"allOf":[{"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.","type":"object","required":["id","queries","status"],"properties":{"id":{"type":"string","description":"The unique ID of the file search tool call."},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files."},"results":{"type":["array","null"],"items":{"type":"object","description":"A single result from a file search.","required":["attributes","file_id","filename","score","text"],"properties":{"attributes":{"type":"object","description":"Set of 16 key-value pairs that can be attached to an object. This can be useful for storing\nadditional information about the object in a structured format, and querying for objects\nAPI or the dashboard. Keys are strings with a maximum length of 64 characters\n. Values are strings with a maximum length of 512 characters, booleans, or numbers.","additionalProperties":{},"propertyNames":{"type":"string"}},"file_id":{"type":"string","description":"The unique ID of the file."},"filename":{"type":"string","description":"The name of the file."},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1."},"text":{"type":"string","description":"The text that was retrieved from the file."}},"title":"FileSearchToolCallResult"},"description":"The results of the file search tool call."},"status":{"description":"The status of the file search tool call. One of `in_progress`, `searching`,\n`incomplete`,`failed`, or `completed`.","type":"string","enum":["in_progress","searching","incomplete","failed","completed"],"title":"FileSearchToolCallStatus"}},"title":"FileSearchToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_search_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."},{"allOf":[{"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.","type":"object","required":["action","call_id","id","pending_safety_checks","status"],"properties":{"action":{"oneOf":[{"allOf":[{"description":"A click action.","type":"object","required":["button","x","y"],"properties":{"button":{"description":"Indicates which mouse button was pressed during the click. One of `left`,\n`right`, `wheel`, `back`, or `forward`.","type":"string","enum":["left","right","wheel","back","forward"],"title":"ClickButtonType"},"x":{"type":"integer","format":"int32","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","format":"int32","description":"The y-coordinate where the click occurred."}},"title":"ClickParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["click"]}}}],"description":"A click action."},{"allOf":[{"description":"A double click action.","type":"object","required":["x","y"],"properties":{"x":{"type":"integer","format":"int32","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","format":"int32","description":"The y-coordinate where the double click occurred."}},"title":"DoubleClickAction"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["double_click"]}}}],"description":"A double click action."},{"allOf":[{"description":"A drag action.","type":"object","required":["path"],"properties":{"path":{"type":"array","items":{"type":"object","description":"A point in 2D space.","required":["x","y"],"properties":{"x":{"type":"integer","format":"int32","description":"The x-coordinate."},"y":{"type":"integer","format":"int32","description":"The y-coordinate."}},"title":"DragPoint"},"description":"The path of points the cursor drags through."}},"title":"Drag"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["drag"]}}}],"description":"A drag action."},{"allOf":[{"description":"A collection of keypresses the model would like to perform.","type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"type":"string"},"description":"The combination of keys the model is requesting to be pressed.\nThis is an array of strings, each representing a key."}},"title":"KeyPressAction"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["keypress"]}}}],"description":"A collection of keypresses the model would like to perform."},{"allOf":[{"description":"A mouse move action.","type":"object","required":["x","y"],"properties":{"x":{"type":"integer","format":"int32","description":"The x-coordinate to move to."},"y":{"type":"integer","format":"int32","description":"The y-coordinate to move to."}},"title":"Move"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["move"]}}}],"description":"A mouse move action."},{"type":"object","description":"A screenshot action.","required":["type"],"properties":{"type":{"type":"string","enum":["screenshot"]}}},{"allOf":[{"description":"A scroll action.","type":"object","required":["scroll_x","scroll_y","x","y"],"properties":{"scroll_x":{"type":"integer","format":"int32","description":"The horizontal scroll distance."},"scroll_y":{"type":"integer","format":"int32","description":"The vertical scroll distance."},"x":{"type":"integer","format":"int32","description":"The x-coordinate where the scroll occurred."},"y":{"type":"integer","format":"int32","description":"The y-coordinate where the scroll occurred."}},"title":"Scroll"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scroll"]}}}],"description":"A scroll action."},{"allOf":[{"description":"An action to type in text.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text to type."}},"title":"Type"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["type"]}}}],"description":"An action to type in text."},{"type":"object","description":"A wait action.","required":["type"],"properties":{"type":{"type":"string","enum":["wait"]}}}],"description":"Represents all user‐triggered actions.","title":"ComputerAction"},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output."},"id":{"type":"string","description":"The unique ID of the computer call."},"pending_safety_checks":{"type":"array","items":{"type":"object","required":["id"],"properties":{"code":{"type":["string","null"],"description":"The type of the pending safety check."},"id":{"type":"string","description":"The ID of the pending safety check."},"message":{"type":["string","null"],"description":"Details about the pending safety check."}},"title":"ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call."},"status":{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}},"title":"ComputerToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["computer_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."},{"allOf":[{"description":"The output of a computer tool call.","type":"object","required":["call_id","output"],"properties":{"acknowledged_safety_checks":{"type":["array","null"],"items":{"type":"object","required":["id"],"properties":{"code":{"type":["string","null"],"description":"The type of the pending safety check."},"id":{"type":"string","description":"The ID of the pending safety check."},"message":{"type":["string","null"],"description":"Details about the pending safety check."}},"title":"ComputerCallSafetyCheckParam"},"description":"The safety checks reported by the API that have been acknowledged by the developer."},"call_id":{"type":"string","description":"The ID of the computer tool call that produced the output."},"id":{"type":["string","null"],"description":"The unique ID of the computer tool call output. Optional when creating."},"output":{"description":"A computer screenshot image used with the computer use tool.","type":"object","required":["type"],"properties":{"file_id":{"type":["string","null"],"description":"The identifier of an uploaded file that contains the screenshot."},"image_url":{"type":["string","null"],"description":"The URL of the screenshot image."},"type":{"description":"Specifies the event type. For a computer screenshot, this property is always\nset to `computer_screenshot`.","type":"string","enum":["computer_screenshot"],"title":"ComputerScreenshotImageType"}},"title":"ComputerScreenshotImage"},"status":{"oneOf":[{"type":"null"},{"description":"The status of the message input. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when input items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]}},"title":"ComputerCallOutputItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["computer_call_output"]}}}],"description":"The output of a computer tool call."},{"allOf":[{"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.","type":"object","required":["action","id","status"],"properties":{"action":{"description":"An object describing the specific action taken in this web search call. Includes\ndetails on how the model used the web (search, open_page, find).","oneOf":[{"allOf":[{"description":"Action type \"search\" - Performs a web search query.","type":"object","required":["query"],"properties":{"query":{"type":"string","description":"The search query."},"sources":{"type":["array","null"],"items":{"type":"object","required":["type","url"],"properties":{"type":{"type":"string","description":"The type of source. Always `url`."},"url":{"type":"string","description":"The URL of the source."}},"title":"WebSearchActionSearchSource"},"description":"The sources used in the search."}},"title":"WebSearchActionSearch"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["search"]}}}],"description":"Action type \"search\" - Performs a web search query."},{"allOf":[{"description":"Action type \"open_page\" - Opens a specific URL from search results.","type":"object","required":["url"],"properties":{"url":{"type":"string","description":"The URL opened by the model."}},"title":"WebSearchActionOpenPage"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["open_page"]}}}],"description":"Action type \"open_page\" - Opens a specific URL from search results."},{"allOf":[{"description":"Action type \"find\": Searches for a pattern within a loaded page.","type":"object","required":["url","pattern"],"properties":{"pattern":{"type":"string","description":"The pattern or text to search for within the page."},"url":{"type":"string","description":"The URL of the page searched for the pattern."}},"title":"WebSearchActionFind"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["find"]}}}],"description":"Action type \"find\": Searches for a pattern within a loaded page."}],"title":"WebSearchToolCallAction"},"id":{"type":"string","description":"The unique ID of the web search tool call."},"status":{"description":"The status of the web search tool call.","type":"string","enum":["in_progress","searching","completed","failed"],"title":"WebSearchToolCallStatus"}},"title":"WebSearchToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["web_search_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."},{"allOf":[{"description":"A tool call to run a function. See the\n\n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.","type":"object","required":["arguments","call_id","name"],"properties":{"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function."},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the function tool call."},"name":{"type":"string","description":"The name of the function to run."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]}},"title":"FunctionToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["function_call"]}}}],"description":"A tool call to run a function. See the\n\n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information."},{"allOf":[{"description":"The output of a function tool call.","type":"object","required":["call_id","output"],"properties":{"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the function tool call output.\nPopulated when this item is returned via API."},"output":{"description":"Text, image, or file output of the function tool call.","oneOf":[{"type":"string","description":"A JSON string of the output of the function tool call."},{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A text input to the model.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text input to the model."}},"title":"InputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_text"]}}}],"description":"A text input to the model."},{"allOf":[{"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision).","type":"object","required":["detail"],"properties":{"detail":{"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`.\nDefaults to `auto`.","type":"string","enum":["auto","low","high"],"title":"ImageDetail"},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"image_url":{"type":["string","null"],"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image\nin a data URL."}},"title":"InputImageContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_image"]}}}],"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision)."},{"allOf":[{"description":"A file input to the model.","type":"object","properties":{"file_data":{"type":["string","null"],"description":"The content of the file to be sent to the model."},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"file_url":{"type":["string","null"],"description":"The URL of the file to be sent to the model."},"filename":{"type":["string","null"],"description":"The name of the file to be sent to the model."}},"title":"InputFileContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_file"]}}}],"description":"A file input to the model."}],"description":"Parts of a message: text, image, file, or audio.","title":"InputContent"}}],"title":"FunctionCallOutput"},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]}},"title":"FunctionCallOutputItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["function_call_output"]}}}],"description":"The output of a function tool call."},{"allOf":[{"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).","type":"object","required":["id","summary"],"properties":{"content":{"type":["array","null"],"items":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The reasoning text from the model."}},"title":"ReasoningTextContent"},"description":"Reasoning text content."},"encrypted_content":{"type":["string","null"],"description":"The encrypted content of the reasoning item - populated when a response is generated with\n`reasoning.encrypted_content` in the `include` parameter."},"id":{"type":"string","description":"Unique identifier of the reasoning content."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]},"summary":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","description":"A single summary text fragment from reasoning.","required":["text"],"properties":{"text":{"type":"string","description":"A summary of the reasoning output from the model so far."}},"title":"Summary"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["summary_text"]}}}]}],"title":"SummaryPart"},"description":"Reasoning summary content."}},"title":"ReasoningItem"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["reasoning"]}}}],"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)."},{"allOf":[{"description":"A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).","type":"object","required":["encrypted_content"],"properties":{"encrypted_content":{"type":"string","description":"The encrypted content."},"id":{"type":["string","null"],"description":"The ID of the compaction item."}},"title":"CompactionSummaryItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["compaction"]}}}],"description":"A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact)."},{"allOf":[{"description":"An image generation request made by the model.","type":"object","required":["id","status"],"properties":{"id":{"type":"string","description":"The unique ID of the image generation call."},"result":{"type":["string","null"],"description":"The generated image encoded in base64."},"status":{"description":"The status of the image generation call.","type":"string","enum":["in_progress","completed","generating","failed"],"title":"ImageGenToolCallStatus"}},"title":"ImageGenToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["image_generation_call"]}}}],"description":"An image generation request made by the model."},{"allOf":[{"description":"A tool call to run code.","type":"object","required":["container_id","id","status"],"properties":{"code":{"type":["string","null"],"description":"The code to run, or null if not available."},"container_id":{"type":"string","description":"ID of the container used to run the code."},"id":{"type":"string","description":"The unique ID of the code interpreter tool call."},"outputs":{"type":["array","null"],"items":{"oneOf":[{"allOf":[{"description":"Code interpreter output logs","type":"object","required":["logs"],"properties":{"logs":{"type":"string","description":"The logs output from the code interpreter."}},"title":"CodeInterpreterOutputLogs"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["logs"]}}}],"description":"Code interpreter output logs"},{"allOf":[{"description":"Code interpreter output image","type":"object","required":["url"],"properties":{"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"title":"CodeInterpreterOutputImage"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["image"]}}}],"description":"Code interpreter output image"}],"description":"Individual result from a code interpreter: either logs or files.","title":"CodeInterpreterToolCallOutput"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available."},"status":{"description":"The status of the code interpreter tool call.\nValid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.","type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"title":"CodeInterpreterToolCallStatus"}},"title":"CodeInterpreterToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["code_interpreter_call"]}}}],"description":"A tool call to run code."},{"allOf":[{"description":"A tool call to run a command on the local shell.","type":"object","required":["action","call_id","id","status"],"properties":{"action":{"description":"Execute a shell command on the server.","type":"object","required":["command","env"],"properties":{"command":{"type":"array","items":{"type":"string"},"description":"The command to run."},"env":{"type":"object","description":"Environment variables to set for the command.","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"timeout_ms":{"type":["integer","null"],"format":"int64","description":"Optional timeout in milliseconds for the command.","minimum":0},"user":{"type":["string","null"],"description":"Optional user to run the command as."},"working_directory":{"type":["string","null"],"description":"Optional working directory to run the command in."}},"title":"LocalShellExecAction"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model."},"id":{"type":"string","description":"The unique ID of the local shell call."},"status":{"description":"The status of the local shell call.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}},"title":"LocalShellToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["local_shell_call"]}}}],"description":"A tool call to run a command on the local shell."},{"allOf":[{"description":"The output of a local shell tool call.","type":"object","required":["id","output"],"properties":{"id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model."},"output":{"type":"string","description":"A JSON string of the output of the local shell tool call."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]}},"title":"LocalShellToolCallOutput"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["local_shell_call_output"]}}}],"description":"The output of a local shell tool call."},{"allOf":[{"description":"A tool representing a request to execute one or more shell commands.","type":"object","required":["call_id","action"],"properties":{"action":{"description":"The shell commands and limits that describe how to run the tool call.","type":"object","required":["commands"],"properties":{"commands":{"type":"array","items":{"type":"string"},"description":"Ordered shell commands for the execution environment to run."},"max_output_length":{"type":["integer","null"],"format":"int64","description":"Maximum number of UTF-8 characters to capture from combined stdout and stderr output.","minimum":0},"timeout_ms":{"type":["integer","null"],"format":"int64","description":"Maximum wall-clock time in milliseconds to allow the shell commands to run.","minimum":0}},"title":"FunctionShellActionParam"},"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the shell tool call. Populated when this item is returned via API."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.","type":"string","enum":["in_progress","completed","incomplete"],"title":"FunctionShellCallItemStatus"}]}},"title":"FunctionShellCallItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["shell_call"]}}}],"description":"A tool representing a request to execute one or more shell commands."},{"allOf":[{"description":"The streamed output items emitted by a shell tool call.","type":"object","required":["call_id","output"],"properties":{"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the shell tool call output. Populated when this item is returned via API."},"max_output_length":{"type":["integer","null"],"format":"int64","description":"The maximum number of UTF-8 characters captured for this shell call's combined output.","minimum":0},"output":{"type":"array","items":{"type":"object","description":"Captured stdout and stderr for a portion of a shell tool call output.","required":["stdout","stderr","outcome"],"properties":{"outcome":{"description":"The exit or timeout outcome associated with this chunk.","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["timeout"]}}},{"allOf":[{"type":"object","description":"Indicates that the shell commands finished and returned an exit code.","required":["exit_code"],"properties":{"exit_code":{"type":"integer","format":"int32","description":"The exit code returned by the shell process."}},"title":"FunctionShellCallOutputExitOutcomeParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["exit"]}}}]}],"title":"FunctionShellCallOutputOutcomeParam"},"stderr":{"type":"string","description":"Captured stderr output for this chunk of the shell call."},"stdout":{"type":"string","description":"Captured stdout output for this chunk of the shell call."}},"title":"FunctionShellCallOutputContentParam"},"description":"Captured chunks of stdout and stderr output, along with their associated outcomes."}},"title":"FunctionShellCallOutputItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["shell_call_output"]}}}],"description":"The streamed output items emitted by a shell tool call."},{"allOf":[{"description":"A tool call representing a request to create, delete, or update files using diff patches.","type":"object","required":["call_id","status","operation"],"properties":{"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"operation":{"description":"The specific create, delete, or update instruction for the apply_patch tool call.","oneOf":[{"allOf":[{"type":"object","description":"Instruction for creating a new file via the apply_patch tool.","required":["path","diff"],"properties":{"diff":{"type":"string","description":"Unified diff content to apply when creating the file."},"path":{"type":"string","description":"Path of the file to create relative to the workspace root."}},"title":"ApplyPatchCreateFileOperationParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["create_file"]}}}]},{"allOf":[{"type":"object","description":"Instruction for deleting an existing file via the apply_patch tool.","required":["path"],"properties":{"path":{"type":"string","description":"Path of the file to delete relative to the workspace root."}},"title":"ApplyPatchDeleteFileOperationParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["delete_file"]}}}]},{"allOf":[{"type":"object","description":"Instruction for updating an existing file via the apply_patch tool.","required":["path","diff"],"properties":{"diff":{"type":"string","description":"Unified diff content to apply to the existing file."},"path":{"type":"string","description":"Path of the file to update relative to the workspace root."}},"title":"ApplyPatchUpdateFileOperationParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["update_file"]}}}]}],"title":"ApplyPatchOperationParam"},"status":{"description":"The status of the apply patch tool call. One of `in_progress` or `completed`.","type":"string","enum":["in_progress","completed"],"title":"ApplyPatchCallStatusParam"}},"title":"ApplyPatchToolCallItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["apply_patch_call"]}}}],"description":"A tool call representing a request to create, delete, or update files using diff patches."},{"allOf":[{"description":"The streamed output emitted by an apply patch tool call.","type":"object","required":["call_id","status"],"properties":{"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"output":{"type":["string","null"],"description":"Optional human-readable log text from the apply patch tool (e.g., patch results or errors)."},"status":{"description":"The status of the apply patch tool call output. One of `completed` or `failed`.","type":"string","enum":["completed","failed"],"title":"ApplyPatchCallOutputStatusParam"}},"title":"ApplyPatchToolCallOutputItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["apply_patch_call_output"]}}}],"description":"The streamed output emitted by an apply patch tool call."},{"allOf":[{"description":"A list of tools available on an MCP server.","type":"object","required":["id","server_label","tools"],"properties":{"error":{"type":["string","null"],"description":"Error message if listing failed."},"id":{"type":"string","description":"The unique ID of the list."},"server_label":{"type":"string","description":"The label of the MCP server."},"tools":{"type":"array","items":{"type":"object","required":["input_schema","name"],"properties":{"annotations":{"description":"Additional annotations about the tool."},"description":{"type":["string","null"],"description":"The description of the tool."},"input_schema":{"description":"The JSON schema describing the tool's input."},"name":{"type":"string","description":"The name of the tool."}},"title":"MCPListToolsTool"},"description":"The tools available on the server."}},"title":"MCPListTools"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_list_tools"]}}}],"description":"A list of tools available on an MCP server."},{"allOf":[{"description":"A request for human approval of a tool invocation.","type":"object","required":["arguments","id","name","server_label"],"properties":{"arguments":{"type":"string","description":"JSON string of arguments for the tool."},"id":{"type":"string","description":"The unique ID of the approval request."},"name":{"type":"string","description":"The name of the tool to run."},"server_label":{"type":"string","description":"The label of the MCP server making the request."}},"title":"MCPApprovalRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_approval_request"]}}}],"description":"A request for human approval of a tool invocation."},{"allOf":[{"description":"A response to an MCP approval request.","type":"object","required":["approval_request_id","approve"],"properties":{"approval_request_id":{"type":"string","description":"The ID of the approval request being answered."},"approve":{"type":"boolean","description":"Whether the request was approved."},"id":{"type":["string","null"],"description":"The unique ID of the approval response"},"reason":{"type":["string","null"],"description":"Optional reason for the decision."}},"title":"MCPApprovalResponse"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_approval_response"]}}}],"description":"A response to an MCP approval request."},{"allOf":[{"description":"An invocation of a tool on an MCP server.","type":"object","required":["arguments","id","name","server_label"],"properties":{"approval_request_id":{"type":["string","null"],"description":"Unique identifier for the MCP tool call approval request. Include this value\nin a subsequent `mcp_approval_response` input to approve or reject the corresponding\ntool call."},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool."},"error":{"type":["string","null"],"description":"Error message from the call, if any."},"id":{"type":"string","description":"The unique ID of the tool call."},"name":{"type":"string","description":"The name of the tool that was run."},"output":{"type":["string","null"],"description":"The output from the tool call."},"server_label":{"type":"string","description":"The label of the MCP server running the tool."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`,\n`calling`, or `failed`.","type":"string","enum":["in_progress","completed","incomplete","calling","failed"],"title":"MCPToolCallStatus"}]}},"title":"MCPToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_call"]}}}],"description":"An invocation of a tool on an MCP server."},{"allOf":[{"description":"The output of a custom tool call from your code, being sent back to the model.","type":"object","required":["call_id","output"],"properties":{"call_id":{"type":"string","description":"The call ID, used to map this custom tool call output to a custom tool call."},"id":{"type":["string","null"],"description":"The unique ID of the custom tool call output in the OpenAI platform."},"output":{"description":"The output from the custom tool call generated by your code.\nCan be a string or an list of output content.","oneOf":[{"type":"string","description":"A string of the output of the custom tool call."},{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A text input to the model.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text input to the model."}},"title":"InputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_text"]}}}],"description":"A text input to the model."},{"allOf":[{"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision).","type":"object","required":["detail"],"properties":{"detail":{"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`.\nDefaults to `auto`.","type":"string","enum":["auto","low","high"],"title":"ImageDetail"},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"image_url":{"type":["string","null"],"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image\nin a data URL."}},"title":"InputImageContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_image"]}}}],"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision)."},{"allOf":[{"description":"A file input to the model.","type":"object","properties":{"file_data":{"type":["string","null"],"description":"The content of the file to be sent to the model."},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"file_url":{"type":["string","null"],"description":"The URL of the file to be sent to the model."},"filename":{"type":["string","null"],"description":"The name of the file to be sent to the model."}},"title":"InputFileContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_file"]}}}],"description":"A file input to the model."}],"description":"Parts of a message: text, image, file, or audio.","title":"InputContent"},"description":"Text, image, or file output of the custom tool call."}],"title":"CustomToolCallOutputOutput"}},"title":"CustomToolCallOutput"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["custom_tool_call_output"]}}}],"description":"The output of a custom tool call from your code, being sent back to the model."},{"allOf":[{"description":"A call to a custom tool created by the model.","type":"object","required":["call_id","input","name","id"],"properties":{"call_id":{"type":"string","description":"An identifier used to map this custom tool call to a tool call output."},"id":{"type":"string","description":"The unique ID of the custom tool call in the OpenAI platform."},"input":{"type":"string","description":"The input for the custom tool call generated by the model."},"name":{"type":"string","description":"The name of the custom tool being called."}},"title":"CustomToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["custom_tool_call"]}}}],"description":"A call to a custom tool created by the model."}],"title":"Item"},{"description":"A simple, user-friendly message input (EasyInputMessage).\nSupports string content and can include assistant role for previous responses.\nMust be tried last as it's the most flexible structure.\n\nA 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.","type":"object","required":["type","role","content"],"properties":{"content":{"description":"Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.","oneOf":[{"type":"string","description":"A text input to the model."},{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A text input to the model.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text input to the model."}},"title":"InputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_text"]}}}],"description":"A text input to the model."},{"allOf":[{"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision).","type":"object","required":["detail"],"properties":{"detail":{"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`.\nDefaults to `auto`.","type":"string","enum":["auto","low","high"],"title":"ImageDetail"},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"image_url":{"type":["string","null"],"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image\nin a data URL."}},"title":"InputImageContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_image"]}}}],"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision)."},{"allOf":[{"description":"A file input to the model.","type":"object","properties":{"file_data":{"type":["string","null"],"description":"The content of the file to be sent to the model."},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"file_url":{"type":["string","null"],"description":"The URL of the file to be sent to the model."},"filename":{"type":["string","null"],"description":"The name of the file to be sent to the model."}},"title":"InputFileContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_file"]}}}],"description":"A file input to the model."}],"description":"Parts of a message: text, image, file, or audio.","title":"InputContent"},"description":"A list of one or many input items to the model, containing different content types."}],"title":"EasyInputContent"},"role":{"description":"The role of the message input. One of `user`, `assistant`, `system`, or `developer`.","type":"string","enum":["user","assistant","system","developer"],"title":"Role"},"type":{"description":"The type of the message input. Always set to `message`.","type":"string","enum":["message"],"title":"MessageType"}},"title":"EasyInputMessage"}],"description":"Input item that can be used in the context for generating a response.\n\nThis represents the OpenAPI `InputItem` schema which is an `anyOf`:\n1. `EasyInputMessage` - Simple, user-friendly message input (can use string content)\n2. `Item` - Structured items with proper type discrimination (including InputMessage, OutputMessage, tool calls)\n3. `ItemReferenceParam` - Reference to an existing item by ID (type can be null)\n\nUses untagged deserialization because these types overlap in structure.\nOrder matters: more specific structures are tried first.\n\n# OpenAPI Specification\nCorresponds to the `InputItem` schema: `anyOf[EasyInputMessage, Item, ItemReferenceParam]`","title":"InputItem"},"description":"A list of one or many input items to the model, containing different content types."}],"title":"Instructions"}]},"max_output_tokens":{"type":["integer","null"],"format":"int32","description":"An upper bound for the number of tokens that can be generated for a response,\nincluding visible output tokens and\n[reasoning tokens](https://platform.openai.com/docs/guides/reasoning).","minimum":0},"metadata":{"type":["object","null"],"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.","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"model":{"type":"string","description":"Model ID used to generate the response, like gpt-4o or o3. OpenAI offers a\nwide range of models with different capabilities, performance characteristics,\nand price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models."},"object":{"type":"string","description":"The object type of this resource - always set to `response`."},"output":{"type":"array","items":{"oneOf":[{"allOf":[{"description":"An output message from the model.","type":"object","required":["content","id","role","status"],"properties":{"content":{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A text output from the model.","type":"object","required":["annotations","text"],"properties":{"annotations":{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A citation to a file.","type":"object","required":["file_id","filename","index"],"properties":{"file_id":{"type":"string","description":"The ID of the file."},"filename":{"type":"string","description":"The filename of the file cited."},"index":{"type":"integer","format":"int32","description":"The index of the file in the list of files.","minimum":0}},"title":"FileCitationBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_citation"]}}}],"description":"A citation to a file."},{"allOf":[{"description":"A citation for a web resource used to generate a model response.","type":"object","required":["end_index","start_index","title","url"],"properties":{"end_index":{"type":"integer","format":"int32","description":"The index of the last character of the URL citation in the message.","minimum":0},"start_index":{"type":"integer","format":"int32","description":"The index of the first character of the URL citation in the message.","minimum":0},"title":{"type":"string","description":"The title of the web resource."},"url":{"type":"string","description":"The URL of the web resource."}},"title":"UrlCitationBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["url_citation"]}}}],"description":"A citation for a web resource used to generate a model response."},{"allOf":[{"description":"A citation for a container file used to generate a model response.","type":"object","required":["container_id","end_index","file_id","filename","start_index"],"properties":{"container_id":{"type":"string","description":"The ID of the container file."},"end_index":{"type":"integer","format":"int32","description":"The index of the last character of the container file citation in the message.","minimum":0},"file_id":{"type":"string","description":"The ID of the file."},"filename":{"type":"string","description":"The filename of the container file cited."},"start_index":{"type":"integer","format":"int32","description":"The index of the first character of the container file citation in the message.","minimum":0}},"title":"ContainerFileCitationBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["container_file_citation"]}}}],"description":"A citation for a container file used to generate a model response."},{"allOf":[{"description":"A path to a file.","type":"object","required":["file_id","index"],"properties":{"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","format":"int32","description":"The index of the file in the list of files.","minimum":0}},"title":"FilePath"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_path"]}}}],"description":"A path to a file."}],"title":"Annotation"},"description":"The annotations of the text output."},"logprobs":{"type":["array","null"],"items":{"type":"object","required":["bytes","logprob","token","top_logprobs"],"properties":{"bytes":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"logprob":{"type":"number","format":"double"},"token":{"type":"string"},"top_logprobs":{"type":"array","items":{"type":"object","required":["bytes","logprob","token"],"properties":{"bytes":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"logprob":{"type":"number","format":"double"},"token":{"type":"string"}},"title":"TopLogProb"}}},"title":"LogProb"}},"text":{"type":"string","description":"The text output from the model."}},"title":"OutputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["output_text"]}}}],"description":"A text output from the model."},{"allOf":[{"description":"A refusal from the model.","type":"object","required":["refusal"],"properties":{"refusal":{"type":"string","description":"The refusal explanation from the model."}},"title":"RefusalContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["refusal"]}}}],"description":"A refusal from the model."}],"title":"OutputMessageContent"},"description":"The content of the output message."},"id":{"type":"string","description":"The unique ID of the output message."},"role":{"description":"The role of the output message. Always `assistant`.","type":"string","enum":["assistant"],"title":"AssistantRole"},"status":{"description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}},"title":"OutputMessage"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["message"]}}}],"description":"An output message from the model."},{"allOf":[{"description":"The results of a file search tool call. See the\n[file search guide](https://platform.openai.com/docs/guides/tools-file-search)\nfor more information.","type":"object","required":["id","queries","status"],"properties":{"id":{"type":"string","description":"The unique ID of the file search tool call."},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files."},"results":{"type":["array","null"],"items":{"type":"object","description":"A single result from a file search.","required":["attributes","file_id","filename","score","text"],"properties":{"attributes":{"type":"object","description":"Set of 16 key-value pairs that can be attached to an object. This can be useful for storing\nadditional information about the object in a structured format, and querying for objects\nAPI or the dashboard. Keys are strings with a maximum length of 64 characters\n. Values are strings with a maximum length of 512 characters, booleans, or numbers.","additionalProperties":{},"propertyNames":{"type":"string"}},"file_id":{"type":"string","description":"The unique ID of the file."},"filename":{"type":"string","description":"The name of the file."},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1."},"text":{"type":"string","description":"The text that was retrieved from the file."}},"title":"FileSearchToolCallResult"},"description":"The results of the file search tool call."},"status":{"description":"The status of the file search tool call. One of `in_progress`, `searching`,\n`incomplete`,`failed`, or `completed`.","type":"string","enum":["in_progress","searching","incomplete","failed","completed"],"title":"FileSearchToolCallStatus"}},"title":"FileSearchToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_search_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)\nfor more information."},{"allOf":[{"description":"A tool call to run a function. See the\n[function calling guide](https://platform.openai.com/docs/guides/function-calling)\nfor more information.","type":"object","required":["arguments","call_id","name"],"properties":{"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function."},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the function tool call."},"name":{"type":"string","description":"The name of the function to run."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]}},"title":"FunctionToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["function_call"]}}}],"description":"A tool call to run a function. See the\n[function calling guide](https://platform.openai.com/docs/guides/function-calling)\nfor more information."},{"allOf":[{"description":"The results of a web search tool call. See the\n[web search guide](https://platform.openai.com/docs/guides/tools-web-search)\nfor more information.","type":"object","required":["action","id","status"],"properties":{"action":{"description":"An object describing the specific action taken in this web search call. Includes\ndetails on how the model used the web (search, open_page, find).","oneOf":[{"allOf":[{"description":"Action type \"search\" - Performs a web search query.","type":"object","required":["query"],"properties":{"query":{"type":"string","description":"The search query."},"sources":{"type":["array","null"],"items":{"type":"object","required":["type","url"],"properties":{"type":{"type":"string","description":"The type of source. Always `url`."},"url":{"type":"string","description":"The URL of the source."}},"title":"WebSearchActionSearchSource"},"description":"The sources used in the search."}},"title":"WebSearchActionSearch"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["search"]}}}],"description":"Action type \"search\" - Performs a web search query."},{"allOf":[{"description":"Action type \"open_page\" - Opens a specific URL from search results.","type":"object","required":["url"],"properties":{"url":{"type":"string","description":"The URL opened by the model."}},"title":"WebSearchActionOpenPage"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["open_page"]}}}],"description":"Action type \"open_page\" - Opens a specific URL from search results."},{"allOf":[{"description":"Action type \"find\": Searches for a pattern within a loaded page.","type":"object","required":["url","pattern"],"properties":{"pattern":{"type":"string","description":"The pattern or text to search for within the page."},"url":{"type":"string","description":"The URL of the page searched for the pattern."}},"title":"WebSearchActionFind"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["find"]}}}],"description":"Action type \"find\": Searches for a pattern within a loaded page."}],"title":"WebSearchToolCallAction"},"id":{"type":"string","description":"The unique ID of the web search tool call."},"status":{"description":"The status of the web search tool call.","type":"string","enum":["in_progress","searching","completed","failed"],"title":"WebSearchToolCallStatus"}},"title":"WebSearchToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["web_search_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)\nfor more information."},{"allOf":[{"description":"A tool call to a computer use tool. See the\n[computer use guide](https://platform.openai.com/docs/guides/tools-computer-use)\nfor more information.","type":"object","required":["action","call_id","id","pending_safety_checks","status"],"properties":{"action":{"oneOf":[{"allOf":[{"description":"A click action.","type":"object","required":["button","x","y"],"properties":{"button":{"description":"Indicates which mouse button was pressed during the click. One of `left`,\n`right`, `wheel`, `back`, or `forward`.","type":"string","enum":["left","right","wheel","back","forward"],"title":"ClickButtonType"},"x":{"type":"integer","format":"int32","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","format":"int32","description":"The y-coordinate where the click occurred."}},"title":"ClickParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["click"]}}}],"description":"A click action."},{"allOf":[{"description":"A double click action.","type":"object","required":["x","y"],"properties":{"x":{"type":"integer","format":"int32","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","format":"int32","description":"The y-coordinate where the double click occurred."}},"title":"DoubleClickAction"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["double_click"]}}}],"description":"A double click action."},{"allOf":[{"description":"A drag action.","type":"object","required":["path"],"properties":{"path":{"type":"array","items":{"type":"object","description":"A point in 2D space.","required":["x","y"],"properties":{"x":{"type":"integer","format":"int32","description":"The x-coordinate."},"y":{"type":"integer","format":"int32","description":"The y-coordinate."}},"title":"DragPoint"},"description":"The path of points the cursor drags through."}},"title":"Drag"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["drag"]}}}],"description":"A drag action."},{"allOf":[{"description":"A collection of keypresses the model would like to perform.","type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"type":"string"},"description":"The combination of keys the model is requesting to be pressed.\nThis is an array of strings, each representing a key."}},"title":"KeyPressAction"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["keypress"]}}}],"description":"A collection of keypresses the model would like to perform."},{"allOf":[{"description":"A mouse move action.","type":"object","required":["x","y"],"properties":{"x":{"type":"integer","format":"int32","description":"The x-coordinate to move to."},"y":{"type":"integer","format":"int32","description":"The y-coordinate to move to."}},"title":"Move"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["move"]}}}],"description":"A mouse move action."},{"type":"object","description":"A screenshot action.","required":["type"],"properties":{"type":{"type":"string","enum":["screenshot"]}}},{"allOf":[{"description":"A scroll action.","type":"object","required":["scroll_x","scroll_y","x","y"],"properties":{"scroll_x":{"type":"integer","format":"int32","description":"The horizontal scroll distance."},"scroll_y":{"type":"integer","format":"int32","description":"The vertical scroll distance."},"x":{"type":"integer","format":"int32","description":"The x-coordinate where the scroll occurred."},"y":{"type":"integer","format":"int32","description":"The y-coordinate where the scroll occurred."}},"title":"Scroll"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scroll"]}}}],"description":"A scroll action."},{"allOf":[{"description":"An action to type in text.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text to type."}},"title":"Type"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["type"]}}}],"description":"An action to type in text."},{"type":"object","description":"A wait action.","required":["type"],"properties":{"type":{"type":"string","enum":["wait"]}}}],"description":"Represents all user‐triggered actions.","title":"ComputerAction"},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output."},"id":{"type":"string","description":"The unique ID of the computer call."},"pending_safety_checks":{"type":"array","items":{"type":"object","required":["id"],"properties":{"code":{"type":["string","null"],"description":"The type of the pending safety check."},"id":{"type":"string","description":"The ID of the pending safety check."},"message":{"type":["string","null"],"description":"Details about the pending safety check."}},"title":"ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call."},"status":{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}},"title":"ComputerToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["computer_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)\nfor more information."},{"allOf":[{"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 for\nsubsequent turns of a conversation if you are manually\n[managing context](https://platform.openai.com/docs/guides/conversation-state).","type":"object","required":["id","summary"],"properties":{"content":{"type":["array","null"],"items":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The reasoning text from the model."}},"title":"ReasoningTextContent"},"description":"Reasoning text content."},"encrypted_content":{"type":["string","null"],"description":"The encrypted content of the reasoning item - populated when a response is generated with\n`reasoning.encrypted_content` in the `include` parameter."},"id":{"type":"string","description":"Unique identifier of the reasoning content."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]},"summary":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","description":"A single summary text fragment from reasoning.","required":["text"],"properties":{"text":{"type":"string","description":"A summary of the reasoning output from the model so far."}},"title":"Summary"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["summary_text"]}}}]}],"title":"SummaryPart"},"description":"Reasoning summary content."}},"title":"ReasoningItem"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["reasoning"]}}}],"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 for\nsubsequent turns of a conversation if you are manually\n[managing context](https://platform.openai.com/docs/guides/conversation-state)."},{"allOf":[{"description":"A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).","type":"object","required":["id","encrypted_content"],"properties":{"created_by":{"type":["string","null"],"description":"Created by model/user identifier."},"encrypted_content":{"type":"string","description":"The encrypted content."},"id":{"type":"string","description":"The unique ID of the compaction item."}},"title":"CompactionBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["compaction"]}}}],"description":"A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact)."},{"allOf":[{"description":"An image generation request made by the model.","type":"object","required":["id","status"],"properties":{"id":{"type":"string","description":"The unique ID of the image generation call."},"result":{"type":["string","null"],"description":"The generated image encoded in base64."},"status":{"description":"The status of the image generation call.","type":"string","enum":["in_progress","completed","generating","failed"],"title":"ImageGenToolCallStatus"}},"title":"ImageGenToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["image_generation_call"]}}}],"description":"An image generation request made by the model."},{"allOf":[{"description":"A tool call to run code.","type":"object","required":["container_id","id","status"],"properties":{"code":{"type":["string","null"],"description":"The code to run, or null if not available."},"container_id":{"type":"string","description":"ID of the container used to run the code."},"id":{"type":"string","description":"The unique ID of the code interpreter tool call."},"outputs":{"type":["array","null"],"items":{"oneOf":[{"allOf":[{"description":"Code interpreter output logs","type":"object","required":["logs"],"properties":{"logs":{"type":"string","description":"The logs output from the code interpreter."}},"title":"CodeInterpreterOutputLogs"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["logs"]}}}],"description":"Code interpreter output logs"},{"allOf":[{"description":"Code interpreter output image","type":"object","required":["url"],"properties":{"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"title":"CodeInterpreterOutputImage"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["image"]}}}],"description":"Code interpreter output image"}],"description":"Individual result from a code interpreter: either logs or files.","title":"CodeInterpreterToolCallOutput"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available."},"status":{"description":"The status of the code interpreter tool call.\nValid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.","type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"title":"CodeInterpreterToolCallStatus"}},"title":"CodeInterpreterToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["code_interpreter_call"]}}}],"description":"A tool call to run code."},{"allOf":[{"description":"A tool call to run a command on the local shell.","type":"object","required":["action","call_id","id","status"],"properties":{"action":{"description":"Execute a shell command on the server.","type":"object","required":["command","env"],"properties":{"command":{"type":"array","items":{"type":"string"},"description":"The command to run."},"env":{"type":"object","description":"Environment variables to set for the command.","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"timeout_ms":{"type":["integer","null"],"format":"int64","description":"Optional timeout in milliseconds for the command.","minimum":0},"user":{"type":["string","null"],"description":"Optional user to run the command as."},"working_directory":{"type":["string","null"],"description":"Optional working directory to run the command in."}},"title":"LocalShellExecAction"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model."},"id":{"type":"string","description":"The unique ID of the local shell call."},"status":{"description":"The status of the local shell call.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}},"title":"LocalShellToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["local_shell_call"]}}}],"description":"A tool call to run a command on the local shell."},{"allOf":[{"description":"A tool call that executes one or more shell commands in a managed environment.","type":"object","required":["id","call_id","action","status"],"properties":{"action":{"description":"The shell commands and limits that describe how to run the tool call.","type":"object","required":["commands"],"properties":{"commands":{"type":"array","items":{"type":"string"},"description":"A list of commands to run."},"max_output_length":{"type":["integer","null"],"format":"int64","description":"Optional maximum number of characters to return from each command.","minimum":0},"timeout_ms":{"type":["integer","null"],"format":"int64","description":"Optional timeout in milliseconds for the commands.","minimum":0}},"title":"FunctionShellAction"},"call_id":{"type":"string","description":"The unique ID of the function shell tool call generated by the model."},"created_by":{"type":["string","null"],"description":"The ID of the entity that created this tool call."},"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API."},"status":{"description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.","type":"string","enum":["in_progress","completed","incomplete"],"title":"LocalShellCallStatus"}},"title":"FunctionShellCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["shell_call"]}}}],"description":"A tool call that executes one or more shell commands in a managed environment."},{"allOf":[{"description":"The output of a shell tool call.","type":"object","required":["id","call_id","output"],"properties":{"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"created_by":{"type":["string","null"]},"id":{"type":"string","description":"The unique ID of the shell call output. Populated when this item is returned via API."},"max_output_length":{"type":["integer","null"],"format":"int64","description":"The maximum length of the shell command output. This is generated by the model and should be\npassed back with the raw output.","minimum":0},"output":{"type":"array","items":{"allOf":[{"description":"Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["timeout"]}}},{"allOf":[{"type":"object","description":"Indicates that the shell commands finished and returned an exit code.","required":["exit_code"],"properties":{"exit_code":{"type":"integer","format":"int32","description":"Exit code from the shell process."}},"title":"FunctionShellCallOutputExitOutcome"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["exit"]}}}]}],"title":"FunctionShellCallOutputOutcome"},{"type":"object","required":["stdout","stderr"],"properties":{"created_by":{"type":["string","null"]},"stderr":{"type":"string"},"stdout":{"type":"string"}}}],"description":"The content of a shell call output.","title":"FunctionShellCallOutputContent"},"description":"An array of shell call output contents"}},"title":"FunctionShellCallOutput"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["shell_call_output"]}}}],"description":"The output of a shell tool call."},{"allOf":[{"description":"A tool call that applies file diffs by creating, deleting, or updating files.","type":"object","required":["id","call_id","status","operation"],"properties":{"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"created_by":{"type":["string","null"],"description":"The ID of the entity that created this tool call."},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"operation":{"description":"One of the create_file, delete_file, or update_file operations applied via apply_patch.","oneOf":[{"allOf":[{"type":"object","description":"Instruction describing how to create a file via the apply_patch tool.","required":["path","diff"],"properties":{"diff":{"type":"string","description":"Diff to apply."},"path":{"type":"string","description":"Path of the file to create."}},"title":"ApplyPatchCreateFileOperation"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["create_file"]}}}]},{"allOf":[{"type":"object","description":"Instruction describing how to delete a file via the apply_patch tool.","required":["path"],"properties":{"path":{"type":"string","description":"Path of the file to delete."}},"title":"ApplyPatchDeleteFileOperation"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["delete_file"]}}}]},{"allOf":[{"type":"object","description":"Instruction describing how to update a file via the apply_patch tool.","required":["path","diff"],"properties":{"diff":{"type":"string","description":"Diff to apply."},"path":{"type":"string","description":"Path of the file to update."}},"title":"ApplyPatchUpdateFileOperation"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["update_file"]}}}]}],"title":"ApplyPatchOperation"},"status":{"description":"The status of the apply patch tool call. One of `in_progress` or `completed`.","type":"string","enum":["in_progress","completed"],"title":"ApplyPatchCallStatus"}},"title":"ApplyPatchToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["apply_patch_call"]}}}],"description":"A tool call that applies file diffs by creating, deleting, or updating files."},{"allOf":[{"description":"The output emitted by an apply patch tool call.","type":"object","required":["id","call_id","status"],"properties":{"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"created_by":{"type":["string","null"],"description":"The ID of the entity that created this tool call output."},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"output":{"type":["string","null"],"description":"Optional textual output returned by the apply patch tool."},"status":{"description":"The status of the apply patch tool call output. One of `completed` or `failed`.","type":"string","enum":["completed","failed"],"title":"ApplyPatchCallOutputStatus"}},"title":"ApplyPatchToolCallOutput"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["apply_patch_call_output"]}}}],"description":"The output emitted by an apply patch tool call."},{"allOf":[{"description":"An invocation of a tool on an MCP server.","type":"object","required":["arguments","id","name","server_label"],"properties":{"approval_request_id":{"type":["string","null"],"description":"Unique identifier for the MCP tool call approval request. Include this value\nin a subsequent `mcp_approval_response` input to approve or reject the corresponding\ntool call."},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool."},"error":{"type":["string","null"],"description":"Error message from the call, if any."},"id":{"type":"string","description":"The unique ID of the tool call."},"name":{"type":"string","description":"The name of the tool that was run."},"output":{"type":["string","null"],"description":"The output from the tool call."},"server_label":{"type":"string","description":"The label of the MCP server running the tool."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`,\n`calling`, or `failed`.","type":"string","enum":["in_progress","completed","incomplete","calling","failed"],"title":"MCPToolCallStatus"}]}},"title":"MCPToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_call"]}}}],"description":"An invocation of a tool on an MCP server."},{"allOf":[{"description":"A list of tools available on an MCP server.","type":"object","required":["id","server_label","tools"],"properties":{"error":{"type":["string","null"],"description":"Error message if listing failed."},"id":{"type":"string","description":"The unique ID of the list."},"server_label":{"type":"string","description":"The label of the MCP server."},"tools":{"type":"array","items":{"type":"object","required":["input_schema","name"],"properties":{"annotations":{"description":"Additional annotations about the tool."},"description":{"type":["string","null"],"description":"The description of the tool."},"input_schema":{"description":"The JSON schema describing the tool's input."},"name":{"type":"string","description":"The name of the tool."}},"title":"MCPListToolsTool"},"description":"The tools available on the server."}},"title":"MCPListTools"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_list_tools"]}}}],"description":"A list of tools available on an MCP server."},{"allOf":[{"description":"A request for human approval of a tool invocation.","type":"object","required":["arguments","id","name","server_label"],"properties":{"arguments":{"type":"string","description":"JSON string of arguments for the tool."},"id":{"type":"string","description":"The unique ID of the approval request."},"name":{"type":"string","description":"The name of the tool to run."},"server_label":{"type":"string","description":"The label of the MCP server making the request."}},"title":"MCPApprovalRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_approval_request"]}}}],"description":"A request for human approval of a tool invocation."},{"allOf":[{"description":"A call to a custom tool created by the model.","type":"object","required":["call_id","input","name","id"],"properties":{"call_id":{"type":"string","description":"An identifier used to map this custom tool call to a tool call output."},"id":{"type":"string","description":"The unique ID of the custom tool call in the OpenAI platform."},"input":{"type":"string","description":"The input for the custom tool call generated by the model."},"name":{"type":"string","description":"The name of the custom tool being called."}},"title":"CustomToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["custom_tool_call"]}}}],"description":"A call to a custom tool created by the model."}],"description":"Output item","title":"OutputItem"},"description":"An array of content items generated by the model.\n\n- The length and order of items in the output array is dependent on the model's response.\n- Rather than accessing the first item in the output array and assuming it's an assistant\n message with the content generated by the model, you might consider using\n the `output_text` property where supported in SDKs."},"parallel_tool_calls":{"type":["boolean","null"],"description":"SDK-only convenience property that contains the aggregated text output from all\n`output_text` items in the `output` array, if any are present.\nSupported in the Python and JavaScript SDKs.\nWhether to allow the model to run tool calls in parallel."},"previous_response_id":{"type":["string","null"],"description":"The unique ID of the previous response to the model. Use this to create multi-turn conversations.\nLearn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state).\nCannot be used in conjunction with `conversation`."},"prompt":{"oneOf":[{"type":"null"},{"description":"Reference to a prompt template and its variables.\n[Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).","type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The unique identifier of the prompt template to use."},"variables":{"oneOf":[{"type":"null"},{"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.","oneOf":[{"type":"string"},{"oneOf":[{"allOf":[{"description":"A text input to the model.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text input to the model."}},"title":"InputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_text"]}}}],"description":"A text input to the model."},{"allOf":[{"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision).","type":"object","required":["detail"],"properties":{"detail":{"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`.\nDefaults to `auto`.","type":"string","enum":["auto","low","high"],"title":"ImageDetail"},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"image_url":{"type":["string","null"],"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image\nin a data URL."}},"title":"InputImageContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_image"]}}}],"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision)."},{"allOf":[{"description":"A file input to the model.","type":"object","properties":{"file_data":{"type":["string","null"],"description":"The content of the file to be sent to the model."},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"file_url":{"type":["string","null"],"description":"The URL of the file to be sent to the model."},"filename":{"type":["string","null"],"description":"The name of the file to be sent to the model."}},"title":"InputFileContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_file"]}}}],"description":"A file input to the model."}],"description":"Parts of a message: text, image, file, or audio.","title":"InputContent"},{}],"title":"ResponsePromptVariables"}]},"version":{"type":["string","null"],"description":"Optional version of the prompt template."}},"title":"Prompt"}]},"prompt_cache_key":{"type":["string","null"],"description":"Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces\nthe `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching)."},"prompt_cache_retention":{"oneOf":[{"type":"null"},{"description":"The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching,\nwhich keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn\nmore](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).","type":"string","enum":["in-memory","24h"],"title":"PromptCacheRetention"}]},"reasoning":{"oneOf":[{"type":"null"},{"description":"**gpt-5 and o-series models only**\nConfiguration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning).","type":"object","properties":{"effort":{"oneOf":[{"type":"null"},{"description":"Constrains effort on reasoning for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).\nCurrently supported values are `minimal`, `low`, `medium`, and `high`. Reducing\nreasoning effort can result in faster responses and fewer tokens used\non reasoning in a response.\n\nNote: The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.","type":"string","enum":["none","minimal","low","medium","high","xhigh"],"title":"ReasoningEffort"}]},"summary":{"oneOf":[{"type":"null"},{"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\n`gpt-5`.","type":"string","enum":["auto","concise","detailed"],"title":"ReasoningSummary"}]}},"title":"Reasoning"}]},"safety_identifier":{"type":["string","null"],"description":"A stable identifier used to help detect users of your application that may be violating OpenAI's\nusage policies.\n\nThe IDs should be a string that uniquely identifies each user. We recommend hashing their username\nor email address, in order to avoid sending us any identifying information. [Learn\nmore](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers)."},"service_tier":{"oneOf":[{"type":"null"},{"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\nWhen 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.","type":"string","enum":["auto","default","flex","scale","priority"],"title":"ServiceTier"}]},"status":{"description":"The status of the response generation.\nOne of `completed`, `failed`, `in_progress`, `cancelled`, `queued`, or `incomplete`.","type":"string","enum":["completed","failed","in_progress","cancelled","queued","incomplete"],"title":"Status"},"temperature":{"type":["number","null"],"format":"float","description":"What sampling temperature was used, between 0 and 2. Higher values like 0.8 make\noutputs more random, lower values like 0.2 make output more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both."},"text":{"oneOf":[{"type":"null"},{"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)","type":"object","required":["format"],"properties":{"format":{"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.","oneOf":[{"type":"object","description":"Default response format. Used to generate text responses.","required":["type"],"properties":{"type":{"type":"string","enum":["text"]}}},{"type":"object","description":"JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it.\nNote that the model will not generate JSON without a system or user message\ninstructing it to do so.","required":["type"],"properties":{"type":{"type":"string","enum":["json_object"]}}},{"allOf":[{"type":"object","required":["name"],"properties":{"description":{"type":["string","null"],"description":"A description of what the response format is for, used by the model to determine how to respond in the format."},"name":{"type":"string","description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."},"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/)."},"strict":{"type":["boolean","null"],"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)."}},"title":"ResponseFormatJsonSchema","description":"JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)."},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["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)."}],"title":"TextResponseFormatConfiguration"},"verbosity":{"oneOf":[{"type":"null"},{"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.\n\nCurrently supported values are `low`, `medium`, and `high`.","type":"string","enum":["low","medium","high"],"title":"Verbosity"}]}},"title":"ResponseTextParam"}]},"tool_choice":{"oneOf":[{"type":"null"},{"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.","oneOf":[{"allOf":[{"description":"Constrains the tools available to the model to a pre-defined set.","type":"object","required":["mode","tools"],"properties":{"mode":{"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.","type":"string","enum":["auto","required"],"title":"ToolChoiceAllowedMode"},"tools":{"type":"array","items":{},"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```"}},"title":"ToolChoiceAllowed"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["allowed_tools"]}}}],"description":"Constrains the tools available to the model to a pre-defined set."},{"allOf":[{"description":"Use this option to force the model to call a specific function.","type":"object","required":["name"],"properties":{"name":{"type":"string","description":"The name of the function to call."}},"title":"ToolChoiceFunction"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["function"]}}}],"description":"Use this option to force the model to call a specific function."},{"allOf":[{"description":"Use this option to force the model to call a specific tool on a remote MCP server.","type":"object","required":["name","server_label"],"properties":{"name":{"type":"string","description":"The name of the tool to call on the server."},"server_label":{"type":"string","description":"The label of the MCP server to use."}},"title":"ToolChoiceMCP"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp"]}}}],"description":"Use this option to force the model to call a specific tool on a remote MCP server."},{"allOf":[{"description":"Use this option to force the model to call a custom tool.","type":"object","required":["name"],"properties":{"name":{"type":"string","description":"The name of the custom tool to call."}},"title":"ToolChoiceCustom"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["custom"]}}}],"description":"Use this option to force the model to call a custom tool."},{"type":"object","description":"Forces the model to call the apply_patch tool when executing a tool call.","required":["type"],"properties":{"type":{"type":"string","enum":["apply_patch"]}}},{"type":"object","description":"Forces the model to call the function shell tool when a tool call is required.","required":["type"],"properties":{"type":{"type":"string","enum":["shell"]}}},{"allOf":[{"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).","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_search"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["web_search_preview"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["computer_use_preview"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["code_interpreter"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["image_generation"]}}}],"title":"ToolChoiceTypes"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["hosted"]}}}],"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)."},{"allOf":[{"type":"string","enum":["none","auto","required"],"title":"ToolChoiceOptions","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."},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["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."}],"title":"ToolChoiceParam"}]},"tools":{"type":["array","null"],"items":{"oneOf":[{"allOf":[{"description":"Defines a function in your own code the model can choose to call. Learn more about [function\ncalling](https://platform.openai.com/docs/guides/tools).","type":"object","required":["name"],"properties":{"description":{"type":["string","null"],"description":"A description of the function. Used by the model to determine whether or not to call the\nfunction."},"name":{"type":"string","description":"The name of the function to call."},"parameters":{"description":"A JSON schema object describing the parameters of the function."},"strict":{"type":["boolean","null"],"description":"Whether to enforce strict parameter validation. Default `true`."}},"title":"FunctionTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["function"]}}}],"description":"Defines a function in your own code the model can choose to call. Learn more about [function\ncalling](https://platform.openai.com/docs/guides/tools)."},{"allOf":[{"description":"A tool that searches for relevant content from uploaded files. Learn more about the [file search\ntool](https://platform.openai.com/docs/guides/tools-file-search).","type":"object","required":["vector_store_ids"],"properties":{"filters":{"oneOf":[{"type":"null"},{"description":"A filter to apply.","oneOf":[{"description":"A filter used to compare a specified attribute key to a given value using a defined\ncomparison operation.","type":"object","required":["type","key","value"],"properties":{"key":{"type":"string","description":"The key to compare against the value."},"type":{"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","type":"string","enum":["eq","ne","gt","gte","lt","lte","in","nin"],"title":"ComparisonType"},"value":{"description":"The value to compare against the attribute key; supports string, number, or boolean types."}},"title":"ComparisonFilter"},{"description":"Combine multiple filters using `and` or `or`.","type":"object","required":["type","filters"],"properties":{"filters":{"type":"array","items":{"oneOf":"circular()","description":"Filters for file search.","title":"Filter"},"description":"Array of filters to combine. Items can be ComparisonFilter or CompoundFilter."},"type":{"type":"string","enum":["and","or"],"description":"'Type of operation: `and` or `or`.'"}},"title":"CompoundFilter"}],"title":"Filter"}]},"max_num_results":{"type":["integer","null"],"format":"int32","description":"The maximum number of results to return. This number should be between 1 and 50 inclusive.","minimum":0},"ranking_options":{"oneOf":[{"type":"null"},{"description":"Ranking options for search.","type":"object","required":["ranker"],"properties":{"hybrid_search":{"oneOf":[{"type":"null"},{"description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus\nsparse keyword matches when hybrid search is enabled.","type":"object","required":["embedding_weight","text_weight"],"properties":{"embedding_weight":{"type":"number","format":"float","description":"The weight of the embedding in the reciprocal ranking fusion."},"text_weight":{"type":"number","format":"float","description":"The weight of the text in the reciprocal ranking fusion."}},"title":"HybridSearch"}]},"ranker":{"description":"The ranker to use for the file search.","type":"string","enum":["auto","default-2024-11-15"],"title":"RankVersionType"},"score_threshold":{"type":["number","null"],"format":"float","description":"The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will\nattempt to return only the most relevant results, but may return fewer results."}},"title":"RankingOptions"}]},"vector_store_ids":{"type":"array","items":{"type":"string"},"description":"The IDs of the vector stores to search."}},"title":"FileSearchTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_search"]}}}],"description":"A tool that searches for relevant content from uploaded files. Learn more about the [file search\ntool](https://platform.openai.com/docs/guides/tools-file-search)."},{"allOf":[{"description":"A tool that controls a virtual computer. Learn more about the [computer\nuse tool](https://platform.openai.com/docs/guides/tools-computer-use).","type":"object","required":["environment","display_width","display_height"],"properties":{"display_height":{"type":"integer","format":"int32","description":"The height of the computer display.","minimum":0},"display_width":{"type":"integer","format":"int32","description":"The width of the computer display.","minimum":0},"environment":{"description":"The type of computer environment to control.","type":"string","enum":["windows","mac","linux","ubuntu","browser"],"title":"ComputerEnvironment"}},"title":"ComputerUsePreviewTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["computer_use_preview"]}}}],"description":"A tool that controls a virtual computer. Learn more about the [computer\nuse tool](https://platform.openai.com/docs/guides/tools-computer-use)."},{"allOf":[{"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).","type":"object","properties":{"filters":{"oneOf":[{"type":"null"},{"description":"Filters for the search.","type":"object","properties":{"allowed_domains":{"type":["array","null"],"items":{"type":"string"},"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\"]`"}},"title":"WebSearchToolFilters"}]},"search_context_size":{"oneOf":[{"type":"null"},{"description":"High level guidance for the amount of context window space to use for the search. One of `low`,\n`medium`, or `high`. `medium` is the default.","type":"string","enum":["low","medium","high"],"title":"WebSearchToolSearchContextSize"}]},"user_location":{"oneOf":[{"type":"null"},{"description":"The approximate location of the user.","type":"object","required":["type"],"properties":{"city":{"type":["string","null"],"description":"Free text input for the city of the user, e.g. `San Francisco`."},"country":{"type":["string","null"],"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,\ne.g. `US`."},"region":{"type":["string","null"],"description":"Free text input for the region of the user, e.g. `California`."},"timezone":{"type":["string","null"],"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g.\n`America/Los_Angeles`."},"type":{"description":"The type of location approximation. Always `approximate`.","type":"string","enum":["approximate"],"title":"WebSearchApproximateLocationType"}},"title":"WebSearchApproximateLocation"}]}},"title":"WebSearchTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["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)."},{"allOf":[{"description":"type: web_search_2025_08_26","type":"object","properties":{"filters":{"oneOf":[{"type":"null"},{"description":"Filters for the search.","type":"object","properties":{"allowed_domains":{"type":["array","null"],"items":{"type":"string"},"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\"]`"}},"title":"WebSearchToolFilters"}]},"search_context_size":{"oneOf":[{"type":"null"},{"description":"High level guidance for the amount of context window space to use for the search. One of `low`,\n`medium`, or `high`. `medium` is the default.","type":"string","enum":["low","medium","high"],"title":"WebSearchToolSearchContextSize"}]},"user_location":{"oneOf":[{"type":"null"},{"description":"The approximate location of the user.","type":"object","required":["type"],"properties":{"city":{"type":["string","null"],"description":"Free text input for the city of the user, e.g. `San Francisco`."},"country":{"type":["string","null"],"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,\ne.g. `US`."},"region":{"type":["string","null"],"description":"Free text input for the region of the user, e.g. `California`."},"timezone":{"type":["string","null"],"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g.\n`America/Los_Angeles`."},"type":{"description":"The type of location approximation. Always `approximate`.","type":"string","enum":["approximate"],"title":"WebSearchApproximateLocationType"}},"title":"WebSearchApproximateLocation"}]}},"title":"WebSearchTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["web_search_2025_08_26"]}}}],"description":"type: web_search_2025_08_26"},{"allOf":[{"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).","type":"object","required":["server_label"],"properties":{"allowed_tools":{"oneOf":[{"type":"null"},{"description":"List of allowed tool names or a filter object.","oneOf":[{"type":"array","items":{"type":"string"},"description":"A string array of allowed tool names"},{"description":"A filter object to specify which tools are allowed.","type":"object","properties":{"read_only":{"type":["boolean","null"],"description":"Indicates whether or not a tool modifies data or is read-only.\nIf an MCP server is annotated with [readOnlyHint](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter."},"tool_names":{"type":["array","null"],"items":{"type":"string"},"description":"List of allowed tool names."}},"title":"MCPToolFilter"}],"title":"MCPToolAllowedTools"}]},"authorization":{"type":["string","null"],"description":"An OAuth access token that can be used with a remote MCP server, either with a custom MCP\nserver URL or a service connector. Your application must handle the OAuth authorization\nflow and provide the token here."},"connector_id":{"oneOf":[{"type":"null"},{"description":"Identifier for service connectors, like those available in ChatGPT. One of `server_url` or\n`connector_id` must be provided. Learn more about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).\n\nCurrently supported `connector_id` values are:\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`","type":"string","enum":["connector_dropbox","connector_gmail","connector_googlecalendar","connector_googledrive","connector_microsoftteams","connector_outlookcalendar","connector_outlookemail","connector_sharepoint"],"title":"McpToolConnectorId"}]},"headers":{"description":"Optional HTTP headers to send to the MCP server. Use for authentication or other purposes."},"require_approval":{"oneOf":[{"type":"null"},{"description":"Specify which of the MCP server's tools require approval.","oneOf":[{"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.","type":"object","properties":{"always":{"oneOf":[{"type":"null"},{"description":"A list of tools that always require approval.","type":"object","properties":{"read_only":{"type":["boolean","null"],"description":"Indicates whether or not a tool modifies data or is read-only.\nIf an MCP server is annotated with [readOnlyHint](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter."},"tool_names":{"type":["array","null"],"items":{"type":"string"},"description":"List of allowed tool names."}},"title":"MCPToolFilter"}]},"never":{"oneOf":[{"type":"null"},{"description":"A list of tools that never require approval.","type":"object","properties":{"read_only":{"type":["boolean","null"],"description":"Indicates whether or not a tool modifies data or is read-only.\nIf an MCP server is annotated with [readOnlyHint](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter."},"tool_names":{"type":["array","null"],"items":{"type":"string"},"description":"List of allowed tool names."}},"title":"MCPToolFilter"}]}},"title":"MCPToolApprovalFilter"},{"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.","type":"string","enum":["always","never"],"title":"MCPToolApprovalSetting"}],"title":"MCPToolRequireApproval"}]},"server_description":{"type":["string","null"],"description":"Optional description of the MCP server, used to provide more context."},"server_label":{"type":"string","description":"A label for this MCP server, used to identify it in tool calls."},"server_url":{"type":["string","null"],"description":"The URL for the MCP server. One of `server_url` or `connector_id` must be provided."}},"title":"MCPTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp"]}}}],"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)."},{"allOf":[{"description":"A tool that runs Python code to help generate a response to a prompt.","type":"object","required":["container"],"properties":{"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.","oneOf":[{"allOf":[{"description":"Configuration for a code interpreter container. Optionally specify the IDs of the\nfiles to run the code on.","type":"object","properties":{"file_ids":{"type":["array","null"],"items":{"type":"string"},"description":"An optional list of uploaded files to make available to your code."},"memory_limit":{"type":["integer","null"],"format":"int64","minimum":0}},"title":"CodeInterpreterContainerAuto"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["auto"]}}}],"description":"Configuration for a code interpreter container. Optionally specify the IDs of the\nfiles to run the code on."},{"type":"object","description":"The container ID.","required":["type"],"properties":{"type":{"type":"string","enum":["container_i_d"]}}}],"title":"CodeInterpreterToolContainer"}},"title":"CodeInterpreterTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["code_interpreter"]}}}],"description":"A tool that runs Python code to help generate a response to a prompt."},{"allOf":[{"description":"A tool that generates images using a model like `gpt-image-1`.","type":"object","properties":{"background":{"oneOf":[{"type":"null"},{"description":"Background type for the generated image. One of `transparent`,\n`opaque`, or `auto`. Default: `auto`.","type":"string","enum":["transparent","opaque","auto"],"title":"ImageGenToolBackground"}]},"input_fidelity":{"oneOf":[{"type":"null"},{"description":"Control how much effort the model will exert to match the style and features, especially facial features,\nof input images. This parameter is only supported for `gpt-image-1`. Unsupported\nfor `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.","type":"string","enum":["high","low"],"title":"InputFidelity"}]},"input_image_mask":{"oneOf":[{"type":"null"},{"description":"Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).","type":"object","properties":{"file_id":{"type":["string","null"],"description":"File ID for the mask image."},"image_url":{"type":["string","null"],"description":"Base64-encoded mask image."}},"title":"ImageGenToolInputImageMask"}]},"model":{"type":["string","null"],"description":"The image generation model to use. Default: `gpt-image-1`."},"moderation":{"oneOf":[{"type":"null"},{"description":"Moderation level for the generated image. Default: `auto`.","type":"string","enum":["auto","low"],"title":"ImageGenToolModeration"}]},"output_compression":{"type":["integer","null"],"format":"int32","description":"Compression level for the output image. Default: 100.","minimum":0},"output_format":{"oneOf":[{"type":"null"},{"description":"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.","type":"string","enum":["png","webp","jpeg"],"title":"ImageGenToolOutputFormat"}]},"partial_images":{"type":["integer","null"],"format":"int32","description":"Number of partial images to generate in streaming mode, from 0 (default value) to 3.","minimum":0},"quality":{"oneOf":[{"type":"null"},{"description":"The quality of the generated image. One of `low`, `medium`, `high`,\nor `auto`. Default: `auto`.","type":"string","enum":["low","medium","high","auto"],"title":"ImageGenToolQuality"}]},"size":{"oneOf":[{"type":"null"},{"description":"The size of the generated image. One of `1024x1024`, `1024x1536`,\n`1536x1024`, or `auto`. Default: `auto`.","type":"string","enum":["auto","1024x1024","1024x1536","1536x1024"],"title":"ImageGenToolSize"}]}},"title":"ImageGenTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["image_generation"]}}}],"description":"A tool that generates images using a model like `gpt-image-1`."},{"type":"object","description":"A tool that allows the model to execute shell commands in a local environment.","required":["type"],"properties":{"type":{"type":"string","enum":["local_shell"]}}},{"type":"object","description":"A tool that allows the model to execute shell commands.","required":["type"],"properties":{"type":{"type":"string","enum":["shell"]}}},{"allOf":[{"description":"A custom tool that processes input using a specified format. Learn more about [custom\ntools](https://platform.openai.com/docs/guides/function-calling#custom-tools)","type":"object","required":["name","format"],"properties":{"description":{"type":["string","null"],"description":"Optional description of the custom tool, used to provide more context."},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","oneOf":[{"type":"object","description":"Unconstrained free-form text.","required":["type"],"properties":{"type":{"type":"string","enum":["text"]}}},{"allOf":[{"type":"object","required":["definition","syntax"],"properties":{"definition":{"type":"string","description":"The grammar definition."},"syntax":{"description":"The syntax of the grammar definition. One of `lark` or `regex`.","type":"string","enum":["lark","regex"],"title":"GrammarSyntax"}},"title":"CustomGrammarFormatParam","description":"A grammar defined by the user."},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["grammar"]}}}],"description":"A grammar defined by the user."}],"title":"CustomToolParamFormat"},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls."}},"title":"CustomToolParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["custom"]}}}],"description":"A custom tool that processes input using a specified format. Learn more about [custom\ntools](https://platform.openai.com/docs/guides/function-calling#custom-tools)"},{"allOf":[{"description":" This tool searches the web for relevant results to use in a response. Learn more about the [web search\ntool](https://platform.openai.com/docs/guides/tools-web-search).","type":"object","properties":{"filters":{"oneOf":[{"type":"null"},{"description":"Filters for the search.","type":"object","properties":{"allowed_domains":{"type":["array","null"],"items":{"type":"string"},"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\"]`"}},"title":"WebSearchToolFilters"}]},"search_context_size":{"oneOf":[{"type":"null"},{"description":"High level guidance for the amount of context window space to use for the search. One of `low`,\n`medium`, or `high`. `medium` is the default.","type":"string","enum":["low","medium","high"],"title":"WebSearchToolSearchContextSize"}]},"user_location":{"oneOf":[{"type":"null"},{"description":"The approximate location of the user.","type":"object","required":["type"],"properties":{"city":{"type":["string","null"],"description":"Free text input for the city of the user, e.g. `San Francisco`."},"country":{"type":["string","null"],"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,\ne.g. `US`."},"region":{"type":["string","null"],"description":"Free text input for the region of the user, e.g. `California`."},"timezone":{"type":["string","null"],"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g.\n`America/Los_Angeles`."},"type":{"description":"The type of location approximation. Always `approximate`.","type":"string","enum":["approximate"],"title":"WebSearchApproximateLocationType"}},"title":"WebSearchApproximateLocation"}]}},"title":"WebSearchTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["web_search_preview"]}}}],"description":" This tool searches the web for relevant results to use in a response. Learn more about the [web search\ntool](https://platform.openai.com/docs/guides/tools-web-search)."},{"allOf":[{"description":"type: web_search_preview_2025_03_11","type":"object","properties":{"filters":{"oneOf":[{"type":"null"},{"description":"Filters for the search.","type":"object","properties":{"allowed_domains":{"type":["array","null"],"items":{"type":"string"},"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\"]`"}},"title":"WebSearchToolFilters"}]},"search_context_size":{"oneOf":[{"type":"null"},{"description":"High level guidance for the amount of context window space to use for the search. One of `low`,\n`medium`, or `high`. `medium` is the default.","type":"string","enum":["low","medium","high"],"title":"WebSearchToolSearchContextSize"}]},"user_location":{"oneOf":[{"type":"null"},{"description":"The approximate location of the user.","type":"object","required":["type"],"properties":{"city":{"type":["string","null"],"description":"Free text input for the city of the user, e.g. `San Francisco`."},"country":{"type":["string","null"],"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,\ne.g. `US`."},"region":{"type":["string","null"],"description":"Free text input for the region of the user, e.g. `California`."},"timezone":{"type":["string","null"],"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g.\n`America/Los_Angeles`."},"type":{"description":"The type of location approximation. Always `approximate`.","type":"string","enum":["approximate"],"title":"WebSearchApproximateLocationType"}},"title":"WebSearchApproximateLocation"}]}},"title":"WebSearchTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["web_search_preview_2025_03_11"]}}}],"description":"type: web_search_preview_2025_03_11"},{"type":"object","description":"Allows the assistant to create, delete, or update files using unified diffs.","required":["type"],"properties":{"type":{"type":"string","enum":["apply_patch"]}}}],"description":"Definitions for model-callable tools.","title":"Tool"},"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."},"top_logprobs":{"type":["integer","null"],"format":"int32","description":"An integer between 0 and 20 specifying the number of most likely tokens to return at each\ntoken position, each with an associated log probability.","minimum":0},"top_p":{"type":["number","null"],"format":"float","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."},"truncation":{"oneOf":[{"type":"null"},{"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.","type":"string","enum":["auto","disabled"],"title":"Truncation"}]},"usage":{"oneOf":[{"type":"null"},{"description":"Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.","type":"object","required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"],"properties":{"input_tokens":{"type":"integer","format":"int32","description":"The number of input tokens.","minimum":0},"input_tokens_details":{"description":"A detailed breakdown of the input tokens.","type":"object","required":["cached_tokens"],"properties":{"cached_tokens":{"type":"integer","format":"int32","description":"The number of tokens that were retrieved from the cache.\n[More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).","minimum":0}},"title":"InputTokenDetails"},"output_tokens":{"type":"integer","format":"int32","description":"The number of output tokens.","minimum":0},"output_tokens_details":{"description":"A detailed breakdown of the output tokens.","type":"object","required":["reasoning_tokens"],"properties":{"reasoning_tokens":{"type":"integer","format":"int32","description":"The number of reasoning tokens.","minimum":0}},"title":"OutputTokenDetails"},"total_tokens":{"type":"integer","format":"int32","description":"The total number of tokens used.","minimum":0}},"title":"ResponseUsage"}]}},"title":"Response"},"example":{"created_at":1755639134,"id":"resp_68a4ed5e2258819485ece563a803bbf2075163a5e5b1c982","metadata":{},"model":"test","object":"response","output":[{"type":"message","content":[{"type":"output_text","annotations":[],"text":"Thank you! How can I assist you today?"}],"id":"msg_68a4ed5eb7e88194bf0b2560d8b5c0c1075163a5e5b1c982","role":"assistant","status":"completed"}],"parallel_tool_calls":true,"reasoning":{},"store":true,"service_tier":"default","status":"completed","temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":13,"input_tokens_details":{"audio_tokens":null,"cached_tokens":0},"output_tokens":11,"output_tokens_details":{"accepted_prediction_tokens":null,"audio_tokens":null,"reasoning_tokens":0,"rejected_prediction_tokens":null},"total_tokens":24}}}}},"404":{"description":"The specified model was not found"},"500":{"description":"An internal server error occurred while processing the response","content":{"application/json":{"schema":{},"example":{"error":"An internal server error occurred while processing the response."}}}}}}
1{"responses":{"200":{"description":"Response generated successfully","content":{"application/json":{"schema":{"type":"object","description":"The complete response returned by the Responses API.","required":["created_at","id","model","object","output","status"],"properties":{"background":{"type":["boolean","null"],"description":"Whether to run the model response in the background.\n[Learn more](https://platform.openai.com/docs/guides/background)."},"billing":{"oneOf":[{"type":"null"},{"description":"Billing information for the response.","type":"object","required":["payer"],"properties":{"payer":{"type":"string"}},"title":"Billing"}]},"conversation":{"oneOf":[{"type":"null"},{"description":"The conversation that this response belongs to. Input items and output\nitems from this response are automatically added to this conversation.","type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"title":"Conversation"}]},"created_at":{"type":"integer","format":"int64","description":"Unix timestamp (in seconds) when this Response was created.","minimum":0},"error":{"oneOf":[{"type":"null"},{"description":"An error object returned when the model fails to generate a Response.","type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"The error code for the response."},"message":{"type":"string","description":"A human-readable description of the error."}},"title":"ErrorObject"}]},"id":{"type":"string","description":"Unique identifier for this response."},"incomplete_details":{"oneOf":[{"type":"null"},{"description":"Details about why the response is incomplete, if any.","type":"object","required":["reason"],"properties":{"reason":{"type":"string","description":"The reason why the response is incomplete."}},"title":"IncompleteDetails"}]},"instructions":{"oneOf":[{"type":"null"},{"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 response\nwill not be carried over to the next response. This makes it simple to swap out\nsystem (or developer) messages in new responses.","oneOf":[{"type":"string","description":"A text input to the model, equivalent to a text input with the `developer` role."},{"type":"array","items":{"oneOf":[{"description":"A reference to an existing item by ID.\nHas a required `id` field and optional `type` (can be \"item_reference\" or null).\nMust be tried first as it's the most minimal structure.","type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The ID of the item to reference."},"type":{"oneOf":[{"type":"null"},{"description":"The type of item to reference. Can be \"item_reference\" or null.","type":"string","enum":["item_reference"],"title":"ItemReferenceType"}]}},"title":"ItemReference"},{"description":"All structured items with proper type discrimination.\nIncludes InputMessage, OutputMessage, and all tool calls/outputs.\nUses the discriminated `Item` enum for efficient, type-safe deserialization.","oneOf":[{"allOf":[{"description":"A message (type: \"message\").\nCan represent InputMessage (user/system/developer) or OutputMessage (assistant).\n\nInputMessage:\n A message input to the model with a role indicating instruction following hierarchy.\n Instructions given with the developer or system role take precedence over instructions given with the user role.\nOutputMessage:\n A message output from the model.","oneOf":[{"description":"An output message from the model (role: assistant, has required id & status).\nThis must come first as it has the most specific structure (required id and status fields).","type":"object","required":["content","id","role","status"],"properties":{"content":{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A text output from the model.","type":"object","required":["annotations","text"],"properties":{"annotations":{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A citation to a file.","type":"object","required":["file_id","filename","index"],"properties":{"file_id":{"type":"string","description":"The ID of the file."},"filename":{"type":"string","description":"The filename of the file cited."},"index":{"type":"integer","format":"int32","description":"The index of the file in the list of files.","minimum":0}},"title":"FileCitationBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_citation"]}}}],"description":"A citation to a file."},{"allOf":[{"description":"A citation for a web resource used to generate a model response.","type":"object","required":["end_index","start_index","title","url"],"properties":{"end_index":{"type":"integer","format":"int32","description":"The index of the last character of the URL citation in the message.","minimum":0},"start_index":{"type":"integer","format":"int32","description":"The index of the first character of the URL citation in the message.","minimum":0},"title":{"type":"string","description":"The title of the web resource."},"url":{"type":"string","description":"The URL of the web resource."}},"title":"UrlCitationBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["url_citation"]}}}],"description":"A citation for a web resource used to generate a model response."},{"allOf":[{"description":"A citation for a container file used to generate a model response.","type":"object","required":["container_id","end_index","file_id","filename","start_index"],"properties":{"container_id":{"type":"string","description":"The ID of the container file."},"end_index":{"type":"integer","format":"int32","description":"The index of the last character of the container file citation in the message.","minimum":0},"file_id":{"type":"string","description":"The ID of the file."},"filename":{"type":"string","description":"The filename of the container file cited."},"start_index":{"type":"integer","format":"int32","description":"The index of the first character of the container file citation in the message.","minimum":0}},"title":"ContainerFileCitationBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["container_file_citation"]}}}],"description":"A citation for a container file used to generate a model response."},{"allOf":[{"description":"A path to a file.","type":"object","required":["file_id","index"],"properties":{"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","format":"int32","description":"The index of the file in the list of files.","minimum":0}},"title":"FilePath"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_path"]}}}],"description":"A path to a file."}],"title":"Annotation"},"description":"The annotations of the text output."},"logprobs":{"type":["array","null"],"items":{"type":"object","required":["bytes","logprob","token","top_logprobs"],"properties":{"bytes":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"logprob":{"type":"number","format":"double"},"token":{"type":"string"},"top_logprobs":{"type":"array","items":{"type":"object","required":["bytes","logprob","token"],"properties":{"bytes":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"logprob":{"type":"number","format":"double"},"token":{"type":"string"}},"title":"TopLogProb"}}},"title":"LogProb"}},"text":{"type":"string","description":"The text output from the model."}},"title":"OutputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["output_text"]}}}],"description":"A text output from the model."},{"allOf":[{"description":"A refusal from the model.","type":"object","required":["refusal"],"properties":{"refusal":{"type":"string","description":"The refusal explanation from the model."}},"title":"RefusalContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["refusal"]}}}],"description":"A refusal from the model."}],"title":"OutputMessageContent"},"description":"The content of the output message."},"id":{"type":"string","description":"The unique ID of the output message."},"role":{"description":"The role of the output message. Always `assistant`.","type":"string","enum":["assistant"],"title":"AssistantRole"},"status":{"description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}},"title":"OutputMessage"},{"description":"A structured input message (role: user/system/developer, content is `Vec<ContentType>`).\nHas structured content list and optional id/status fields.\n\nA message input to the model with a role indicating instruction following hierarchy.\nInstructions given with the `developer` or `system` role take precedence over instructions\ngiven with the `user` role.","type":"object","required":["content","role"],"properties":{"content":{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A text input to the model.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text input to the model."}},"title":"InputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_text"]}}}],"description":"A text input to the model."},{"allOf":[{"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision).","type":"object","required":["detail"],"properties":{"detail":{"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`.\nDefaults to `auto`.","type":"string","enum":["auto","low","high"],"title":"ImageDetail"},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"image_url":{"type":["string","null"],"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image\nin a data URL."}},"title":"InputImageContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_image"]}}}],"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision)."},{"allOf":[{"description":"A file input to the model.","type":"object","properties":{"file_data":{"type":["string","null"],"description":"The content of the file to be sent to the model."},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"file_url":{"type":["string","null"],"description":"The URL of the file to be sent to the model."},"filename":{"type":["string","null"],"description":"The name of the file to be sent to the model."}},"title":"InputFileContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_file"]}}}],"description":"A file input to the model."}],"description":"Parts of a message: text, image, file, or audio.","title":"InputContent"},"description":"A list of one or many input items to the model, containing different content types."},"role":{"description":"The role of the message input. One of `user`, `system`, or `developer`.\nNote: `assistant` is NOT allowed here; use OutputMessage instead.","type":"string","enum":["user","system","developer"],"title":"InputRole"},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]}},"title":"InputMessage"}],"title":"MessageItem"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["message"]}}}],"description":"A message (type: \"message\").\nCan represent InputMessage (user/system/developer) or OutputMessage (assistant).\n\nInputMessage:\n A message input to the model with a role indicating instruction following hierarchy.\n Instructions given with the developer or system role take precedence over instructions given with the user role.\nOutputMessage:\n A message output from the model."},{"allOf":[{"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.","type":"object","required":["id","queries","status"],"properties":{"id":{"type":"string","description":"The unique ID of the file search tool call."},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files."},"results":{"type":["array","null"],"items":{"type":"object","description":"A single result from a file search.","required":["attributes","file_id","filename","score","text"],"properties":{"attributes":{"type":"object","description":"Set of 16 key-value pairs that can be attached to an object. This can be useful for storing\nadditional information about the object in a structured format, and querying for objects\nAPI or the dashboard. Keys are strings with a maximum length of 64 characters\n. Values are strings with a maximum length of 512 characters, booleans, or numbers.","additionalProperties":{},"propertyNames":{"type":"string"}},"file_id":{"type":"string","description":"The unique ID of the file."},"filename":{"type":"string","description":"The name of the file."},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1."},"text":{"type":"string","description":"The text that was retrieved from the file."}},"title":"FileSearchToolCallResult"},"description":"The results of the file search tool call."},"status":{"description":"The status of the file search tool call. One of `in_progress`, `searching`,\n`incomplete`,`failed`, or `completed`.","type":"string","enum":["in_progress","searching","incomplete","failed","completed"],"title":"FileSearchToolCallStatus"}},"title":"FileSearchToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_search_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."},{"allOf":[{"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.","type":"object","required":["action","call_id","id","pending_safety_checks","status"],"properties":{"action":{"oneOf":[{"allOf":[{"description":"A click action.","type":"object","required":["button","x","y"],"properties":{"button":{"description":"Indicates which mouse button was pressed during the click. One of `left`,\n`right`, `wheel`, `back`, or `forward`.","type":"string","enum":["left","right","wheel","back","forward"],"title":"ClickButtonType"},"x":{"type":"integer","format":"int32","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","format":"int32","description":"The y-coordinate where the click occurred."}},"title":"ClickParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["click"]}}}],"description":"A click action."},{"allOf":[{"description":"A double click action.","type":"object","required":["x","y"],"properties":{"x":{"type":"integer","format":"int32","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","format":"int32","description":"The y-coordinate where the double click occurred."}},"title":"DoubleClickAction"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["double_click"]}}}],"description":"A double click action."},{"allOf":[{"description":"A drag action.","type":"object","required":["path"],"properties":{"path":{"type":"array","items":{"type":"object","description":"A point in 2D space.","required":["x","y"],"properties":{"x":{"type":"integer","format":"int32","description":"The x-coordinate."},"y":{"type":"integer","format":"int32","description":"The y-coordinate."}},"title":"DragPoint"},"description":"The path of points the cursor drags through."}},"title":"Drag"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["drag"]}}}],"description":"A drag action."},{"allOf":[{"description":"A collection of keypresses the model would like to perform.","type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"type":"string"},"description":"The combination of keys the model is requesting to be pressed.\nThis is an array of strings, each representing a key."}},"title":"KeyPressAction"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["keypress"]}}}],"description":"A collection of keypresses the model would like to perform."},{"allOf":[{"description":"A mouse move action.","type":"object","required":["x","y"],"properties":{"x":{"type":"integer","format":"int32","description":"The x-coordinate to move to."},"y":{"type":"integer","format":"int32","description":"The y-coordinate to move to."}},"title":"Move"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["move"]}}}],"description":"A mouse move action."},{"type":"object","description":"A screenshot action.","required":["type"],"properties":{"type":{"type":"string","enum":["screenshot"]}}},{"allOf":[{"description":"A scroll action.","type":"object","required":["scroll_x","scroll_y","x","y"],"properties":{"scroll_x":{"type":"integer","format":"int32","description":"The horizontal scroll distance."},"scroll_y":{"type":"integer","format":"int32","description":"The vertical scroll distance."},"x":{"type":"integer","format":"int32","description":"The x-coordinate where the scroll occurred."},"y":{"type":"integer","format":"int32","description":"The y-coordinate where the scroll occurred."}},"title":"Scroll"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scroll"]}}}],"description":"A scroll action."},{"allOf":[{"description":"An action to type in text.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text to type."}},"title":"Type"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["type"]}}}],"description":"An action to type in text."},{"type":"object","description":"A wait action.","required":["type"],"properties":{"type":{"type":"string","enum":["wait"]}}}],"description":"Represents all user‐triggered actions.","title":"ComputerAction"},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output."},"id":{"type":"string","description":"The unique ID of the computer call."},"pending_safety_checks":{"type":"array","items":{"type":"object","required":["id"],"properties":{"code":{"type":["string","null"],"description":"The type of the pending safety check."},"id":{"type":"string","description":"The ID of the pending safety check."},"message":{"type":["string","null"],"description":"Details about the pending safety check."}},"title":"ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call."},"status":{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}},"title":"ComputerToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["computer_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."},{"allOf":[{"description":"The output of a computer tool call.","type":"object","required":["call_id","output"],"properties":{"acknowledged_safety_checks":{"type":["array","null"],"items":{"type":"object","required":["id"],"properties":{"code":{"type":["string","null"],"description":"The type of the pending safety check."},"id":{"type":"string","description":"The ID of the pending safety check."},"message":{"type":["string","null"],"description":"Details about the pending safety check."}},"title":"ComputerCallSafetyCheckParam"},"description":"The safety checks reported by the API that have been acknowledged by the developer."},"call_id":{"type":"string","description":"The ID of the computer tool call that produced the output."},"id":{"type":["string","null"],"description":"The unique ID of the computer tool call output. Optional when creating."},"output":{"description":"A computer screenshot image used with the computer use tool.","type":"object","required":["type"],"properties":{"file_id":{"type":["string","null"],"description":"The identifier of an uploaded file that contains the screenshot."},"image_url":{"type":["string","null"],"description":"The URL of the screenshot image."},"type":{"description":"Specifies the event type. For a computer screenshot, this property is always\nset to `computer_screenshot`.","type":"string","enum":["computer_screenshot"],"title":"ComputerScreenshotImageType"}},"title":"ComputerScreenshotImage"},"status":{"oneOf":[{"type":"null"},{"description":"The status of the message input. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when input items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]}},"title":"ComputerCallOutputItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["computer_call_output"]}}}],"description":"The output of a computer tool call."},{"allOf":[{"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.","type":"object","required":["action","id","status"],"properties":{"action":{"description":"An object describing the specific action taken in this web search call. Includes\ndetails on how the model used the web (search, open_page, find).","oneOf":[{"allOf":[{"description":"Action type \"search\" - Performs a web search query.","type":"object","required":["query"],"properties":{"query":{"type":"string","description":"The search query."},"sources":{"type":["array","null"],"items":{"type":"object","required":["type","url"],"properties":{"type":{"type":"string","description":"The type of source. Always `url`."},"url":{"type":"string","description":"The URL of the source."}},"title":"WebSearchActionSearchSource"},"description":"The sources used in the search."}},"title":"WebSearchActionSearch"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["search"]}}}],"description":"Action type \"search\" - Performs a web search query."},{"allOf":[{"description":"Action type \"open_page\" - Opens a specific URL from search results.","type":"object","required":["url"],"properties":{"url":{"type":"string","description":"The URL opened by the model."}},"title":"WebSearchActionOpenPage"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["open_page"]}}}],"description":"Action type \"open_page\" - Opens a specific URL from search results."},{"allOf":[{"description":"Action type \"find\": Searches for a pattern within a loaded page.","type":"object","required":["url","pattern"],"properties":{"pattern":{"type":"string","description":"The pattern or text to search for within the page."},"url":{"type":"string","description":"The URL of the page searched for the pattern."}},"title":"WebSearchActionFind"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["find"]}}}],"description":"Action type \"find\": Searches for a pattern within a loaded page."}],"title":"WebSearchToolCallAction"},"id":{"type":"string","description":"The unique ID of the web search tool call."},"status":{"description":"The status of the web search tool call.","type":"string","enum":["in_progress","searching","completed","failed"],"title":"WebSearchToolCallStatus"}},"title":"WebSearchToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["web_search_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."},{"allOf":[{"description":"A tool call to run a function. See the\n\n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.","type":"object","required":["arguments","call_id","name"],"properties":{"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function."},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the function tool call."},"name":{"type":"string","description":"The name of the function to run."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]}},"title":"FunctionToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["function_call"]}}}],"description":"A tool call to run a function. See the\n\n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information."},{"allOf":[{"description":"The output of a function tool call.","type":"object","required":["call_id","output"],"properties":{"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the function tool call output.\nPopulated when this item is returned via API."},"output":{"description":"Text, image, or file output of the function tool call.","oneOf":[{"type":"string","description":"A JSON string of the output of the function tool call."},{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A text input to the model.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text input to the model."}},"title":"InputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_text"]}}}],"description":"A text input to the model."},{"allOf":[{"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision).","type":"object","required":["detail"],"properties":{"detail":{"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`.\nDefaults to `auto`.","type":"string","enum":["auto","low","high"],"title":"ImageDetail"},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"image_url":{"type":["string","null"],"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image\nin a data URL."}},"title":"InputImageContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_image"]}}}],"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision)."},{"allOf":[{"description":"A file input to the model.","type":"object","properties":{"file_data":{"type":["string","null"],"description":"The content of the file to be sent to the model."},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"file_url":{"type":["string","null"],"description":"The URL of the file to be sent to the model."},"filename":{"type":["string","null"],"description":"The name of the file to be sent to the model."}},"title":"InputFileContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_file"]}}}],"description":"A file input to the model."}],"description":"Parts of a message: text, image, file, or audio.","title":"InputContent"}}],"title":"FunctionCallOutput"},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]}},"title":"FunctionCallOutputItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["function_call_output"]}}}],"description":"The output of a function tool call."},{"allOf":[{"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).","type":"object","required":["id","summary"],"properties":{"content":{"type":["array","null"],"items":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The reasoning text from the model."}},"title":"ReasoningTextContent"},"description":"Reasoning text content."},"encrypted_content":{"type":["string","null"],"description":"The encrypted content of the reasoning item - populated when a response is generated with\n`reasoning.encrypted_content` in the `include` parameter."},"id":{"type":"string","description":"Unique identifier of the reasoning content."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]},"summary":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","description":"A single summary text fragment from reasoning.","required":["text"],"properties":{"text":{"type":"string","description":"A summary of the reasoning output from the model so far."}},"title":"Summary"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["summary_text"]}}}]}],"title":"SummaryPart"},"description":"Reasoning summary content."}},"title":"ReasoningItem"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["reasoning"]}}}],"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)."},{"allOf":[{"description":"A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).","type":"object","required":["encrypted_content"],"properties":{"encrypted_content":{"type":"string","description":"The encrypted content."},"id":{"type":["string","null"],"description":"The ID of the compaction item."}},"title":"CompactionSummaryItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["compaction"]}}}],"description":"A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact)."},{"allOf":[{"description":"An image generation request made by the model.","type":"object","required":["id","status"],"properties":{"id":{"type":"string","description":"The unique ID of the image generation call."},"result":{"type":["string","null"],"description":"The generated image encoded in base64."},"status":{"description":"The status of the image generation call.","type":"string","enum":["in_progress","completed","generating","failed"],"title":"ImageGenToolCallStatus"}},"title":"ImageGenToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["image_generation_call"]}}}],"description":"An image generation request made by the model."},{"allOf":[{"description":"A tool call to run code.","type":"object","required":["container_id","id","status"],"properties":{"code":{"type":["string","null"],"description":"The code to run, or null if not available."},"container_id":{"type":"string","description":"ID of the container used to run the code."},"id":{"type":"string","description":"The unique ID of the code interpreter tool call."},"outputs":{"type":["array","null"],"items":{"oneOf":[{"allOf":[{"description":"Code interpreter output logs","type":"object","required":["logs"],"properties":{"logs":{"type":"string","description":"The logs output from the code interpreter."}},"title":"CodeInterpreterOutputLogs"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["logs"]}}}],"description":"Code interpreter output logs"},{"allOf":[{"description":"Code interpreter output image","type":"object","required":["url"],"properties":{"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"title":"CodeInterpreterOutputImage"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["image"]}}}],"description":"Code interpreter output image"}],"description":"Individual result from a code interpreter: either logs or files.","title":"CodeInterpreterToolCallOutput"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available."},"status":{"description":"The status of the code interpreter tool call.\nValid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.","type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"title":"CodeInterpreterToolCallStatus"}},"title":"CodeInterpreterToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["code_interpreter_call"]}}}],"description":"A tool call to run code."},{"allOf":[{"description":"A tool call to run a command on the local shell.","type":"object","required":["action","call_id","id","status"],"properties":{"action":{"description":"Execute a shell command on the server.","type":"object","required":["command","env"],"properties":{"command":{"type":"array","items":{"type":"string"},"description":"The command to run."},"env":{"type":"object","description":"Environment variables to set for the command.","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"timeout_ms":{"type":["integer","null"],"format":"int64","description":"Optional timeout in milliseconds for the command.","minimum":0},"user":{"type":["string","null"],"description":"Optional user to run the command as."},"working_directory":{"type":["string","null"],"description":"Optional working directory to run the command in."}},"title":"LocalShellExecAction"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model."},"id":{"type":"string","description":"The unique ID of the local shell call."},"status":{"description":"The status of the local shell call.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}},"title":"LocalShellToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["local_shell_call"]}}}],"description":"A tool call to run a command on the local shell."},{"allOf":[{"description":"The output of a local shell tool call.","type":"object","required":["id","output"],"properties":{"id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model."},"output":{"type":"string","description":"A JSON string of the output of the local shell tool call."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]}},"title":"LocalShellToolCallOutput"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["local_shell_call_output"]}}}],"description":"The output of a local shell tool call."},{"allOf":[{"description":"A tool representing a request to execute one or more shell commands.","type":"object","required":["call_id","action"],"properties":{"action":{"description":"The shell commands and limits that describe how to run the tool call.","type":"object","required":["commands"],"properties":{"commands":{"type":"array","items":{"type":"string"},"description":"Ordered shell commands for the execution environment to run."},"max_output_length":{"type":["integer","null"],"format":"int64","description":"Maximum number of UTF-8 characters to capture from combined stdout and stderr output.","minimum":0},"timeout_ms":{"type":["integer","null"],"format":"int64","description":"Maximum wall-clock time in milliseconds to allow the shell commands to run.","minimum":0}},"title":"FunctionShellActionParam"},"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the shell tool call. Populated when this item is returned via API."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.","type":"string","enum":["in_progress","completed","incomplete"],"title":"FunctionShellCallItemStatus"}]}},"title":"FunctionShellCallItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["shell_call"]}}}],"description":"A tool representing a request to execute one or more shell commands."},{"allOf":[{"description":"The streamed output items emitted by a shell tool call.","type":"object","required":["call_id","output"],"properties":{"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the shell tool call output. Populated when this item is returned via API."},"max_output_length":{"type":["integer","null"],"format":"int64","description":"The maximum number of UTF-8 characters captured for this shell call's combined output.","minimum":0},"output":{"type":"array","items":{"type":"object","description":"Captured stdout and stderr for a portion of a shell tool call output.","required":["stdout","stderr","outcome"],"properties":{"outcome":{"description":"The exit or timeout outcome associated with this chunk.","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["timeout"]}}},{"allOf":[{"type":"object","description":"Indicates that the shell commands finished and returned an exit code.","required":["exit_code"],"properties":{"exit_code":{"type":"integer","format":"int32","description":"The exit code returned by the shell process."}},"title":"FunctionShellCallOutputExitOutcomeParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["exit"]}}}]}],"title":"FunctionShellCallOutputOutcomeParam"},"stderr":{"type":"string","description":"Captured stderr output for this chunk of the shell call."},"stdout":{"type":"string","description":"Captured stdout output for this chunk of the shell call."}},"title":"FunctionShellCallOutputContentParam"},"description":"Captured chunks of stdout and stderr output, along with their associated outcomes."}},"title":"FunctionShellCallOutputItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["shell_call_output"]}}}],"description":"The streamed output items emitted by a shell tool call."},{"allOf":[{"description":"A tool call representing a request to create, delete, or update files using diff patches.","type":"object","required":["call_id","status","operation"],"properties":{"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"operation":{"description":"The specific create, delete, or update instruction for the apply_patch tool call.","oneOf":[{"allOf":[{"type":"object","description":"Instruction for creating a new file via the apply_patch tool.","required":["path","diff"],"properties":{"diff":{"type":"string","description":"Unified diff content to apply when creating the file."},"path":{"type":"string","description":"Path of the file to create relative to the workspace root."}},"title":"ApplyPatchCreateFileOperationParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["create_file"]}}}]},{"allOf":[{"type":"object","description":"Instruction for deleting an existing file via the apply_patch tool.","required":["path"],"properties":{"path":{"type":"string","description":"Path of the file to delete relative to the workspace root."}},"title":"ApplyPatchDeleteFileOperationParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["delete_file"]}}}]},{"allOf":[{"type":"object","description":"Instruction for updating an existing file via the apply_patch tool.","required":["path","diff"],"properties":{"diff":{"type":"string","description":"Unified diff content to apply to the existing file."},"path":{"type":"string","description":"Path of the file to update relative to the workspace root."}},"title":"ApplyPatchUpdateFileOperationParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["update_file"]}}}]}],"title":"ApplyPatchOperationParam"},"status":{"description":"The status of the apply patch tool call. One of `in_progress` or `completed`.","type":"string","enum":["in_progress","completed"],"title":"ApplyPatchCallStatusParam"}},"title":"ApplyPatchToolCallItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["apply_patch_call"]}}}],"description":"A tool call representing a request to create, delete, or update files using diff patches."},{"allOf":[{"description":"The streamed output emitted by an apply patch tool call.","type":"object","required":["call_id","status"],"properties":{"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"output":{"type":["string","null"],"description":"Optional human-readable log text from the apply patch tool (e.g., patch results or errors)."},"status":{"description":"The status of the apply patch tool call output. One of `completed` or `failed`.","type":"string","enum":["completed","failed"],"title":"ApplyPatchCallOutputStatusParam"}},"title":"ApplyPatchToolCallOutputItemParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["apply_patch_call_output"]}}}],"description":"The streamed output emitted by an apply patch tool call."},{"allOf":[{"description":"A list of tools available on an MCP server.","type":"object","required":["id","server_label","tools"],"properties":{"error":{"type":["string","null"],"description":"Error message if listing failed."},"id":{"type":"string","description":"The unique ID of the list."},"server_label":{"type":"string","description":"The label of the MCP server."},"tools":{"type":"array","items":{"type":"object","required":["input_schema","name"],"properties":{"annotations":{"description":"Additional annotations about the tool."},"description":{"type":["string","null"],"description":"The description of the tool."},"input_schema":{"description":"The JSON schema describing the tool's input."},"name":{"type":"string","description":"The name of the tool."}},"title":"MCPListToolsTool"},"description":"The tools available on the server."}},"title":"MCPListTools"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_list_tools"]}}}],"description":"A list of tools available on an MCP server."},{"allOf":[{"description":"A request for human approval of a tool invocation.","type":"object","required":["arguments","id","name","server_label"],"properties":{"arguments":{"type":"string","description":"JSON string of arguments for the tool."},"id":{"type":"string","description":"The unique ID of the approval request."},"name":{"type":"string","description":"The name of the tool to run."},"server_label":{"type":"string","description":"The label of the MCP server making the request."}},"title":"MCPApprovalRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_approval_request"]}}}],"description":"A request for human approval of a tool invocation."},{"allOf":[{"description":"A response to an MCP approval request.","type":"object","required":["approval_request_id","approve"],"properties":{"approval_request_id":{"type":"string","description":"The ID of the approval request being answered."},"approve":{"type":"boolean","description":"Whether the request was approved."},"id":{"type":["string","null"],"description":"The unique ID of the approval response"},"reason":{"type":["string","null"],"description":"Optional reason for the decision."}},"title":"MCPApprovalResponse"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_approval_response"]}}}],"description":"A response to an MCP approval request."},{"allOf":[{"description":"An invocation of a tool on an MCP server.","type":"object","required":["arguments","id","name","server_label"],"properties":{"approval_request_id":{"type":["string","null"],"description":"Unique identifier for the MCP tool call approval request. Include this value\nin a subsequent `mcp_approval_response` input to approve or reject the corresponding\ntool call."},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool."},"error":{"type":["string","null"],"description":"Error message from the call, if any."},"id":{"type":"string","description":"The unique ID of the tool call."},"name":{"type":"string","description":"The name of the tool that was run."},"output":{"type":["string","null"],"description":"The output from the tool call."},"server_label":{"type":"string","description":"The label of the MCP server running the tool."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`,\n`calling`, or `failed`.","type":"string","enum":["in_progress","completed","incomplete","calling","failed"],"title":"MCPToolCallStatus"}]}},"title":"MCPToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_call"]}}}],"description":"An invocation of a tool on an MCP server."},{"allOf":[{"description":"The output of a custom tool call from your code, being sent back to the model.","type":"object","required":["call_id","output"],"properties":{"call_id":{"type":"string","description":"The call ID, used to map this custom tool call output to a custom tool call."},"id":{"type":["string","null"],"description":"The unique ID of the custom tool call output in the OpenAI platform."},"output":{"description":"The output from the custom tool call generated by your code.\nCan be a string or an list of output content.","oneOf":[{"type":"string","description":"A string of the output of the custom tool call."},{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A text input to the model.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text input to the model."}},"title":"InputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_text"]}}}],"description":"A text input to the model."},{"allOf":[{"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision).","type":"object","required":["detail"],"properties":{"detail":{"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`.\nDefaults to `auto`.","type":"string","enum":["auto","low","high"],"title":"ImageDetail"},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"image_url":{"type":["string","null"],"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image\nin a data URL."}},"title":"InputImageContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_image"]}}}],"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision)."},{"allOf":[{"description":"A file input to the model.","type":"object","properties":{"file_data":{"type":["string","null"],"description":"The content of the file to be sent to the model."},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"file_url":{"type":["string","null"],"description":"The URL of the file to be sent to the model."},"filename":{"type":["string","null"],"description":"The name of the file to be sent to the model."}},"title":"InputFileContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_file"]}}}],"description":"A file input to the model."}],"description":"Parts of a message: text, image, file, or audio.","title":"InputContent"},"description":"Text, image, or file output of the custom tool call."}],"title":"CustomToolCallOutputOutput"}},"title":"CustomToolCallOutput"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["custom_tool_call_output"]}}}],"description":"The output of a custom tool call from your code, being sent back to the model."},{"allOf":[{"description":"A call to a custom tool created by the model.","type":"object","required":["call_id","input","name","id"],"properties":{"call_id":{"type":"string","description":"An identifier used to map this custom tool call to a tool call output."},"id":{"type":"string","description":"The unique ID of the custom tool call in the OpenAI platform."},"input":{"type":"string","description":"The input for the custom tool call generated by the model."},"name":{"type":"string","description":"The name of the custom tool being called."}},"title":"CustomToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["custom_tool_call"]}}}],"description":"A call to a custom tool created by the model."}],"title":"Item"},{"description":"A simple, user-friendly message input (EasyInputMessage).\nSupports string content and can include assistant role for previous responses.\nMust be tried last as it's the most flexible structure.\n\nA 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.","type":"object","required":["type","role","content"],"properties":{"content":{"description":"Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.","oneOf":[{"type":"string","description":"A text input to the model."},{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A text input to the model.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text input to the model."}},"title":"InputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_text"]}}}],"description":"A text input to the model."},{"allOf":[{"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision).","type":"object","required":["detail"],"properties":{"detail":{"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`.\nDefaults to `auto`.","type":"string","enum":["auto","low","high"],"title":"ImageDetail"},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"image_url":{"type":["string","null"],"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image\nin a data URL."}},"title":"InputImageContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_image"]}}}],"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision)."},{"allOf":[{"description":"A file input to the model.","type":"object","properties":{"file_data":{"type":["string","null"],"description":"The content of the file to be sent to the model."},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"file_url":{"type":["string","null"],"description":"The URL of the file to be sent to the model."},"filename":{"type":["string","null"],"description":"The name of the file to be sent to the model."}},"title":"InputFileContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_file"]}}}],"description":"A file input to the model."}],"description":"Parts of a message: text, image, file, or audio.","title":"InputContent"},"description":"A list of one or many input items to the model, containing different content types."}],"title":"EasyInputContent"},"role":{"description":"The role of the message input. One of `user`, `assistant`, `system`, or `developer`.","type":"string","enum":["user","assistant","system","developer"],"title":"Role"},"type":{"description":"The type of the message input. Always set to `message`.","type":"string","enum":["message"],"title":"MessageType"}},"title":"EasyInputMessage"}],"description":"Input item that can be used in the context for generating a response.\n\nThis represents the OpenAPI `InputItem` schema which is an `anyOf`:\n1. `EasyInputMessage` - Simple, user-friendly message input (can use string content)\n2. `Item` - Structured items with proper type discrimination (including InputMessage, OutputMessage, tool calls)\n3. `ItemReferenceParam` - Reference to an existing item by ID (type can be null)\n\nUses untagged deserialization because these types overlap in structure.\nOrder matters: more specific structures are tried first.\n\n# OpenAPI Specification\nCorresponds to the `InputItem` schema: `anyOf[EasyInputMessage, Item, ItemReferenceParam]`","title":"InputItem"},"description":"A list of one or many input items to the model, containing different content types."}],"title":"Instructions"}]},"max_output_tokens":{"type":["integer","null"],"format":"int32","description":"An upper bound for the number of tokens that can be generated for a response,\nincluding visible output tokens and\n[reasoning tokens](https://platform.openai.com/docs/guides/reasoning).","minimum":0},"metadata":{"type":["object","null"],"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.","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"model":{"type":"string","description":"Model ID used to generate the response, like gpt-4o or o3. OpenAI offers a\nwide range of models with different capabilities, performance characteristics,\nand price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models."},"object":{"type":"string","description":"The object type of this resource - always set to `response`."},"output":{"type":"array","items":{"oneOf":[{"allOf":[{"description":"An output message from the model.","type":"object","required":["content","id","role","status"],"properties":{"content":{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A text output from the model.","type":"object","required":["annotations","text"],"properties":{"annotations":{"type":"array","items":{"oneOf":[{"allOf":[{"description":"A citation to a file.","type":"object","required":["file_id","filename","index"],"properties":{"file_id":{"type":"string","description":"The ID of the file."},"filename":{"type":"string","description":"The filename of the file cited."},"index":{"type":"integer","format":"int32","description":"The index of the file in the list of files.","minimum":0}},"title":"FileCitationBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_citation"]}}}],"description":"A citation to a file."},{"allOf":[{"description":"A citation for a web resource used to generate a model response.","type":"object","required":["end_index","start_index","title","url"],"properties":{"end_index":{"type":"integer","format":"int32","description":"The index of the last character of the URL citation in the message.","minimum":0},"start_index":{"type":"integer","format":"int32","description":"The index of the first character of the URL citation in the message.","minimum":0},"title":{"type":"string","description":"The title of the web resource."},"url":{"type":"string","description":"The URL of the web resource."}},"title":"UrlCitationBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["url_citation"]}}}],"description":"A citation for a web resource used to generate a model response."},{"allOf":[{"description":"A citation for a container file used to generate a model response.","type":"object","required":["container_id","end_index","file_id","filename","start_index"],"properties":{"container_id":{"type":"string","description":"The ID of the container file."},"end_index":{"type":"integer","format":"int32","description":"The index of the last character of the container file citation in the message.","minimum":0},"file_id":{"type":"string","description":"The ID of the file."},"filename":{"type":"string","description":"The filename of the container file cited."},"start_index":{"type":"integer","format":"int32","description":"The index of the first character of the container file citation in the message.","minimum":0}},"title":"ContainerFileCitationBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["container_file_citation"]}}}],"description":"A citation for a container file used to generate a model response."},{"allOf":[{"description":"A path to a file.","type":"object","required":["file_id","index"],"properties":{"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","format":"int32","description":"The index of the file in the list of files.","minimum":0}},"title":"FilePath"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_path"]}}}],"description":"A path to a file."}],"title":"Annotation"},"description":"The annotations of the text output."},"logprobs":{"type":["array","null"],"items":{"type":"object","required":["bytes","logprob","token","top_logprobs"],"properties":{"bytes":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"logprob":{"type":"number","format":"double"},"token":{"type":"string"},"top_logprobs":{"type":"array","items":{"type":"object","required":["bytes","logprob","token"],"properties":{"bytes":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"logprob":{"type":"number","format":"double"},"token":{"type":"string"}},"title":"TopLogProb"}}},"title":"LogProb"}},"text":{"type":"string","description":"The text output from the model."}},"title":"OutputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["output_text"]}}}],"description":"A text output from the model."},{"allOf":[{"description":"A refusal from the model.","type":"object","required":["refusal"],"properties":{"refusal":{"type":"string","description":"The refusal explanation from the model."}},"title":"RefusalContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["refusal"]}}}],"description":"A refusal from the model."}],"title":"OutputMessageContent"},"description":"The content of the output message."},"id":{"type":"string","description":"The unique ID of the output message."},"role":{"description":"The role of the output message. Always `assistant`.","type":"string","enum":["assistant"],"title":"AssistantRole"},"status":{"description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}},"title":"OutputMessage"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["message"]}}}],"description":"An output message from the model."},{"allOf":[{"description":"The results of a file search tool call. See the\n[file search guide](https://platform.openai.com/docs/guides/tools-file-search)\nfor more information.","type":"object","required":["id","queries","status"],"properties":{"id":{"type":"string","description":"The unique ID of the file search tool call."},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files."},"results":{"type":["array","null"],"items":{"type":"object","description":"A single result from a file search.","required":["attributes","file_id","filename","score","text"],"properties":{"attributes":{"type":"object","description":"Set of 16 key-value pairs that can be attached to an object. This can be useful for storing\nadditional information about the object in a structured format, and querying for objects\nAPI or the dashboard. Keys are strings with a maximum length of 64 characters\n. Values are strings with a maximum length of 512 characters, booleans, or numbers.","additionalProperties":{},"propertyNames":{"type":"string"}},"file_id":{"type":"string","description":"The unique ID of the file."},"filename":{"type":"string","description":"The name of the file."},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1."},"text":{"type":"string","description":"The text that was retrieved from the file."}},"title":"FileSearchToolCallResult"},"description":"The results of the file search tool call."},"status":{"description":"The status of the file search tool call. One of `in_progress`, `searching`,\n`incomplete`,`failed`, or `completed`.","type":"string","enum":["in_progress","searching","incomplete","failed","completed"],"title":"FileSearchToolCallStatus"}},"title":"FileSearchToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_search_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)\nfor more information."},{"allOf":[{"description":"A tool call to run a function. See the\n[function calling guide](https://platform.openai.com/docs/guides/function-calling)\nfor more information.","type":"object","required":["arguments","call_id","name"],"properties":{"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function."},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model."},"id":{"type":["string","null"],"description":"The unique ID of the function tool call."},"name":{"type":"string","description":"The name of the function to run."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]}},"title":"FunctionToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["function_call"]}}}],"description":"A tool call to run a function. See the\n[function calling guide](https://platform.openai.com/docs/guides/function-calling)\nfor more information."},{"allOf":[{"description":"The results of a web search tool call. See the\n[web search guide](https://platform.openai.com/docs/guides/tools-web-search)\nfor more information.","type":"object","required":["action","id","status"],"properties":{"action":{"description":"An object describing the specific action taken in this web search call. Includes\ndetails on how the model used the web (search, open_page, find).","oneOf":[{"allOf":[{"description":"Action type \"search\" - Performs a web search query.","type":"object","required":["query"],"properties":{"query":{"type":"string","description":"The search query."},"sources":{"type":["array","null"],"items":{"type":"object","required":["type","url"],"properties":{"type":{"type":"string","description":"The type of source. Always `url`."},"url":{"type":"string","description":"The URL of the source."}},"title":"WebSearchActionSearchSource"},"description":"The sources used in the search."}},"title":"WebSearchActionSearch"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["search"]}}}],"description":"Action type \"search\" - Performs a web search query."},{"allOf":[{"description":"Action type \"open_page\" - Opens a specific URL from search results.","type":"object","required":["url"],"properties":{"url":{"type":"string","description":"The URL opened by the model."}},"title":"WebSearchActionOpenPage"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["open_page"]}}}],"description":"Action type \"open_page\" - Opens a specific URL from search results."},{"allOf":[{"description":"Action type \"find\": Searches for a pattern within a loaded page.","type":"object","required":["url","pattern"],"properties":{"pattern":{"type":"string","description":"The pattern or text to search for within the page."},"url":{"type":"string","description":"The URL of the page searched for the pattern."}},"title":"WebSearchActionFind"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["find"]}}}],"description":"Action type \"find\": Searches for a pattern within a loaded page."}],"title":"WebSearchToolCallAction"},"id":{"type":"string","description":"The unique ID of the web search tool call."},"status":{"description":"The status of the web search tool call.","type":"string","enum":["in_progress","searching","completed","failed"],"title":"WebSearchToolCallStatus"}},"title":"WebSearchToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["web_search_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)\nfor more information."},{"allOf":[{"description":"A tool call to a computer use tool. See the\n[computer use guide](https://platform.openai.com/docs/guides/tools-computer-use)\nfor more information.","type":"object","required":["action","call_id","id","pending_safety_checks","status"],"properties":{"action":{"oneOf":[{"allOf":[{"description":"A click action.","type":"object","required":["button","x","y"],"properties":{"button":{"description":"Indicates which mouse button was pressed during the click. One of `left`,\n`right`, `wheel`, `back`, or `forward`.","type":"string","enum":["left","right","wheel","back","forward"],"title":"ClickButtonType"},"x":{"type":"integer","format":"int32","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","format":"int32","description":"The y-coordinate where the click occurred."}},"title":"ClickParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["click"]}}}],"description":"A click action."},{"allOf":[{"description":"A double click action.","type":"object","required":["x","y"],"properties":{"x":{"type":"integer","format":"int32","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","format":"int32","description":"The y-coordinate where the double click occurred."}},"title":"DoubleClickAction"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["double_click"]}}}],"description":"A double click action."},{"allOf":[{"description":"A drag action.","type":"object","required":["path"],"properties":{"path":{"type":"array","items":{"type":"object","description":"A point in 2D space.","required":["x","y"],"properties":{"x":{"type":"integer","format":"int32","description":"The x-coordinate."},"y":{"type":"integer","format":"int32","description":"The y-coordinate."}},"title":"DragPoint"},"description":"The path of points the cursor drags through."}},"title":"Drag"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["drag"]}}}],"description":"A drag action."},{"allOf":[{"description":"A collection of keypresses the model would like to perform.","type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"type":"string"},"description":"The combination of keys the model is requesting to be pressed.\nThis is an array of strings, each representing a key."}},"title":"KeyPressAction"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["keypress"]}}}],"description":"A collection of keypresses the model would like to perform."},{"allOf":[{"description":"A mouse move action.","type":"object","required":["x","y"],"properties":{"x":{"type":"integer","format":"int32","description":"The x-coordinate to move to."},"y":{"type":"integer","format":"int32","description":"The y-coordinate to move to."}},"title":"Move"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["move"]}}}],"description":"A mouse move action."},{"type":"object","description":"A screenshot action.","required":["type"],"properties":{"type":{"type":"string","enum":["screenshot"]}}},{"allOf":[{"description":"A scroll action.","type":"object","required":["scroll_x","scroll_y","x","y"],"properties":{"scroll_x":{"type":"integer","format":"int32","description":"The horizontal scroll distance."},"scroll_y":{"type":"integer","format":"int32","description":"The vertical scroll distance."},"x":{"type":"integer","format":"int32","description":"The x-coordinate where the scroll occurred."},"y":{"type":"integer","format":"int32","description":"The y-coordinate where the scroll occurred."}},"title":"Scroll"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scroll"]}}}],"description":"A scroll action."},{"allOf":[{"description":"An action to type in text.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text to type."}},"title":"Type"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["type"]}}}],"description":"An action to type in text."},{"type":"object","description":"A wait action.","required":["type"],"properties":{"type":{"type":"string","enum":["wait"]}}}],"description":"Represents all user‐triggered actions.","title":"ComputerAction"},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output."},"id":{"type":"string","description":"The unique ID of the computer call."},"pending_safety_checks":{"type":"array","items":{"type":"object","required":["id"],"properties":{"code":{"type":["string","null"],"description":"The type of the pending safety check."},"id":{"type":"string","description":"The ID of the pending safety check."},"message":{"type":["string","null"],"description":"Details about the pending safety check."}},"title":"ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call."},"status":{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}},"title":"ComputerToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["computer_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)\nfor more information."},{"allOf":[{"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 for\nsubsequent turns of a conversation if you are manually\n[managing context](https://platform.openai.com/docs/guides/conversation-state).","type":"object","required":["id","summary"],"properties":{"content":{"type":["array","null"],"items":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The reasoning text from the model."}},"title":"ReasoningTextContent"},"description":"Reasoning text content."},"encrypted_content":{"type":["string","null"],"description":"The encrypted content of the reasoning item - populated when a response is generated with\n`reasoning.encrypted_content` in the `include` parameter."},"id":{"type":"string","description":"Unique identifier of the reasoning content."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\nPopulated when items are returned via API.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}]},"summary":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","description":"A single summary text fragment from reasoning.","required":["text"],"properties":{"text":{"type":"string","description":"A summary of the reasoning output from the model so far."}},"title":"Summary"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["summary_text"]}}}]}],"title":"SummaryPart"},"description":"Reasoning summary content."}},"title":"ReasoningItem"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["reasoning"]}}}],"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 for\nsubsequent turns of a conversation if you are manually\n[managing context](https://platform.openai.com/docs/guides/conversation-state)."},{"allOf":[{"description":"A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).","type":"object","required":["id","encrypted_content"],"properties":{"created_by":{"type":["string","null"],"description":"Created by model/user identifier."},"encrypted_content":{"type":"string","description":"The encrypted content."},"id":{"type":"string","description":"The unique ID of the compaction item."}},"title":"CompactionBody"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["compaction"]}}}],"description":"A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact)."},{"allOf":[{"description":"An image generation request made by the model.","type":"object","required":["id","status"],"properties":{"id":{"type":"string","description":"The unique ID of the image generation call."},"result":{"type":["string","null"],"description":"The generated image encoded in base64."},"status":{"description":"The status of the image generation call.","type":"string","enum":["in_progress","completed","generating","failed"],"title":"ImageGenToolCallStatus"}},"title":"ImageGenToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["image_generation_call"]}}}],"description":"An image generation request made by the model."},{"allOf":[{"description":"A tool call to run code.","type":"object","required":["container_id","id","status"],"properties":{"code":{"type":["string","null"],"description":"The code to run, or null if not available."},"container_id":{"type":"string","description":"ID of the container used to run the code."},"id":{"type":"string","description":"The unique ID of the code interpreter tool call."},"outputs":{"type":["array","null"],"items":{"oneOf":[{"allOf":[{"description":"Code interpreter output logs","type":"object","required":["logs"],"properties":{"logs":{"type":"string","description":"The logs output from the code interpreter."}},"title":"CodeInterpreterOutputLogs"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["logs"]}}}],"description":"Code interpreter output logs"},{"allOf":[{"description":"Code interpreter output image","type":"object","required":["url"],"properties":{"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"title":"CodeInterpreterOutputImage"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["image"]}}}],"description":"Code interpreter output image"}],"description":"Individual result from a code interpreter: either logs or files.","title":"CodeInterpreterToolCallOutput"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available."},"status":{"description":"The status of the code interpreter tool call.\nValid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.","type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"title":"CodeInterpreterToolCallStatus"}},"title":"CodeInterpreterToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["code_interpreter_call"]}}}],"description":"A tool call to run code."},{"allOf":[{"description":"A tool call to run a command on the local shell.","type":"object","required":["action","call_id","id","status"],"properties":{"action":{"description":"Execute a shell command on the server.","type":"object","required":["command","env"],"properties":{"command":{"type":"array","items":{"type":"string"},"description":"The command to run."},"env":{"type":"object","description":"Environment variables to set for the command.","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"timeout_ms":{"type":["integer","null"],"format":"int64","description":"Optional timeout in milliseconds for the command.","minimum":0},"user":{"type":["string","null"],"description":"Optional user to run the command as."},"working_directory":{"type":["string","null"],"description":"Optional working directory to run the command in."}},"title":"LocalShellExecAction"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model."},"id":{"type":"string","description":"The unique ID of the local shell call."},"status":{"description":"The status of the local shell call.","type":"string","enum":["in_progress","completed","incomplete"],"title":"OutputStatus"}},"title":"LocalShellToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["local_shell_call"]}}}],"description":"A tool call to run a command on the local shell."},{"allOf":[{"description":"A tool call that executes one or more shell commands in a managed environment.","type":"object","required":["id","call_id","action","status"],"properties":{"action":{"description":"The shell commands and limits that describe how to run the tool call.","type":"object","required":["commands"],"properties":{"commands":{"type":"array","items":{"type":"string"},"description":"A list of commands to run."},"max_output_length":{"type":["integer","null"],"format":"int64","description":"Optional maximum number of characters to return from each command.","minimum":0},"timeout_ms":{"type":["integer","null"],"format":"int64","description":"Optional timeout in milliseconds for the commands.","minimum":0}},"title":"FunctionShellAction"},"call_id":{"type":"string","description":"The unique ID of the function shell tool call generated by the model."},"created_by":{"type":["string","null"],"description":"The ID of the entity that created this tool call."},"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API."},"status":{"description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.","type":"string","enum":["in_progress","completed","incomplete"],"title":"LocalShellCallStatus"}},"title":"FunctionShellCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["shell_call"]}}}],"description":"A tool call that executes one or more shell commands in a managed environment."},{"allOf":[{"description":"The output of a shell tool call.","type":"object","required":["id","call_id","output"],"properties":{"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"created_by":{"type":["string","null"]},"id":{"type":"string","description":"The unique ID of the shell call output. Populated when this item is returned via API."},"max_output_length":{"type":["integer","null"],"format":"int64","description":"The maximum length of the shell command output. This is generated by the model and should be\npassed back with the raw output.","minimum":0},"output":{"type":"array","items":{"allOf":[{"description":"Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["timeout"]}}},{"allOf":[{"type":"object","description":"Indicates that the shell commands finished and returned an exit code.","required":["exit_code"],"properties":{"exit_code":{"type":"integer","format":"int32","description":"Exit code from the shell process."}},"title":"FunctionShellCallOutputExitOutcome"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["exit"]}}}]}],"title":"FunctionShellCallOutputOutcome"},{"type":"object","required":["stdout","stderr"],"properties":{"created_by":{"type":["string","null"]},"stderr":{"type":"string"},"stdout":{"type":"string"}}}],"description":"The content of a shell call output.","title":"FunctionShellCallOutputContent"},"description":"An array of shell call output contents"}},"title":"FunctionShellCallOutput"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["shell_call_output"]}}}],"description":"The output of a shell tool call."},{"allOf":[{"description":"A tool call that applies file diffs by creating, deleting, or updating files.","type":"object","required":["id","call_id","status","operation"],"properties":{"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"created_by":{"type":["string","null"],"description":"The ID of the entity that created this tool call."},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"operation":{"description":"One of the create_file, delete_file, or update_file operations applied via apply_patch.","oneOf":[{"allOf":[{"type":"object","description":"Instruction describing how to create a file via the apply_patch tool.","required":["path","diff"],"properties":{"diff":{"type":"string","description":"Diff to apply."},"path":{"type":"string","description":"Path of the file to create."}},"title":"ApplyPatchCreateFileOperation"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["create_file"]}}}]},{"allOf":[{"type":"object","description":"Instruction describing how to delete a file via the apply_patch tool.","required":["path"],"properties":{"path":{"type":"string","description":"Path of the file to delete."}},"title":"ApplyPatchDeleteFileOperation"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["delete_file"]}}}]},{"allOf":[{"type":"object","description":"Instruction describing how to update a file via the apply_patch tool.","required":["path","diff"],"properties":{"diff":{"type":"string","description":"Diff to apply."},"path":{"type":"string","description":"Path of the file to update."}},"title":"ApplyPatchUpdateFileOperation"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["update_file"]}}}]}],"title":"ApplyPatchOperation"},"status":{"description":"The status of the apply patch tool call. One of `in_progress` or `completed`.","type":"string","enum":["in_progress","completed"],"title":"ApplyPatchCallStatus"}},"title":"ApplyPatchToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["apply_patch_call"]}}}],"description":"A tool call that applies file diffs by creating, deleting, or updating files."},{"allOf":[{"description":"The output emitted by an apply patch tool call.","type":"object","required":["id","call_id","status"],"properties":{"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"created_by":{"type":["string","null"],"description":"The ID of the entity that created this tool call output."},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"output":{"type":["string","null"],"description":"Optional textual output returned by the apply patch tool."},"status":{"description":"The status of the apply patch tool call output. One of `completed` or `failed`.","type":"string","enum":["completed","failed"],"title":"ApplyPatchCallOutputStatus"}},"title":"ApplyPatchToolCallOutput"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["apply_patch_call_output"]}}}],"description":"The output emitted by an apply patch tool call."},{"allOf":[{"description":"An invocation of a tool on an MCP server.","type":"object","required":["arguments","id","name","server_label"],"properties":{"approval_request_id":{"type":["string","null"],"description":"Unique identifier for the MCP tool call approval request. Include this value\nin a subsequent `mcp_approval_response` input to approve or reject the corresponding\ntool call."},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool."},"error":{"type":["string","null"],"description":"Error message from the call, if any."},"id":{"type":"string","description":"The unique ID of the tool call."},"name":{"type":"string","description":"The name of the tool that was run."},"output":{"type":["string","null"],"description":"The output from the tool call."},"server_label":{"type":"string","description":"The label of the MCP server running the tool."},"status":{"oneOf":[{"type":"null"},{"description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`,\n`calling`, or `failed`.","type":"string","enum":["in_progress","completed","incomplete","calling","failed"],"title":"MCPToolCallStatus"}]}},"title":"MCPToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_call"]}}}],"description":"An invocation of a tool on an MCP server."},{"allOf":[{"description":"A list of tools available on an MCP server.","type":"object","required":["id","server_label","tools"],"properties":{"error":{"type":["string","null"],"description":"Error message if listing failed."},"id":{"type":"string","description":"The unique ID of the list."},"server_label":{"type":"string","description":"The label of the MCP server."},"tools":{"type":"array","items":{"type":"object","required":["input_schema","name"],"properties":{"annotations":{"description":"Additional annotations about the tool."},"description":{"type":["string","null"],"description":"The description of the tool."},"input_schema":{"description":"The JSON schema describing the tool's input."},"name":{"type":"string","description":"The name of the tool."}},"title":"MCPListToolsTool"},"description":"The tools available on the server."}},"title":"MCPListTools"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_list_tools"]}}}],"description":"A list of tools available on an MCP server."},{"allOf":[{"description":"A request for human approval of a tool invocation.","type":"object","required":["arguments","id","name","server_label"],"properties":{"arguments":{"type":"string","description":"JSON string of arguments for the tool."},"id":{"type":"string","description":"The unique ID of the approval request."},"name":{"type":"string","description":"The name of the tool to run."},"server_label":{"type":"string","description":"The label of the MCP server making the request."}},"title":"MCPApprovalRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp_approval_request"]}}}],"description":"A request for human approval of a tool invocation."},{"allOf":[{"description":"A call to a custom tool created by the model.","type":"object","required":["call_id","input","name","id"],"properties":{"call_id":{"type":"string","description":"An identifier used to map this custom tool call to a tool call output."},"id":{"type":"string","description":"The unique ID of the custom tool call in the OpenAI platform."},"input":{"type":"string","description":"The input for the custom tool call generated by the model."},"name":{"type":"string","description":"The name of the custom tool being called."}},"title":"CustomToolCall"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["custom_tool_call"]}}}],"description":"A call to a custom tool created by the model."}],"description":"Output item","title":"OutputItem"},"description":"An array of content items generated by the model.\n\n- The length and order of items in the output array is dependent on the model's response.\n- Rather than accessing the first item in the output array and assuming it's an assistant\n message with the content generated by the model, you might consider using\n the `output_text` property where supported in SDKs."},"parallel_tool_calls":{"type":["boolean","null"],"description":"SDK-only convenience property that contains the aggregated text output from all\n`output_text` items in the `output` array, if any are present.\nSupported in the Python and JavaScript SDKs.\nWhether to allow the model to run tool calls in parallel."},"previous_response_id":{"type":["string","null"],"description":"The unique ID of the previous response to the model. Use this to create multi-turn conversations.\nLearn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state).\nCannot be used in conjunction with `conversation`."},"prompt":{"oneOf":[{"type":"null"},{"description":"Reference to a prompt template and its variables.\n[Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).","type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The unique identifier of the prompt template to use."},"variables":{"oneOf":[{"type":"null"},{"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.","oneOf":[{"type":"string"},{"oneOf":[{"allOf":[{"description":"A text input to the model.","type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text input to the model."}},"title":"InputTextContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_text"]}}}],"description":"A text input to the model."},{"allOf":[{"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision).","type":"object","required":["detail"],"properties":{"detail":{"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`.\nDefaults to `auto`.","type":"string","enum":["auto","low","high"],"title":"ImageDetail"},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"image_url":{"type":["string","null"],"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image\nin a data URL."}},"title":"InputImageContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_image"]}}}],"description":"An image input to the model. Learn about\n[image inputs](https://platform.openai.com/docs/guides/vision)."},{"allOf":[{"description":"A file input to the model.","type":"object","properties":{"file_data":{"type":["string","null"],"description":"The content of the file to be sent to the model."},"file_id":{"type":["string","null"],"description":"The ID of the file to be sent to the model."},"file_url":{"type":["string","null"],"description":"The URL of the file to be sent to the model."},"filename":{"type":["string","null"],"description":"The name of the file to be sent to the model."}},"title":"InputFileContent"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_file"]}}}],"description":"A file input to the model."}],"description":"Parts of a message: text, image, file, or audio.","title":"InputContent"},{}],"title":"ResponsePromptVariables"}]},"version":{"type":["string","null"],"description":"Optional version of the prompt template."}},"title":"Prompt"}]},"prompt_cache_key":{"type":["string","null"],"description":"Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces\nthe `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching)."},"prompt_cache_retention":{"oneOf":[{"type":"null"},{"description":"The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching,\nwhich keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn\nmore](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).","type":"string","enum":["in-memory","24h"],"title":"PromptCacheRetention"}]},"reasoning":{"oneOf":[{"type":"null"},{"description":"**gpt-5 and o-series models only**\nConfiguration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning).","type":"object","properties":{"effort":{"oneOf":[{"type":"null"},{"description":"Constrains effort on reasoning for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).\nCurrently supported values are `minimal`, `low`, `medium`, and `high`. Reducing\nreasoning effort can result in faster responses and fewer tokens used\non reasoning in a response.\n\nNote: The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.","type":"string","enum":["none","minimal","low","medium","high","xhigh"],"title":"ReasoningEffort"}]},"summary":{"oneOf":[{"type":"null"},{"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\n`gpt-5`.","type":"string","enum":["auto","concise","detailed"],"title":"ReasoningSummary"}]}},"title":"Reasoning"}]},"safety_identifier":{"type":["string","null"],"description":"A stable identifier used to help detect users of your application that may be violating OpenAI's\nusage policies.\n\nThe IDs should be a string that uniquely identifies each user. We recommend hashing their username\nor email address, in order to avoid sending us any identifying information. [Learn\nmore](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers)."},"service_tier":{"oneOf":[{"type":"null"},{"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\nWhen 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.","type":"string","enum":["auto","default","flex","scale","priority"],"title":"ServiceTier"}]},"status":{"description":"The status of the response generation.\nOne of `completed`, `failed`, `in_progress`, `cancelled`, `queued`, or `incomplete`.","type":"string","enum":["completed","failed","in_progress","cancelled","queued","incomplete"],"title":"Status"},"temperature":{"type":["number","null"],"format":"float","description":"What sampling temperature was used, between 0 and 2. Higher values like 0.8 make\noutputs more random, lower values like 0.2 make output more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both."},"text":{"oneOf":[{"type":"null"},{"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)","type":"object","required":["format"],"properties":{"format":{"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.","oneOf":[{"type":"object","description":"Default response format. Used to generate text responses.","required":["type"],"properties":{"type":{"type":"string","enum":["text"]}}},{"type":"object","description":"JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it.\nNote that the model will not generate JSON without a system or user message\ninstructing it to do so.","required":["type"],"properties":{"type":{"type":"string","enum":["json_object"]}}},{"allOf":[{"type":"object","required":["name"],"properties":{"description":{"type":["string","null"],"description":"A description of what the response format is for, used by the model to determine how to respond in the format."},"name":{"type":"string","description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."},"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/)."},"strict":{"type":["boolean","null"],"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)."}},"title":"ResponseFormatJsonSchema","description":"JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)."},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["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)."}],"title":"TextResponseFormatConfiguration"},"verbosity":{"oneOf":[{"type":"null"},{"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.\n\nCurrently supported values are `low`, `medium`, and `high`.","type":"string","enum":["low","medium","high"],"title":"Verbosity"}]}},"title":"ResponseTextParam"}]},"tool_choice":{"oneOf":[{"type":"null"},{"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.","oneOf":[{"allOf":[{"description":"Constrains the tools available to the model to a pre-defined set.","type":"object","required":["mode","tools"],"properties":{"mode":{"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.","type":"string","enum":["auto","required"],"title":"ToolChoiceAllowedMode"},"tools":{"type":"array","items":{},"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```"}},"title":"ToolChoiceAllowed"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["allowed_tools"]}}}],"description":"Constrains the tools available to the model to a pre-defined set."},{"allOf":[{"description":"Use this option to force the model to call a specific function.","type":"object","required":["name"],"properties":{"name":{"type":"string","description":"The name of the function to call."}},"title":"ToolChoiceFunction"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["function"]}}}],"description":"Use this option to force the model to call a specific function."},{"allOf":[{"description":"Use this option to force the model to call a specific tool on a remote MCP server.","type":"object","required":["name","server_label"],"properties":{"name":{"type":"string","description":"The name of the tool to call on the server."},"server_label":{"type":"string","description":"The label of the MCP server to use."}},"title":"ToolChoiceMCP"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp"]}}}],"description":"Use this option to force the model to call a specific tool on a remote MCP server."},{"allOf":[{"description":"Use this option to force the model to call a custom tool.","type":"object","required":["name"],"properties":{"name":{"type":"string","description":"The name of the custom tool to call."}},"title":"ToolChoiceCustom"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["custom"]}}}],"description":"Use this option to force the model to call a custom tool."},{"type":"object","description":"Forces the model to call the apply_patch tool when executing a tool call.","required":["type"],"properties":{"type":{"type":"string","enum":["apply_patch"]}}},{"type":"object","description":"Forces the model to call the function shell tool when a tool call is required.","required":["type"],"properties":{"type":{"type":"string","enum":["shell"]}}},{"allOf":[{"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).","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_search"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["web_search_preview"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["computer_use_preview"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["code_interpreter"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["image_generation"]}}}],"title":"ToolChoiceTypes"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["hosted"]}}}],"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)."},{"allOf":[{"type":"string","enum":["none","auto","required"],"title":"ToolChoiceOptions","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."},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["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."}],"title":"ToolChoiceParam"}]},"tools":{"type":["array","null"],"items":{"oneOf":[{"allOf":[{"description":"Defines a function in your own code the model can choose to call. Learn more about [function\ncalling](https://platform.openai.com/docs/guides/tools).","type":"object","required":["name"],"properties":{"description":{"type":["string","null"],"description":"A description of the function. Used by the model to determine whether or not to call the\nfunction."},"name":{"type":"string","description":"The name of the function to call."},"parameters":{"description":"A JSON schema object describing the parameters of the function."},"strict":{"type":["boolean","null"],"description":"Whether to enforce strict parameter validation. Default `true`."}},"title":"FunctionTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["function"]}}}],"description":"Defines a function in your own code the model can choose to call. Learn more about [function\ncalling](https://platform.openai.com/docs/guides/tools)."},{"allOf":[{"description":"A tool that searches for relevant content from uploaded files. Learn more about the [file search\ntool](https://platform.openai.com/docs/guides/tools-file-search).","type":"object","required":["vector_store_ids"],"properties":{"filters":{"oneOf":[{"type":"null"},{"description":"A filter to apply.","oneOf":[{"description":"A filter used to compare a specified attribute key to a given value using a defined\ncomparison operation.","type":"object","required":["type","key","value"],"properties":{"key":{"type":"string","description":"The key to compare against the value."},"type":{"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","type":"string","enum":["eq","ne","gt","gte","lt","lte","in","nin"],"title":"ComparisonType"},"value":{"description":"The value to compare against the attribute key; supports string, number, or boolean types."}},"title":"ComparisonFilter"},{"description":"Combine multiple filters using `and` or `or`.","type":"object","required":["type","filters"],"properties":{"filters":{"type":"array","items":{"oneOf":"circular()","description":"Filters for file search.","title":"Filter"},"description":"Array of filters to combine. Items can be ComparisonFilter or CompoundFilter."},"type":{"type":"string","enum":["and","or"],"description":"'Type of operation: `and` or `or`.'"}},"title":"CompoundFilter"}],"title":"Filter"}]},"max_num_results":{"type":["integer","null"],"format":"int32","description":"The maximum number of results to return. This number should be between 1 and 50 inclusive.","minimum":0},"ranking_options":{"oneOf":[{"type":"null"},{"description":"Ranking options for search.","type":"object","required":["ranker"],"properties":{"hybrid_search":{"oneOf":[{"type":"null"},{"description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus\nsparse keyword matches when hybrid search is enabled.","type":"object","required":["embedding_weight","text_weight"],"properties":{"embedding_weight":{"type":"number","format":"float","description":"The weight of the embedding in the reciprocal ranking fusion."},"text_weight":{"type":"number","format":"float","description":"The weight of the text in the reciprocal ranking fusion."}},"title":"HybridSearch"}]},"ranker":{"description":"The ranker to use for the file search.","type":"string","enum":["auto","default-2024-11-15"],"title":"RankVersionType"},"score_threshold":{"type":["number","null"],"format":"float","description":"The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will\nattempt to return only the most relevant results, but may return fewer results."}},"title":"RankingOptions"}]},"vector_store_ids":{"type":"array","items":{"type":"string"},"description":"The IDs of the vector stores to search."}},"title":"FileSearchTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["file_search"]}}}],"description":"A tool that searches for relevant content from uploaded files. Learn more about the [file search\ntool](https://platform.openai.com/docs/guides/tools-file-search)."},{"allOf":[{"description":"A tool that controls a virtual computer. Learn more about the [computer\nuse tool](https://platform.openai.com/docs/guides/tools-computer-use).","type":"object","required":["environment","display_width","display_height"],"properties":{"display_height":{"type":"integer","format":"int32","description":"The height of the computer display.","minimum":0},"display_width":{"type":"integer","format":"int32","description":"The width of the computer display.","minimum":0},"environment":{"description":"The type of computer environment to control.","type":"string","enum":["windows","mac","linux","ubuntu","browser"],"title":"ComputerEnvironment"}},"title":"ComputerUsePreviewTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["computer_use_preview"]}}}],"description":"A tool that controls a virtual computer. Learn more about the [computer\nuse tool](https://platform.openai.com/docs/guides/tools-computer-use)."},{"allOf":[{"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).","type":"object","properties":{"filters":{"oneOf":[{"type":"null"},{"description":"Filters for the search.","type":"object","properties":{"allowed_domains":{"type":["array","null"],"items":{"type":"string"},"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\"]`"}},"title":"WebSearchToolFilters"}]},"search_context_size":{"oneOf":[{"type":"null"},{"description":"High level guidance for the amount of context window space to use for the search. One of `low`,\n`medium`, or `high`. `medium` is the default.","type":"string","enum":["low","medium","high"],"title":"WebSearchToolSearchContextSize"}]},"user_location":{"oneOf":[{"type":"null"},{"description":"The approximate location of the user.","type":"object","required":["type"],"properties":{"city":{"type":["string","null"],"description":"Free text input for the city of the user, e.g. `San Francisco`."},"country":{"type":["string","null"],"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,\ne.g. `US`."},"region":{"type":["string","null"],"description":"Free text input for the region of the user, e.g. `California`."},"timezone":{"type":["string","null"],"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g.\n`America/Los_Angeles`."},"type":{"description":"The type of location approximation. Always `approximate`.","type":"string","enum":["approximate"],"title":"WebSearchApproximateLocationType"}},"title":"WebSearchApproximateLocation"}]}},"title":"WebSearchTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["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)."},{"allOf":[{"description":"type: web_search_2025_08_26","type":"object","properties":{"filters":{"oneOf":[{"type":"null"},{"description":"Filters for the search.","type":"object","properties":{"allowed_domains":{"type":["array","null"],"items":{"type":"string"},"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\"]`"}},"title":"WebSearchToolFilters"}]},"search_context_size":{"oneOf":[{"type":"null"},{"description":"High level guidance for the amount of context window space to use for the search. One of `low`,\n`medium`, or `high`. `medium` is the default.","type":"string","enum":["low","medium","high"],"title":"WebSearchToolSearchContextSize"}]},"user_location":{"oneOf":[{"type":"null"},{"description":"The approximate location of the user.","type":"object","required":["type"],"properties":{"city":{"type":["string","null"],"description":"Free text input for the city of the user, e.g. `San Francisco`."},"country":{"type":["string","null"],"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,\ne.g. `US`."},"region":{"type":["string","null"],"description":"Free text input for the region of the user, e.g. `California`."},"timezone":{"type":["string","null"],"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g.\n`America/Los_Angeles`."},"type":{"description":"The type of location approximation. Always `approximate`.","type":"string","enum":["approximate"],"title":"WebSearchApproximateLocationType"}},"title":"WebSearchApproximateLocation"}]}},"title":"WebSearchTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["web_search_2025_08_26"]}}}],"description":"type: web_search_2025_08_26"},{"allOf":[{"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).","type":"object","required":["server_label"],"properties":{"allowed_tools":{"oneOf":[{"type":"null"},{"description":"List of allowed tool names or a filter object.","oneOf":[{"type":"array","items":{"type":"string"},"description":"A string array of allowed tool names"},{"description":"A filter object to specify which tools are allowed.","type":"object","properties":{"read_only":{"type":["boolean","null"],"description":"Indicates whether or not a tool modifies data or is read-only.\nIf an MCP server is annotated with [readOnlyHint](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter."},"tool_names":{"type":["array","null"],"items":{"type":"string"},"description":"List of allowed tool names."}},"title":"MCPToolFilter"}],"title":"MCPToolAllowedTools"}]},"authorization":{"type":["string","null"],"description":"An OAuth access token that can be used with a remote MCP server, either with a custom MCP\nserver URL or a service connector. Your application must handle the OAuth authorization\nflow and provide the token here."},"connector_id":{"oneOf":[{"type":"null"},{"description":"Identifier for service connectors, like those available in ChatGPT. One of `server_url` or\n`connector_id` must be provided. Learn more about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).\n\nCurrently supported `connector_id` values are:\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`","type":"string","enum":["connector_dropbox","connector_gmail","connector_googlecalendar","connector_googledrive","connector_microsoftteams","connector_outlookcalendar","connector_outlookemail","connector_sharepoint"],"title":"McpToolConnectorId"}]},"headers":{"description":"Optional HTTP headers to send to the MCP server. Use for authentication or other purposes."},"require_approval":{"oneOf":[{"type":"null"},{"description":"Specify which of the MCP server's tools require approval.","oneOf":[{"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.","type":"object","properties":{"always":{"oneOf":[{"type":"null"},{"description":"A list of tools that always require approval.","type":"object","properties":{"read_only":{"type":["boolean","null"],"description":"Indicates whether or not a tool modifies data or is read-only.\nIf an MCP server is annotated with [readOnlyHint](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter."},"tool_names":{"type":["array","null"],"items":{"type":"string"},"description":"List of allowed tool names."}},"title":"MCPToolFilter"}]},"never":{"oneOf":[{"type":"null"},{"description":"A list of tools that never require approval.","type":"object","properties":{"read_only":{"type":["boolean","null"],"description":"Indicates whether or not a tool modifies data or is read-only.\nIf an MCP server is annotated with [readOnlyHint](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter."},"tool_names":{"type":["array","null"],"items":{"type":"string"},"description":"List of allowed tool names."}},"title":"MCPToolFilter"}]}},"title":"MCPToolApprovalFilter"},{"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.","type":"string","enum":["always","never"],"title":"MCPToolApprovalSetting"}],"title":"MCPToolRequireApproval"}]},"server_description":{"type":["string","null"],"description":"Optional description of the MCP server, used to provide more context."},"server_label":{"type":"string","description":"A label for this MCP server, used to identify it in tool calls."},"server_url":{"type":["string","null"],"description":"The URL for the MCP server. One of `server_url` or `connector_id` must be provided."}},"title":"MCPTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mcp"]}}}],"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)."},{"allOf":[{"description":"A tool that runs Python code to help generate a response to a prompt.","type":"object","required":["container"],"properties":{"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.","oneOf":[{"allOf":[{"description":"Configuration for a code interpreter container. Optionally specify the IDs of the\nfiles to run the code on.","type":"object","properties":{"file_ids":{"type":["array","null"],"items":{"type":"string"},"description":"An optional list of uploaded files to make available to your code."},"memory_limit":{"type":["integer","null"],"format":"int64","minimum":0}},"title":"CodeInterpreterContainerAuto"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["auto"]}}}],"description":"Configuration for a code interpreter container. Optionally specify the IDs of the\nfiles to run the code on."},{"type":"object","description":"The container ID.","required":["type"],"properties":{"type":{"type":"string","enum":["container_i_d"]}}}],"title":"CodeInterpreterToolContainer"}},"title":"CodeInterpreterTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["code_interpreter"]}}}],"description":"A tool that runs Python code to help generate a response to a prompt."},{"allOf":[{"description":"A tool that generates images using a model like `gpt-image-1`.","type":"object","properties":{"background":{"oneOf":[{"type":"null"},{"description":"Background type for the generated image. One of `transparent`,\n`opaque`, or `auto`. Default: `auto`.","type":"string","enum":["transparent","opaque","auto"],"title":"ImageGenToolBackground"}]},"input_fidelity":{"oneOf":[{"type":"null"},{"description":"Control how much effort the model will exert to match the style and features, especially facial features,\nof input images. This parameter is only supported for `gpt-image-1`. Unsupported\nfor `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.","type":"string","enum":["high","low"],"title":"InputFidelity"}]},"input_image_mask":{"oneOf":[{"type":"null"},{"description":"Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).","type":"object","properties":{"file_id":{"type":["string","null"],"description":"File ID for the mask image."},"image_url":{"type":["string","null"],"description":"Base64-encoded mask image."}},"title":"ImageGenToolInputImageMask"}]},"model":{"type":["string","null"],"description":"The image generation model to use. Default: `gpt-image-1`."},"moderation":{"oneOf":[{"type":"null"},{"description":"Moderation level for the generated image. Default: `auto`.","type":"string","enum":["auto","low"],"title":"ImageGenToolModeration"}]},"output_compression":{"type":["integer","null"],"format":"int32","description":"Compression level for the output image. Default: 100.","minimum":0},"output_format":{"oneOf":[{"type":"null"},{"description":"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.","type":"string","enum":["png","webp","jpeg"],"title":"ImageGenToolOutputFormat"}]},"partial_images":{"type":["integer","null"],"format":"int32","description":"Number of partial images to generate in streaming mode, from 0 (default value) to 3.","minimum":0},"quality":{"oneOf":[{"type":"null"},{"description":"The quality of the generated image. One of `low`, `medium`, `high`,\nor `auto`. Default: `auto`.","type":"string","enum":["low","medium","high","auto"],"title":"ImageGenToolQuality"}]},"size":{"oneOf":[{"type":"null"},{"description":"The size of the generated image. One of `1024x1024`, `1024x1536`,\n`1536x1024`, or `auto`. Default: `auto`.","type":"string","enum":["auto","1024x1024","1024x1536","1536x1024"],"title":"ImageGenToolSize"}]}},"title":"ImageGenTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["image_generation"]}}}],"description":"A tool that generates images using a model like `gpt-image-1`."},{"type":"object","description":"A tool that allows the model to execute shell commands in a local environment.","required":["type"],"properties":{"type":{"type":"string","enum":["local_shell"]}}},{"type":"object","description":"A tool that allows the model to execute shell commands.","required":["type"],"properties":{"type":{"type":"string","enum":["shell"]}}},{"allOf":[{"description":"A custom tool that processes input using a specified format. Learn more about [custom\ntools](https://platform.openai.com/docs/guides/function-calling#custom-tools)","type":"object","required":["name","format"],"properties":{"description":{"type":["string","null"],"description":"Optional description of the custom tool, used to provide more context."},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","oneOf":[{"type":"object","description":"Unconstrained free-form text.","required":["type"],"properties":{"type":{"type":"string","enum":["text"]}}},{"allOf":[{"type":"object","required":["definition","syntax"],"properties":{"definition":{"type":"string","description":"The grammar definition."},"syntax":{"description":"The syntax of the grammar definition. One of `lark` or `regex`.","type":"string","enum":["lark","regex"],"title":"GrammarSyntax"}},"title":"CustomGrammarFormatParam","description":"A grammar defined by the user."},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["grammar"]}}}],"description":"A grammar defined by the user."}],"title":"CustomToolParamFormat"},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls."}},"title":"CustomToolParam"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["custom"]}}}],"description":"A custom tool that processes input using a specified format. Learn more about [custom\ntools](https://platform.openai.com/docs/guides/function-calling#custom-tools)"},{"allOf":[{"description":" This tool searches the web for relevant results to use in a response. Learn more about the [web search\ntool](https://platform.openai.com/docs/guides/tools-web-search).","type":"object","properties":{"filters":{"oneOf":[{"type":"null"},{"description":"Filters for the search.","type":"object","properties":{"allowed_domains":{"type":["array","null"],"items":{"type":"string"},"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\"]`"}},"title":"WebSearchToolFilters"}]},"search_context_size":{"oneOf":[{"type":"null"},{"description":"High level guidance for the amount of context window space to use for the search. One of `low`,\n`medium`, or `high`. `medium` is the default.","type":"string","enum":["low","medium","high"],"title":"WebSearchToolSearchContextSize"}]},"user_location":{"oneOf":[{"type":"null"},{"description":"The approximate location of the user.","type":"object","required":["type"],"properties":{"city":{"type":["string","null"],"description":"Free text input for the city of the user, e.g. `San Francisco`."},"country":{"type":["string","null"],"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,\ne.g. `US`."},"region":{"type":["string","null"],"description":"Free text input for the region of the user, e.g. `California`."},"timezone":{"type":["string","null"],"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g.\n`America/Los_Angeles`."},"type":{"description":"The type of location approximation. Always `approximate`.","type":"string","enum":["approximate"],"title":"WebSearchApproximateLocationType"}},"title":"WebSearchApproximateLocation"}]}},"title":"WebSearchTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["web_search_preview"]}}}],"description":" This tool searches the web for relevant results to use in a response. Learn more about the [web search\ntool](https://platform.openai.com/docs/guides/tools-web-search)."},{"allOf":[{"description":"type: web_search_preview_2025_03_11","type":"object","properties":{"filters":{"oneOf":[{"type":"null"},{"description":"Filters for the search.","type":"object","properties":{"allowed_domains":{"type":["array","null"],"items":{"type":"string"},"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\"]`"}},"title":"WebSearchToolFilters"}]},"search_context_size":{"oneOf":[{"type":"null"},{"description":"High level guidance for the amount of context window space to use for the search. One of `low`,\n`medium`, or `high`. `medium` is the default.","type":"string","enum":["low","medium","high"],"title":"WebSearchToolSearchContextSize"}]},"user_location":{"oneOf":[{"type":"null"},{"description":"The approximate location of the user.","type":"object","required":["type"],"properties":{"city":{"type":["string","null"],"description":"Free text input for the city of the user, e.g. `San Francisco`."},"country":{"type":["string","null"],"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,\ne.g. `US`."},"region":{"type":["string","null"],"description":"Free text input for the region of the user, e.g. `California`."},"timezone":{"type":["string","null"],"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g.\n`America/Los_Angeles`."},"type":{"description":"The type of location approximation. Always `approximate`.","type":"string","enum":["approximate"],"title":"WebSearchApproximateLocationType"}},"title":"WebSearchApproximateLocation"}]}},"title":"WebSearchTool"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["web_search_preview_2025_03_11"]}}}],"description":"type: web_search_preview_2025_03_11"},{"type":"object","description":"Allows the assistant to create, delete, or update files using unified diffs.","required":["type"],"properties":{"type":{"type":"string","enum":["apply_patch"]}}}],"description":"Definitions for model-callable tools.","title":"Tool"},"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."},"top_logprobs":{"type":["integer","null"],"format":"int32","description":"An integer between 0 and 20 specifying the number of most likely tokens to return at each\ntoken position, each with an associated log probability.","minimum":0},"top_p":{"type":["number","null"],"format":"float","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."},"truncation":{"oneOf":[{"type":"null"},{"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.","type":"string","enum":["auto","disabled"],"title":"Truncation"}]},"usage":{"oneOf":[{"type":"null"},{"description":"Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.","type":"object","required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"],"properties":{"input_tokens":{"type":"integer","format":"int32","description":"The number of input tokens.","minimum":0},"input_tokens_details":{"description":"A detailed breakdown of the input tokens.","type":"object","required":["cached_tokens"],"properties":{"cached_tokens":{"type":"integer","format":"int32","description":"The number of tokens that were retrieved from the cache.\n[More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).","minimum":0}},"title":"InputTokenDetails"},"output_tokens":{"type":"integer","format":"int32","description":"The number of output tokens.","minimum":0},"output_tokens_details":{"description":"A detailed breakdown of the output tokens.","type":"object","required":["reasoning_tokens"],"properties":{"reasoning_tokens":{"type":"integer","format":"int32","description":"The number of reasoning tokens.","minimum":0}},"title":"OutputTokenDetails"},"total_tokens":{"type":"integer","format":"int32","description":"The total number of tokens used.","minimum":0}},"title":"ResponseUsage"}]}},"title":"Response"},"example":{"created_at":1755639134,"id":"resp_68a4ed5e2258819485ece563a803bbf2075163a5e5b1c982","metadata":{},"model":"test","object":"response","output":[{"type":"message","content":[{"type":"output_text","annotations":[],"text":"Thank you! How can I assist you today?"}],"id":"msg_68a4ed5eb7e88194bf0b2560d8b5c0c1075163a5e5b1c982","role":"assistant","status":"completed"}],"parallel_tool_calls":true,"reasoning":{},"store":true,"service_tier":"default","status":"completed","temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":13,"input_tokens_details":{"audio_tokens":null,"cached_tokens":0},"output_tokens":11,"output_tokens_details":{"accepted_prediction_tokens":null,"audio_tokens":null,"reasoning_tokens":0,"rejected_prediction_tokens":null},"total_tokens":24}}}}},"404":{"description":"The specified model was not found"},"500":{"description":"An internal server error occurred while processing the response","content":{"application/json":{"schema":{},"example":{"error":"An internal server error occurred while processing the response."}}}}}}
