> For the complete documentation index, see [llms.txt](https://docs.nexos.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexos.ai/gateway-api/responses.md).

# Responses

Create and manage model responses.

## Create a model response

> Creates a model response.

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Responses","description":"Create and manage model responses."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: nexos-...` for a user key or `X-Api-Key: nexos-team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"CreateResponseRequest":{"allOf":[{"$ref":"#/components/schemas/CreateModelResponseProperties"},{"$ref":"#/components/schemas/ResponseProperties"},{"type":"object","properties":{"input":{"$ref":"#/components/schemas/InputParam"},"include":{"type":"array","description":"Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program).","items":{"$ref":"#/components/schemas/IncludeEnum"},"nullable":true},"parallel_tool_calls":{"type":"boolean","description":"Whether to allow the model to run tool calls in parallel.\n","default":true,"nullable":true},"store":{"type":"boolean","description":"Whether to store the generated model response for later retrieval via\nAPI.\n","default":true,"nullable":true},"instructions":{"type":"string","description":"A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n","nullable":true},"stream":{"description":"If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n","type":"boolean","default":false,"nullable":true},"stream_options":{"$ref":"#/components/schemas/ResponseStreamOptions"},"conversation":{"$ref":"#/components/schemas/ConversationParam","nullable":true}}}]},"CreateModelResponseProperties":{"allOf":[{"$ref":"#/components/schemas/ModelResponseProperties"},{"type":"object","properties":{"top_logprobs":{"description":"An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n","type":"integer","minimum":0,"maximum":20}}}]},"ModelResponseProperties":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/responses_Metadata"},"top_logprobs":{"description":"An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n","type":"integer","minimum":0,"maximum":20,"nullable":true},"temperature":{"type":"number","minimum":0,"maximum":2,"default":1,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n","nullable":true},"top_p":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n","nullable":true},"user":{"type":"string","deprecated":true,"description":"Deprecated in favor of `safety_identifier` and `prompt_cache_key`; use `prompt_cache_key` to maintain caching. A stable end-user identifier to improve cache hit rates and help detect abuse.\n"},"safety_identifier":{"type":"string","description":"A stable identifier used to help detect users who may violate usage policies. Use a unique per-user string (e.g., a hash of username or email) to avoid sending identifying information.\n"},"prompt_cache_key":{"type":"string","description":"Used to cache responses for similar requests and improve cache hit rates. Replaces the `user` field.\n"},"service_tier":{"$ref":"#/components/schemas/ServiceTier"},"prompt_cache_retention":{"type":"string","enum":["in-memory","24h"],"description":"Retention policy for the prompt cache. Set to `24h` to keep cached prefixes active longer (up to 24 hours).\n","nullable":true}}},"responses_Metadata":{"type":"object","description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n","additionalProperties":{"type":"string"},"nullable":true},"ServiceTier":{"type":"string","description":"Specifies the processing tier for the request.\nThe response includes the actual tier used, which may differ from the requested value.\n","enum":["auto","default","flex","scale","priority"],"default":"auto","nullable":true},"ResponseProperties":{"type":"object","required":["model"],"properties":{"previous_response_id":{"type":"string","description":"The unique ID of the previous response to the model. Use this to create multi-turn conversations. Cannot be used with `conversation`.\n","nullable":true},"model":{"description":"Model ID used to generate the response (e.g., `gpt-4o` or `o3`). See your provider's model guide for available options.\n","type":"string"},"reasoning":{"$ref":"#/components/schemas/Reasoning","nullable":true},"background":{"type":"boolean","description":"Whether to run the model response in the background.\n","default":false,"nullable":true},"max_output_tokens":{"description":"An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.\n","type":"integer","nullable":true},"max_tool_calls":{"description":"The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n","type":"integer","nullable":true},"text":{"$ref":"#/components/schemas/ResponseTextParam"},"tools":{"$ref":"#/components/schemas/ToolsArray"},"tool_choice":{"$ref":"#/components/schemas/ToolChoiceParam"},"prompt":{"$ref":"#/components/schemas/Prompt"},"truncation":{"type":"string","description":"The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n  the model's context window size, the model will truncate the\n  response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n  size for a model, the request will fail with a 400 error.\n","enum":["auto","disabled"],"default":"disabled","nullable":true}}},"Reasoning":{"type":"object","description":"Configuration options for reasoning models. Applicable to gpt-5 and o-series models only.\n","title":"Reasoning","properties":{"effort":{"$ref":"#/components/schemas/ReasoningEffort"},"mode":{"type":"string","description":"Reasoning mode for models that support it. One of `standard` or `pro`.\n","enum":["standard","pro"]},"summary":{"type":"string","nullable":true,"description":"A summary of the model's reasoning.\nOne of `auto`, `concise`, or `detailed` (only `concise` is supported for `computer-use-preview`).\n","enum":["auto","concise","detailed"]},"generate_summary":{"type":"string","nullable":true,"deprecated":true,"description":"Deprecated: use `summary` instead.\nA summary of the model's reasoning. One of `auto`, `concise`, or `detailed`.\n","enum":["auto","concise","detailed"]}}},"ReasoningEffort":{"type":"string","nullable":true,"enum":["none","minimal","low","medium","high"],"default":"medium","description":"Controls how much reasoning effort the model uses. Lower settings are faster and use fewer tokens; higher settings provide more detailed reasoning.\n"},"ResponseTextParam":{"type":"object","description":"Configuration options for a text response. Supports plain text or structured JSON.\n","properties":{"format":{"$ref":"#/components/schemas/TextResponseFormatConfiguration"},"verbosity":{"$ref":"#/components/schemas/Verbosity"}}},"TextResponseFormatConfiguration":{"description":"Specifies the required output format. Use `type: json_schema` to enforce a schema; `type: text` is the default.\n","anyOf":[{"$ref":"#/components/schemas/responses_ResponseFormatText"},{"$ref":"#/components/schemas/TextResponseFormatJsonSchema"},{"$ref":"#/components/schemas/responses_ResponseFormatJsonObject"}],"discriminator":{"propertyName":"type"}},"responses_ResponseFormatText":{"type":"object","title":"Text","description":"Default response format. Used to generate text responses.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `text`.","enum":["text"]}},"required":["type"]},"TextResponseFormatJsonSchema":{"type":"object","title":"JSON schema","description":"JSON Schema response format used to generate structured JSON responses.\nLearn more in the Structured Outputs guide.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_schema`.","enum":["json_schema"]},"description":{"type":"string","description":"A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n"},"name":{"type":"string","description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n"},"schema":{"$ref":"#/components/schemas/responses_ResponseFormatJsonSchemaSchema"},"strict":{"type":"boolean","nullable":true,"default":false,"description":"Whether to enable strict schema adherence when generating the output.\nIf true, the model will follow the exact schema; only a subset of JSON Schema is supported.\n"}},"required":["type","schema","name"]},"responses_ResponseFormatJsonSchemaSchema":{"type":"object","title":"JSON schema","description":"The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n","additionalProperties":true},"responses_ResponseFormatJsonObject":{"type":"object","title":"JSON object","description":"JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_object`.","enum":["json_object"]}},"required":["type"]},"Verbosity":{"type":"string","nullable":true,"enum":["low","medium","high"],"default":"medium","description":"Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n"},"ToolsArray":{"type":"array","description":"An array of tools the model may call while generating a response. Categories include built-in tools, MCP tools, and custom function calls.\n","items":{"$ref":"#/components/schemas/responses_Tool"}},"responses_Tool":{"description":"A tool that can be used to generate a response.\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionTool"},{"$ref":"#/components/schemas/FileSearchTool"},{"$ref":"#/components/schemas/ComputerUsePreviewTool"},{"$ref":"#/components/schemas/WebSearchTool"},{"$ref":"#/components/schemas/MCPTool"},{"$ref":"#/components/schemas/CodeInterpreterTool"},{"$ref":"#/components/schemas/ImageGenTool"},{"$ref":"#/components/schemas/LocalShellToolParam"},{"$ref":"#/components/schemas/FunctionShellToolParam"},{"$ref":"#/components/schemas/CustomToolParam"},{"$ref":"#/components/schemas/WebSearchPreviewTool"},{"$ref":"#/components/schemas/ApplyPatchToolParam"}]},"FunctionTool":{"properties":{"type":{"type":"string","enum":["function"],"description":"The type of the function tool. Always `function`.","default":"function"},"name":{"type":"string","description":"The name of the function to call."},"description":{"type":"string","nullable":true,"description":"A description of the function. Used by the model to determine whether or not to call the function."},"parameters":{"type":"object","nullable":true,"additionalProperties":{},"description":"A JSON schema object describing the parameters of the function."},"strict":{"type":"boolean","nullable":true,"description":"Whether to enforce strict parameter validation. Default `true`."}},"type":"object","required":["type","name","strict","parameters"],"title":"Function","description":"Defines a function in your code that the model can call."},"FileSearchTool":{"properties":{"type":{"type":"string","enum":["file_search"],"description":"The type of the file search tool. Always `file_search`.","default":"file_search"},"vector_store_ids":{"items":{"type":"string"},"type":"array","description":"The IDs of the vector stores to search."},"max_num_results":{"type":"integer","description":"The maximum number of results to return. This number should be between 1 and 50 inclusive."},"ranking_options":{"$ref":"#/components/schemas/RankingOptions","description":"Ranking options for search."},"filters":{"$ref":"#/components/schemas/Filters","description":"A filter to apply.","nullable":true}},"type":"object","required":["type","vector_store_ids"],"title":"File search","description":"Searches uploaded files for relevant content. See the file search guide."},"RankingOptions":{"properties":{"ranker":{"$ref":"#/components/schemas/RankerVersionType","description":"The ranker to use for the file search."},"score_threshold":{"type":"number","description":"The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results."},"hybrid_search":{"$ref":"#/components/schemas/HybridSearchOptions","description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled."}},"type":"object","required":[]},"RankerVersionType":{"type":"string","enum":["auto","default-2024-11-15"]},"HybridSearchOptions":{"properties":{"embedding_weight":{"type":"number","description":"The weight of the embedding in the reciprocal ranking fusion."},"text_weight":{"type":"number","description":"The weight of the text in the reciprocal ranking fusion."}},"type":"object","required":["embedding_weight","text_weight"]},"Filters":{"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]},"ComparisonFilter":{"type":"object","additionalProperties":false,"title":"Comparison Filter","description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.\n","properties":{"type":{"type":"string","default":"eq","enum":["eq","ne","gt","gte","lt","lte"],"description":"Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.\n- `eq`: equals\n- `ne`: not equal\n- `gt`: greater than\n- `gte`: greater than or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `in`: in\n- `nin`: not in\n"},"key":{"type":"string","description":"The key to compare against the value."},"value":{"description":"The value to compare against the attribute key; supports string, number, or boolean types.","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"$ref":"#/components/schemas/ComparisonFilterValueItems"}}]}},"required":["type","key","value"]},"ComparisonFilterValueItems":{"anyOf":[{"type":"string"},{"type":"number"}]},"CompoundFilter":{"type":"object","additionalProperties":false,"title":"Compound Filter","description":"Combine multiple filters using `and` or `or`.","properties":{"type":{"type":"string","description":"Type of operation: `and` or `or`.","enum":["and","or"]},"filters":{"type":"array","description":"Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]}}},"required":["type","filters"]},"ComputerUsePreviewTool":{"properties":{"type":{"type":"string","enum":["computer_use_preview"],"description":"The type of the computer use tool. Always `computer_use_preview`.","default":"computer_use_preview"},"environment":{"$ref":"#/components/schemas/ComputerEnvironment","description":"The type of computer environment to control."},"display_width":{"type":"integer","description":"The width of the computer display."},"display_height":{"type":"integer","description":"The height of the computer display."}},"type":"object","required":["type","environment","display_width","display_height"],"title":"Computer use preview","description":"A tool that controls a virtual computer. Learn more in the computer tool guide."},"ComputerEnvironment":{"type":"string","enum":["windows","mac","linux","ubuntu","browser"]},"WebSearchTool":{"type":"object","title":"Web search","description":"Search the internet for sources related to the prompt. Learn more in the web search tool guide.\n","properties":{"type":{"type":"string","enum":["web_search","web_search_2025_08_26"],"description":"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.","default":"web_search"},"filters":{"type":"object","description":"Filters for the search.\n","properties":{"allowed_domains":{"type":"array","title":"Allowed domains for the search.","description":"Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well.\n\nExample: `[\"pubmed.ncbi.nlm.nih.gov\"]`\n","items":{"type":"string","description":"Allowed domain for the search."},"default":[],"nullable":true}},"nullable":true},"user_location":{"$ref":"#/components/schemas/WebSearchApproximateLocation"},"search_context_size":{"type":"string","enum":["low","medium","high"],"default":"medium","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"required":["type"]},"WebSearchApproximateLocation":{"type":"object","nullable":true,"title":"Web search approximate location","description":"The approximate location of the user.\n","properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","nullable":true,"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`."},"region":{"type":"string","nullable":true,"description":"Free text input for the region of the user, e.g. `California`."},"city":{"type":"string","nullable":true,"description":"Free text input for the city of the user, e.g. `San Francisco`."},"timezone":{"type":"string","nullable":true,"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`."}}},"MCPTool":{"type":"object","title":"MCP tool","description":"Give the model access to tools via remote Model Context Protocol (MCP) servers. Learn more in the MCP guide.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"The type of the MCP tool. Always `mcp`."},"server_label":{"type":"string","description":"A label for this MCP server, used to identify it in tool calls.\n"},"server_url":{"type":"string","description":"The URL for the MCP server. One of `server_url` or `connector_id` must be\nprovided.\n"},"connector_id":{"type":"string","enum":["connector_dropbox","connector_gmail","connector_googlecalendar","connector_googledrive","connector_microsoftteams","connector_outlookcalendar","connector_outlookemail","connector_sharepoint"],"description":"Identifier for service connectors, like those available in ChatGPT. One of\n`server_url` or `connector_id` must be provided.\n\nCurrently supported `connector_id` values are:\n\n- Dropbox: `connector_dropbox`\n- Gmail: `connector_gmail`\n- Google Calendar: `connector_googlecalendar`\n- Google Drive: `connector_googledrive`\n- Microsoft Teams: `connector_microsoftteams`\n- Outlook Calendar: `connector_outlookcalendar`\n- Outlook Email: `connector_outlookemail`\n- SharePoint: `connector_sharepoint`\n"},"authorization":{"type":"string","description":"An OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.\n"},"server_description":{"type":"string","description":"Optional description of the MCP server, used to provide more context.\n"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.\n","nullable":true},"allowed_tools":{"description":"List of allowed tool names or a filter object.\n","anyOf":[{"type":"array","title":"MCP allowed tools","description":"A string array of allowed tool names","items":{"type":"string"}},{"$ref":"#/components/schemas/MCPToolFilter"}],"nullable":true},"require_approval":{"description":"Specify which of the MCP server's tools require approval.","default":"always","anyOf":[{"type":"object","title":"MCP tool approval filter","description":"Specify which of the MCP server's tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.\n","properties":{"always":{"$ref":"#/components/schemas/MCPToolFilter"},"never":{"$ref":"#/components/schemas/MCPToolFilter"}},"additionalProperties":false},{"type":"string","title":"MCP tool approval setting","description":"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.\n","enum":["always","never"]}],"nullable":true}},"required":["type","server_label"]},"MCPToolFilter":{"type":"object","title":"MCP tool filter","description":"A filter object to specify which tools are allowed.\n","properties":{"tool_names":{"type":"array","title":"MCP allowed tools","items":{"type":"string"},"description":"List of allowed tool names."},"read_only":{"type":"boolean","description":"Indicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.\n"}},"required":[],"additionalProperties":false},"CodeInterpreterTool":{"type":"object","title":"Code interpreter","description":"A tool that runs Python code to help generate a response to a prompt.\n","properties":{"type":{"type":"string","enum":["code_interpreter"],"description":"The type of the code interpreter tool. Always `code_interpreter`.\n"},"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.\n","anyOf":[{"type":"string","description":"The container ID."},{"$ref":"#/components/schemas/CodeInterpreterContainerAuto"}]}},"required":["type","container"]},"CodeInterpreterContainerAuto":{"properties":{"type":{"type":"string","enum":["auto"],"description":"Always `auto`.","default":"auto"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"description":"An optional list of uploaded files to make available to your code."},"memory_limit":{"$ref":"#/components/schemas/ContainerMemoryLimit","nullable":true}},"type":"object","required":["type"],"title":"CodeInterpreterToolAuto","description":"Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on."},"ContainerMemoryLimit":{"type":"string","enum":["1g","4g","16g","64g"]},"ImageGenTool":{"type":"object","title":"Image generation tool","description":"A tool that generates images using a model like `gpt-image-1`.\n","properties":{"type":{"type":"string","enum":["image_generation"],"description":"The type of the image generation tool. Always `image_generation`.\n"},"model":{"type":"string","enum":["gpt-image-1","gpt-image-1-mini"],"description":"The image generation model to use. Default: `gpt-image-1`.\n","default":"gpt-image-1"},"quality":{"type":"string","enum":["low","medium","high","auto"],"description":"The quality of the generated image. One of `low`, `medium`, `high`,\nor `auto`. Default: `auto`.\n","default":"auto"},"size":{"type":"string","enum":["1024x1024","1024x1536","1536x1024","auto"],"description":"The size of the generated image. One of `1024x1024`, `1024x1536`,\n`1536x1024`, or `auto`. Default: `auto`.\n","default":"auto"},"output_format":{"type":"string","enum":["png","webp","jpeg"],"description":"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.\n","default":"png"},"output_compression":{"type":"integer","minimum":0,"maximum":100,"description":"Compression level for the output image. Default: 100.\n","default":100},"moderation":{"type":"string","enum":["auto","low"],"description":"Moderation level for the generated image. Default: `auto`.\n","default":"auto"},"background":{"type":"string","enum":["transparent","opaque","auto"],"description":"Background type for the generated image. One of `transparent`,\n`opaque`, or `auto`. Default: `auto`.\n","default":"auto"},"input_fidelity":{"$ref":"#/components/schemas/InputFidelity","nullable":true},"input_image_mask":{"type":"object","description":"Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).\n","properties":{"image_url":{"type":"string","description":"Base64-encoded mask image.\n"},"file_id":{"type":"string","description":"File ID for the mask image.\n"}},"required":[],"additionalProperties":false},"partial_images":{"type":"integer","minimum":0,"maximum":3,"description":"Number of partial images to generate in streaming mode, from 0 (default value) to 3.\n","default":0}},"required":["type"]},"InputFidelity":{"type":"string","enum":["high","low"],"description":"Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`."},"LocalShellToolParam":{"properties":{"type":{"type":"string","enum":["local_shell"],"description":"The type of the local shell tool. Always `local_shell`.","default":"local_shell"}},"type":"object","required":["type"],"title":"Local shell tool","description":"A tool that allows the model to execute shell commands in a local environment."},"FunctionShellToolParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The type of the shell tool. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Shell tool","description":"A tool that allows the model to execute shell commands."},"CustomToolParam":{"properties":{"type":{"type":"string","enum":["custom"],"description":"The type of the custom tool. Always `custom`.","default":"custom"},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls."},"description":{"type":"string","description":"Optional description of the custom tool, used to provide more context."},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CustomTextFormatParam"},{"$ref":"#/components/schemas/CustomGrammarFormatParam"}]}},"type":"object","required":["type","name"],"title":"Custom tool","description":"A custom tool that processes input using a specified format."},"CustomTextFormatParam":{"properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`.","default":"text"}},"type":"object","required":["type"],"title":"Text format","description":"Unconstrained free-form text."},"CustomGrammarFormatParam":{"properties":{"type":{"type":"string","enum":["grammar"],"description":"Grammar format. Always `grammar`.","default":"grammar"},"syntax":{"$ref":"#/components/schemas/GrammarSyntax1","description":"The syntax of the grammar definition. One of `lark` or `regex`."},"definition":{"type":"string","description":"The grammar definition."}},"type":"object","required":["type","syntax","definition"],"title":"Grammar format","description":"A grammar defined by the user."},"GrammarSyntax1":{"type":"string","enum":["lark","regex"]},"WebSearchPreviewTool":{"properties":{"type":{"type":"string","enum":["web_search_preview","web_search_preview_2025_03_11"],"description":"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.","default":"web_search_preview"},"user_location":{"$ref":"#/components/schemas/ApproximateLocation","description":"The user's location.","nullable":true},"search_context_size":{"$ref":"#/components/schemas/SearchContextSize","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"type":"object","required":["type"],"title":"Web search preview","description":"Searches the web for relevant results to use in a response. Learn more in the web search tool guide."},"ApproximateLocation":{"properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.","nullable":true},"region":{"type":"string","description":"Free text input for the region of the user, e.g. `California`.","nullable":true},"city":{"type":"string","description":"Free text input for the city of the user, e.g. `San Francisco`.","nullable":true},"timezone":{"type":"string","description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.","nullable":true}},"type":"object","required":["type"]},"SearchContextSize":{"type":"string","enum":["low","medium","high"]},"ApplyPatchToolParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The type of the tool. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Apply patch tool","description":"Allows the assistant to create, delete, or update files using unified diffs."},"ToolChoiceParam":{"description":"How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call.\n","anyOf":[{"$ref":"#/components/schemas/ToolChoiceOptions"},{"$ref":"#/components/schemas/ToolChoiceAllowed"},{"$ref":"#/components/schemas/ToolChoiceTypes"},{"$ref":"#/components/schemas/ToolChoiceFunction"},{"$ref":"#/components/schemas/ToolChoiceMCP"},{"$ref":"#/components/schemas/ToolChoiceCustom"},{"$ref":"#/components/schemas/SpecificApplyPatchParam"},{"$ref":"#/components/schemas/SpecificFunctionShellParam"}]},"ToolChoiceOptions":{"type":"string","title":"Tool choice mode","description":"Controls which (if any) tool is called by the model.\n\n`none` means the model will not call any tool and instead generates a message.\n\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n\n`required` means the model must call one or more tools.\n","enum":["none","auto","required"]},"ToolChoiceAllowed":{"type":"object","title":"Allowed tools","description":"Constrains the tools available to the model to a pre-defined set.\n","properties":{"type":{"type":"string","enum":["allowed_tools"],"description":"Allowed tool configuration type. Always `allowed_tools`."},"mode":{"type":"string","enum":["auto","required"],"description":"Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n"},"tools":{"type":"array","description":"A list of tool definitions that the model should be allowed to call.\n\nFor the Responses API, the list of tool definitions might look like:\n```json\n[\n  { \"type\": \"function\", \"name\": \"get_weather\" },\n  { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n  { \"type\": \"image_generation\" }\n]\n```\n","items":{"type":"object","description":"A tool definition that the model should be allowed to call.\n","additionalProperties":true}}},"required":["type","mode","tools"]},"ToolChoiceTypes":{"type":"object","title":"Hosted tool","description":"Indicates that the model should use a built-in tool to generate a response.\nUse this to select a specific hosted capability.\n","properties":{"type":{"type":"string","description":"The type of hosted tool the model should to use. \n\nAllowed values are:\n- `file_search`\n- `web_search_preview`\n- `computer_use_preview`\n- `code_interpreter`\n- `image_generation`\n","enum":["file_search","web_search_preview","computer_use_preview","web_search_preview_2025_03_11","image_generation","code_interpreter"]}},"required":["type"]},"ToolChoiceFunction":{"type":"object","title":"Function tool","description":"Use this option to force the model to call a specific function.\n","properties":{"type":{"type":"string","enum":["function"],"description":"For function calling, the type is always `function`."},"name":{"type":"string","description":"The name of the function to call."}},"required":["type","name"]},"ToolChoiceMCP":{"type":"object","title":"MCP tool","description":"Use this option to force the model to call a specific tool on a remote MCP server.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"For MCP tools, the type is always `mcp`."},"server_label":{"type":"string","description":"The label of the MCP server to use.\n"},"name":{"type":"string","description":"The name of the tool to call on the server.\n","nullable":true}},"required":["type","server_label"]},"ToolChoiceCustom":{"type":"object","title":"Custom tool","description":"Use this option to force the model to call a specific custom tool.\n","properties":{"type":{"type":"string","enum":["custom"],"description":"For custom tool calling, the type is always `custom`."},"name":{"type":"string","description":"The name of the custom tool to call."}},"required":["type","name"]},"SpecificApplyPatchParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The tool to call. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Specific apply patch tool choice","description":"Forces the model to call the apply_patch tool when executing a tool call."},"SpecificFunctionShellParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The tool to call. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Specific shell tool choice","description":"Forces the model to call the function shell tool when a tool call is required."},"Prompt":{"type":"object","nullable":true,"description":"Reference to a prompt template and its variables.\n","required":["id"],"properties":{"id":{"type":"string","description":"The unique identifier of the prompt template to use."},"version":{"type":"string","nullable":true,"description":"Optional version of the prompt template."},"variables":{"$ref":"#/components/schemas/ResponsePromptVariables"}}},"ResponsePromptVariables":{"type":"object","title":"Prompt Variables","description":"Optional map of values to substitute in for variables in your\nprompt. The substitution values can either be strings, or other\nResponse input types like images or files.\n","additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"nullable":true},"InputTextContent":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContent":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/ImageDetail","description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type","detail"],"title":"Input image","description":"An image input to the model. See the vision guide for details."},"ImageDetail":{"type":"string","enum":["low","high","auto"]},"InputFileContent":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","description":"The name of the file to be sent to the model."},"file_url":{"type":"string","description":"The URL of the file to be sent to the model."},"file_data":{"type":"string","description":"The content of the file to be sent to the model.\n"}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"InputParam":{"description":"Text, image, or file inputs used to generate a response.\nUse this to provide content the model should consider.\n","anyOf":[{"type":"string","title":"Text input","description":"A text input to the model, equivalent to a text input with the\n`user` role.\n"},{"type":"array","title":"Input item list","description":"A list of one or many input items to the model, containing\ndifferent content types.\n","items":{"$ref":"#/components/schemas/InputItem"}}]},"InputItem":{"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/EasyInputMessage"},{"$ref":"#/components/schemas/Item"},{"$ref":"#/components/schemas/ItemReferenceParam"}]},"EasyInputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n","properties":{"role":{"type":"string","description":"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n","enum":["user","assistant","system","developer"]},"content":{"description":"Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n","anyOf":[{"type":"string","title":"Text input","description":"A text input to the model.\n"},{"$ref":"#/components/schemas/InputMessageContentList"}]},"type":{"type":"string","description":"The type of the message input. Always `message`.\n","enum":["message"],"default":"message"}},"required":["role","content"]},"InputMessageContentList":{"type":"array","title":"Input item content list","description":"A list of one or many input items to the model, containing different content \ntypes.\n","items":{"$ref":"#/components/schemas/InputContent"}},"InputContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"Item":{"type":"object","description":"Content item used to generate a response.\n","discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/responses_InputMessage"},{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ComputerCallOutputItemParam"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/FunctionCallOutputItemParam"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/CompactionSummaryItemParam"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/LocalShellToolCallOutput"},{"$ref":"#/components/schemas/FunctionShellCallItemParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutputItemParam"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/MCPApprovalResponse"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/CustomToolCallOutput"},{"$ref":"#/components/schemas/CustomToolCall"}]},"responses_InputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n","properties":{"type":{"type":"string","description":"The type of the message input. Always set to `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the message input. One of `user`, `system`, or `developer`.\n","enum":["user","system","developer"]},"status":{"type":"string","description":"The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]},"content":{"$ref":"#/components/schemas/InputMessageContentList"}},"required":["role","content"]},"OutputMessage":{"type":"object","title":"Output message","description":"An output message from the model.\n","properties":{"id":{"type":"string","description":"The unique ID of the output message.\n"},"type":{"type":"string","description":"The type of the output message. Always `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the output message. Always `assistant`.\n","enum":["assistant"]},"content":{"type":"array","description":"The content of the output message.\n","items":{"$ref":"#/components/schemas/OutputMessageContent"}},"status":{"type":"string","description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","type","role","content","status"]},"OutputMessageContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"}]},"OutputTextContent":{"properties":{"type":{"type":"string","enum":["output_text"],"description":"The type of the output text. Always `output_text`.","default":"output_text"},"text":{"type":"string","description":"The text output from the model."},"annotations":{"items":{"$ref":"#/components/schemas/responses_Annotation"},"type":"array","description":"The annotations of the text output."},"logprobs":{"items":{"$ref":"#/components/schemas/LogProb"},"type":"array"}},"type":"object","required":["type","text","annotations"],"title":"Output text","description":"A text output from the model."},"responses_Annotation":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FileCitationBody"},{"$ref":"#/components/schemas/UrlCitationBody"},{"$ref":"#/components/schemas/ContainerFileCitationBody"},{"$ref":"#/components/schemas/FilePath"}]},"FileCitationBody":{"properties":{"type":{"type":"string","enum":["file_citation"],"description":"The type of the file citation. Always `file_citation`.","default":"file_citation"},"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","description":"The index of the file in the list of files."},"filename":{"type":"string","description":"The filename of the file cited."}},"type":"object","required":["type","file_id","index","filename"],"title":"File citation","description":"A citation to a file."},"UrlCitationBody":{"properties":{"type":{"type":"string","enum":["url_citation"],"description":"The type of the URL citation. Always `url_citation`.","default":"url_citation"},"url":{"type":"string","description":"The URL of the web resource."},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message."},"title":{"type":"string","description":"The title of the web resource."}},"type":"object","required":["type","url","start_index","end_index","title"],"title":"URL citation","description":"A citation for a web resource used to generate a model response."},"ContainerFileCitationBody":{"properties":{"type":{"type":"string","enum":["container_file_citation"],"description":"The type of the container file citation. Always `container_file_citation`.","default":"container_file_citation"},"container_id":{"type":"string","description":"The ID of the container file."},"file_id":{"type":"string","description":"The ID of the file."},"start_index":{"type":"integer","description":"The index of the first character of the container file citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the container file citation in the message."},"filename":{"type":"string","description":"The filename of the container file cited."}},"type":"object","required":["type","container_id","file_id","start_index","end_index","filename"],"title":"Container file citation","description":"A citation for a container file used to generate a model response."},"FilePath":{"type":"object","title":"File path","description":"A path to a file.\n","properties":{"type":{"type":"string","description":"The type of the file path. Always `file_path`.\n","enum":["file_path"]},"file_id":{"type":"string","description":"The ID of the file.\n"},"index":{"type":"integer","description":"The index of the file in the list of files.\n"}},"required":["type","file_id","index"]},"LogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"},"top_logprobs":{"items":{"$ref":"#/components/schemas/TopLogProb"},"type":"array"}},"type":"object","required":["token","logprob","bytes","top_logprobs"],"title":"Log probability","description":"The log probability of a token."},"TopLogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"}},"type":"object","required":["token","logprob","bytes"],"title":"Top log probability","description":"The top log probability of a token."},"RefusalContent":{"properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the refusal. Always `refusal`.","default":"refusal"},"refusal":{"type":"string","description":"The refusal explanation from the model."}},"type":"object","required":["type","refusal"],"title":"Refusal","description":"A refusal from the model."},"FileSearchToolCall":{"type":"object","title":"File search tool call","description":"The results of a file search tool call. See the file search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the file search tool call.\n"},"type":{"type":"string","enum":["file_search_call"],"default":"file_search_call","description":"The type of the file search tool call. Always `file_search_call`.\n"},"status":{"type":"string","description":"The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n","enum":["in_progress","searching","completed","incomplete","failed"]},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files.\n"},"results":{"type":"array","description":"The results of the file search tool call.\n","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The unique ID of the file.\n"},"text":{"type":"string","description":"The text that was retrieved from the file.\n"},"filename":{"type":"string","description":"The name of the file.\n"},"attributes":{"$ref":"#/components/schemas/VectorStoreFileAttributes"},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1.\n"}}},"nullable":true}}},"VectorStoreFileAttributes":{"type":"object","nullable":true,"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n","maxProperties":16,"propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"ComputerToolCall":{"type":"object","title":"Computer tool call","description":"A tool call to a computer use tool. See the computer use guide for more information.\n","properties":{"type":{"type":"string","description":"The type of the computer call. Always `computer_call`.","enum":["computer_call"],"default":"computer_call"},"id":{"type":"string","description":"The unique ID of the computer call."},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output.\n"},"action":{"$ref":"#/components/schemas/ComputerAction"},"pending_safety_checks":{"type":"array","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","id","action","call_id","pending_safety_checks","status"]},"ComputerAction":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ClickParam"},{"$ref":"#/components/schemas/DoubleClickAction"},{"$ref":"#/components/schemas/Drag"},{"$ref":"#/components/schemas/KeyPressAction"},{"$ref":"#/components/schemas/Move"},{"$ref":"#/components/schemas/Screenshot"},{"$ref":"#/components/schemas/Scroll"},{"$ref":"#/components/schemas/Type"},{"$ref":"#/components/schemas/Wait"}]},"ClickParam":{"properties":{"type":{"type":"string","enum":["click"],"description":"Specifies the event type. For a click action, this property is always `click`.","default":"click"},"button":{"$ref":"#/components/schemas/ClickButtonType","description":"Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."},"x":{"type":"integer","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","description":"The y-coordinate where the click occurred."}},"type":"object","required":["type","button","x","y"],"title":"Click","description":"A click action."},"ClickButtonType":{"type":"string","enum":["left","right","wheel","back","forward"]},"DoubleClickAction":{"properties":{"type":{"type":"string","enum":["double_click"],"description":"Specifies the event type. For a double click action, this property is always set to `double_click`.","default":"double_click"},"x":{"type":"integer","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","description":"The y-coordinate where the double click occurred."}},"type":"object","required":["type","x","y"],"title":"DoubleClick","description":"A double click action."},"Drag":{"type":"object","title":"Drag","description":"A drag action.\n","properties":{"type":{"type":"string","enum":["drag"],"default":"drag","description":"Specifies the event type. For a drag action, this property is \nalways set to `drag`.\n"},"path":{"type":"array","description":"An array of coordinates representing the path of the drag action. Coordinates will appear as an array\nof objects, eg\n```\n[\n  { x: 100, y: 200 },\n  { x: 200, y: 300 }\n]\n```\n","items":{"$ref":"#/components/schemas/DragPoint"}}},"required":["type","path"]},"DragPoint":{"properties":{"x":{"type":"integer","description":"The x-coordinate."},"y":{"type":"integer","description":"The y-coordinate."}},"type":"object","required":["x","y"],"title":"Coordinate","description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."},"KeyPressAction":{"properties":{"type":{"type":"string","enum":["keypress"],"description":"Specifies the event type. For a keypress action, this property is always set to `keypress`.","default":"keypress"},"keys":{"items":{"type":"string","description":"One of the keys the model is requesting to be pressed."},"type":"array","description":"The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key."}},"type":"object","required":["type","keys"],"title":"KeyPress","description":"A collection of keypresses the model would like to perform."},"Move":{"type":"object","title":"Move","description":"A mouse move action.\n","properties":{"type":{"type":"string","enum":["move"],"default":"move","description":"Specifies the event type. For a move action, this property is \nalways set to `move`.\n"},"x":{"type":"integer","description":"The x-coordinate to move to.\n"},"y":{"type":"integer","description":"The y-coordinate to move to.\n"}},"required":["type","x","y"]},"Screenshot":{"type":"object","title":"Screenshot","description":"A screenshot action.\n","properties":{"type":{"type":"string","enum":["screenshot"],"default":"screenshot","description":"Specifies the event type. For a screenshot action, this property is \nalways set to `screenshot`.\n"}},"required":["type"]},"Scroll":{"type":"object","title":"Scroll","description":"A scroll action.\n","properties":{"type":{"type":"string","enum":["scroll"],"default":"scroll","description":"Specifies the event type. For a scroll action, this property is \nalways set to `scroll`.\n"},"x":{"type":"integer","description":"The x-coordinate where the scroll occurred.\n"},"y":{"type":"integer","description":"The y-coordinate where the scroll occurred.\n"},"scroll_x":{"type":"integer","description":"The horizontal scroll distance.\n"},"scroll_y":{"type":"integer","description":"The vertical scroll distance.\n"}},"required":["type","x","y","scroll_x","scroll_y"]},"Type":{"type":"object","title":"Type","description":"An action to type in text.\n","properties":{"type":{"type":"string","enum":["type"],"default":"type","description":"Specifies the event type. For a type action, this property is \nalways set to `type`.\n"},"text":{"type":"string","description":"The text to type.\n"}},"required":["type","text"]},"Wait":{"type":"object","title":"Wait","description":"A wait action.\n","properties":{"type":{"type":"string","enum":["wait"],"default":"wait","description":"Specifies the event type. For a wait action, this property is \nalways set to `wait`.\n"}},"required":["type"]},"ComputerCallSafetyCheckParam":{"properties":{"id":{"type":"string","description":"The ID of the pending safety check."},"code":{"type":"string","description":"The type of the pending safety check.","nullable":true},"message":{"type":"string","description":"Details about the pending safety check.","nullable":true}},"type":"object","required":["id"],"description":"A pending safety check for the computer call."},"ComputerCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The ID of the computer tool call output.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The ID of the computer tool call that produced the output."},"type":{"type":"string","enum":["computer_call_output"],"description":"The type of the computer tool call output. Always `computer_call_output`.","default":"computer_call_output"},"output":{"$ref":"#/components/schemas/ComputerScreenshotImage"},"acknowledged_safety_checks":{"items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"type":"array","description":"The safety checks reported by the API that have been acknowledged by the developer.","nullable":true},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Computer tool call output","description":"The output of a computer tool call."},"ComputerScreenshotImage":{"type":"object","description":"A computer screenshot image used with the computer use tool.\n","properties":{"type":{"type":"string","enum":["computer_screenshot"],"default":"computer_screenshot","description":"Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n"},"image_url":{"type":"string","description":"The URL of the screenshot image."},"file_id":{"type":"string","description":"The identifier of an uploaded file that contains the screenshot."}},"required":["type"]},"FunctionCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"WebSearchToolCall":{"type":"object","title":"Web search tool call","description":"The results of a web search tool call. See the web search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the web search tool call.\n"},"type":{"type":"string","enum":["web_search_call"],"default":"web_search_call","description":"The type of the web search tool call. Always `web_search_call`.\n"},"status":{"type":"string","description":"The status of the web search tool call.\n","enum":["in_progress","searching","completed","failed"]},"action":{"type":"object","description":"An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find).\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/WebSearchActionSearch"},{"$ref":"#/components/schemas/WebSearchActionOpenPage"},{"$ref":"#/components/schemas/WebSearchActionFind"}]}},"required":["id","type","status","action"]},"WebSearchActionSearch":{"type":"object","title":"Search action","description":"Action type \"search\" - Performs a web search query.\n","properties":{"type":{"type":"string","enum":["search"],"description":"The action type.\n"},"query":{"type":"string","description":"The search query.\n"},"sources":{"type":"array","title":"Web search sources","description":"The sources used in the search.\n","items":{"type":"object","title":"Web search source","description":"A source used in the search.\n","properties":{"type":{"type":"string","enum":["url"],"description":"The type of source. Always `url`.\n"},"url":{"type":"string","description":"The URL of the source.\n"}},"required":["type","url"]}}},"required":["type","query"]},"WebSearchActionOpenPage":{"type":"object","title":"Open page action","description":"Action type \"open_page\" - Opens a specific URL from search results.\n","properties":{"type":{"type":"string","enum":["open_page"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL opened by the model.\n"}},"required":["type","url"]},"WebSearchActionFind":{"type":"object","title":"Find action","description":"Action type \"find\": Searches for a pattern within a loaded page.\n","properties":{"type":{"type":"string","enum":["find"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL of the page searched for the pattern.\n"},"pattern":{"type":"string","description":"The pattern or text to search for within the page.\n"}},"required":["type","url","pattern"]},"FunctionToolCall":{"type":"object","title":"Function tool call","description":"A tool call to run a function. Used when the model requests your code to execute a function.\n","properties":{"id":{"type":"string","description":"The unique ID of the function tool call.\n"},"type":{"type":"string","enum":["function_call"],"default":"function_call","description":"The type of the function tool call. Always `function_call`.\n"},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model.\n"},"name":{"type":"string","description":"The name of the function to run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","name","arguments"]},"FunctionCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function tool call generated by the model."},"type":{"type":"string","enum":["function_call_output"],"description":"The type of the function tool call output. Always `function_call_output`.","default":"function_call_output"},"output":{"description":"Text, image, or file output of the function tool call.","anyOf":[{"type":"string","maxLength":10485760,"description":"A JSON string of the output of the function tool call."},{"items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContentParam"},{"$ref":"#/components/schemas/InputImageContentParamAutoParam"},{"$ref":"#/components/schemas/InputFileContentParam"}]},"type":"array"}]},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function tool call output","description":"The output of a function tool call."},"InputTextContentParam":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","maxLength":10485760,"description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContentParamAutoParam":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","maxLength":20971520,"nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/DetailEnum","nullable":true,"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type"],"title":"Input image","description":"An image input to the model."},"DetailEnum":{"type":"string","enum":["low","high","auto"]},"InputFileContentParam":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","nullable":true,"description":"The name of the file to be sent to the model."},"file_data":{"type":"string","maxLength":33554432,"nullable":true,"description":"The base64-encoded data of the file to be sent to the model."},"file_url":{"type":"string","nullable":true,"description":"The URL of the file to be sent to the model."}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"ReasoningItem":{"type":"object","description":"A description of the chain of thought used by a reasoning model while generating a response.\nInclude these items in your input for subsequent turns if you are manually managing context.\n","title":"Reasoning","properties":{"type":{"type":"string","description":"The type of the object. Always `reasoning`.\n","enum":["reasoning"],"default":"reasoning"},"id":{"type":"string","description":"The unique identifier of the reasoning content.\n"},"encrypted_content":{"type":"string","description":"The encrypted content of the reasoning item - populated when a response is\ngenerated with `reasoning.encrypted_content` in the `include` parameter.\n","nullable":true},"summary":{"type":"array","description":"Reasoning summary content.\n","items":{"$ref":"#/components/schemas/Summary"}},"content":{"type":"array","description":"Reasoning text content.\n","items":{"$ref":"#/components/schemas/ReasoningTextContent"}},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","summary","type"]},"Summary":{"properties":{"type":{"type":"string","enum":["summary_text"],"description":"The type of the object. Always `summary_text`.","default":"summary_text"},"text":{"type":"string","description":"A summary of the reasoning output from the model so far."}},"type":"object","required":["type","text"],"title":"Summary text","description":"A summary text from the model."},"ReasoningTextContent":{"properties":{"type":{"type":"string","enum":["reasoning_text"],"description":"The type of the reasoning text. Always `reasoning_text`.","default":"reasoning_text"},"text":{"type":"string","description":"The reasoning text from the model."}},"type":"object","required":["type","text"],"title":"ReasoningTextContent","description":"Reasoning text from the model."},"CompactionSummaryItemParam":{"properties":{"id":{"type":"string","description":"The ID of the compaction item.","nullable":true},"type":{"type":"string","enum":["compaction"],"description":"The type of the item. Always `compaction`.","default":"compaction"},"encrypted_content":{"type":"string","maxLength":10485760}},"type":"object","required":["type","encrypted_content"],"title":"Compaction item","description":"A compaction item generated by the `v1/responses/compact` API."},"ImageGenToolCall":{"type":"object","title":"Image generation call","description":"An image generation request made by the model.\n","properties":{"type":{"type":"string","enum":["image_generation_call"],"default":"image_generation_call","description":"The type of the image generation call. Always `image_generation_call`.\n"},"id":{"type":"string","description":"The unique ID of the image generation call.\n"},"status":{"type":"string","enum":["in_progress","completed","generating","failed"],"description":"The status of the image generation call.\n"},"result":{"type":"string","description":"The generated image encoded in base64.\n","nullable":true}},"required":["type","id","status","result"]},"CodeInterpreterToolCall":{"type":"object","title":"Code interpreter tool call","description":"A tool call to run code.\n","properties":{"type":{"type":"string","enum":["code_interpreter_call"],"default":"code_interpreter_call","description":"The type of the code interpreter tool call. Always `code_interpreter_call`.\n"},"id":{"type":"string","description":"The unique ID of the code interpreter tool call.\n"},"status":{"type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"description":"The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"},"container_id":{"type":"string","description":"The ID of the container used to run the code.\n"},"code":{"type":"string","description":"The code to run, or null if not available.\n","nullable":true},"outputs":{"type":"array","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CodeInterpreterOutputLogs"},{"$ref":"#/components/schemas/CodeInterpreterOutputImage"}]},"discriminator":{"propertyName":"type"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n","nullable":true}},"required":["type","id","status","container_id","code","outputs"]},"CodeInterpreterOutputLogs":{"properties":{"type":{"type":"string","enum":["logs"],"description":"The type of the output. Always `logs`.","default":"logs"},"logs":{"type":"string","description":"The logs output from the code interpreter."}},"type":"object","required":["type","logs"],"title":"Code interpreter output logs","description":"The logs output from the code interpreter."},"CodeInterpreterOutputImage":{"properties":{"type":{"type":"string","enum":["image"],"description":"The type of the output. Always `image`.","default":"image"},"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"type":"object","required":["type","url"],"title":"Code interpreter output image","description":"The image output from the code interpreter."},"LocalShellToolCall":{"type":"object","title":"Local shell call","description":"A tool call to run a command on the local shell.\n","properties":{"type":{"type":"string","enum":["local_shell_call"],"default":"local_shell_call","description":"The type of the local shell call. Always `local_shell_call`.\n"},"id":{"type":"string","description":"The unique ID of the local shell call.\n"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"action":{"$ref":"#/components/schemas/LocalShellExecAction"},"status":{"type":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the local shell call.\n"}},"required":["type","id","call_id","action","status"]},"LocalShellExecAction":{"properties":{"type":{"type":"string","enum":["exec"],"description":"The type of the local shell action. Always `exec`.","default":"exec"},"command":{"items":{"type":"string"},"type":"array","description":"The command to run."},"timeout_ms":{"type":"integer","nullable":true,"description":"Optional timeout in milliseconds for the command."},"working_directory":{"type":"string","nullable":true,"description":"Optional working directory to run the command in."},"env":{"additionalProperties":{"type":"string"},"type":"object","description":"Environment variables to set for the command."},"user":{"type":"string","nullable":true,"description":"Optional user to run the command as."}},"type":"object","required":["type","command","env"],"title":"Local shell exec action","description":"Execute a shell command on the server."},"LocalShellToolCallOutput":{"type":"object","title":"Local shell call output","description":"The output of a local shell tool call.\n","properties":{"type":{"type":"string","enum":["local_shell_call_output"],"default":"local_shell_call_output","description":"The type of the local shell tool call output. Always `local_shell_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"output":{"type":"string","description":"A JSON string of the output of the local shell tool call.\n"},"status":{"ype":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n","nullable":true}},"required":["id","type","call_id","output"]},"FunctionShellCallItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `function_shell_call`.","default":"shell_call"},"action":{"$ref":"#/components/schemas/FunctionShellActionParam","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/FunctionShellCallItemStatus","nullable":true}},"type":"object","required":["call_id","type","action"],"title":"Function shell tool call","description":"A tool representing a request to execute one or more shell commands."},"FunctionShellActionParam":{"properties":{"commands":{"items":{"type":"string"},"type":"array","description":"Ordered shell commands for the execution environment to run."},"timeout_ms":{"type":"integer","description":"Maximum wall-clock time in milliseconds to allow the shell commands to run.","nullable":true},"max_output_length":{"type":"integer","description":"Maximum number of UTF-8 characters to capture from combined stdout and stderr output.","nullable":true}},"type":"object","required":["commands"],"title":"Function shell action","description":"Commands and limits describing how to run the function shell tool call."},"FunctionShellCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"],"title":"Function shell call status","description":"Status values reported for function shell tool calls."},"FunctionShellCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the item. Always `function_shell_call_output`.","default":"shell_call_output"},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContentParam"},"type":"array","description":"Captured chunks of stdout and stderr output, along with their associated outcomes."},"max_output_length":{"type":"integer","description":"The maximum number of UTF-8 characters captured for this shell call's combined output.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function shell tool call output","description":"The streamed output items emitted by a function shell tool call."},"FunctionShellCallOutputContentParam":{"properties":{"stdout":{"type":"string","maxLength":10485760,"description":"Captured stdout output for this chunk of the shell call."},"stderr":{"type":"string","maxLength":10485760,"description":"Captured stderr output for this chunk of the shell call."},"outcome":{"$ref":"#/components/schemas/FunctionShellCallOutputOutcomeParam","description":"The exit or timeout outcome associated with this chunk."}},"type":"object","required":["stdout","stderr","outcome"],"title":"Function shell output chunk","description":"Captured stdout and stderr for a portion of a function shell tool call output."},"FunctionShellCallOutputOutcomeParam":{"title":"Function shell call outcome","description":"The exit or timeout outcome associated with this chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcomeParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcomeParam"}]},"FunctionShellCallOutputTimeoutOutcomeParam":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcomeParam":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"The exit code returned by the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCallItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatusParam","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"$ref":"#/components/schemas/ApplyPatchOperationParam","description":"The specific create, delete, or update instruction for the apply_patch tool call."}},"type":"object","required":["type","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call representing a request to create, delete, or update files using diff patches."},"ApplyPatchCallStatusParam":{"type":"string","enum":["in_progress","completed"],"title":"Apply patch call status","description":"Status values reported for apply_patch tool calls."},"ApplyPatchOperationParam":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperationParam"}]},"ApplyPatchCreateFileOperationParam":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"The operation type. Always `create_file`.","default":"create_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to create relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply when creating the file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction for creating a new file via the apply_patch tool."},"ApplyPatchDeleteFileOperationParam":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"The operation type. Always `delete_file`.","default":"delete_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to delete relative to the workspace root."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction for deleting an existing file via the apply_patch tool."},"ApplyPatchUpdateFileOperationParam":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"The operation type. Always `update_file`.","default":"update_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to update relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply to the existing file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction for updating an existing file via the apply_patch tool."},"ApplyPatchToolCallOutputItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatusParam","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","maxLength":10485760,"description":"Optional human-readable log text from the apply patch tool (e.g., patch results or errors).","nullable":true}},"type":"object","required":["type","call_id","status"],"title":"Apply patch tool call output","description":"The streamed output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatusParam":{"type":"string","enum":["completed","failed"],"title":"Apply patch call output status","description":"Outcome values reported for apply_patch tool call outputs."},"MCPListTools":{"type":"object","title":"MCP list tools","description":"A list of tools available on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_list_tools"],"default":"mcp_list_tools","description":"The type of the item. Always `mcp_list_tools`.\n"},"id":{"type":"string","description":"The unique ID of the list.\n"},"server_label":{"type":"string","description":"The label of the MCP server.\n"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/MCPListToolsTool"},"description":"The tools available on the server.\n"},"error":{"type":"string","description":"Error message if the server could not list tools.\n","nullable":true}},"required":["type","id","server_label","tools"]},"MCPListToolsTool":{"type":"object","title":"MCP list tools tool","description":"A tool available on an MCP server.\n","properties":{"name":{"type":"string","description":"The name of the tool.\n"},"description":{"type":"string","description":"The description of the tool.\n","nullable":true},"input_schema":{"type":"object","description":"The JSON schema describing the tool's input.\n"},"annotations":{"type":"object","description":"Additional annotations about the tool.\n","nullable":true}},"required":["name","input_schema"]},"MCPApprovalRequest":{"type":"object","title":"MCP approval request","description":"A request for human approval of a tool invocation.\n","properties":{"type":{"type":"string","enum":["mcp_approval_request"],"default":"mcp_approval_request","description":"The type of the item. Always `mcp_approval_request`.\n"},"id":{"type":"string","description":"The unique ID of the approval request.\n"},"server_label":{"type":"string","description":"The label of the MCP server making the request.\n"},"name":{"type":"string","description":"The name of the tool to run.\n"},"arguments":{"type":"string","description":"A JSON string of arguments for the tool.\n"}},"required":["type","id","server_label","name","arguments"]},"MCPApprovalResponse":{"type":"object","title":"MCP approval response","description":"A response to an MCP approval request.\n","properties":{"type":{"type":"string","enum":["mcp_approval_response"],"default":"mcp_approval_response","description":"The type of the item. Always `mcp_approval_response`.\n"},"id":{"type":"string","description":"The unique ID of the approval response\n","nullable":true},"approval_request_id":{"type":"string","description":"The ID of the approval request being answered.\n"},"approve":{"type":"boolean","description":"Whether the request was approved.\n"},"reason":{"type":"string","description":"Optional reason for the decision.\n","nullable":true}},"required":["type","request_id","approve","approval_request_id"]},"MCPToolCall":{"type":"object","title":"MCP tool call","description":"An invocation of a tool on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_call"],"default":"mcp_call","description":"The type of the item. Always `mcp_call`.\n"},"id":{"type":"string","description":"The unique ID of the tool call.\n"},"server_label":{"type":"string","description":"The label of the MCP server running the tool.\n"},"name":{"type":"string","description":"The name of the tool that was run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool.\n"},"output":{"type":"string","description":"The output from the tool call.\n","nullable":true},"error":{"type":"string","description":"The error from the tool call, if any.\n","nullable":true},"status":{"$ref":"#/components/schemas/MCPToolCallStatus","description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"},"approval_request_id":{"type":"string","description":"Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n","nullable":true}},"required":["type","id","server_label","name","arguments"]},"MCPToolCallStatus":{"type":"string","enum":["in_progress","completed","incomplete","calling","failed"]},"CustomToolCallOutput":{"type":"object","title":"Custom tool call output","description":"The output of a custom tool call from your code, being sent back to the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call_output"],"default":"custom_tool_call_output","description":"The type of the custom tool call output. Always `custom_tool_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call output in the platform.\n"},"call_id":{"type":"string","description":"The call ID, used to map this custom tool call output to a custom tool call.\n"},"output":{"description":"The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n","anyOf":[{"type":"string","description":"A string of the output of the custom tool call.\n","title":"string output"},{"type":"array","items":{"$ref":"#/components/schemas/FunctionAndCustomToolCallOutput"},"title":"output content list","description":"Text, image, or file output of the custom tool call.\n"}]}},"required":["type","call_id","output"]},"FunctionAndCustomToolCallOutput":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"CustomToolCall":{"type":"object","title":"Custom tool call","description":"A call to a custom tool created by the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call"],"default":"custom_tool_call","description":"The type of the custom tool call. Always `custom_tool_call`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call in the platform.\n"},"call_id":{"type":"string","description":"An identifier used to map this custom tool call to a tool call output.\n"},"name":{"type":"string","description":"The name of the custom tool being called.\n"},"input":{"type":"string","description":"The input for the custom tool call generated by the model.\n"}},"required":["type","call_id","name","input"]},"ItemReferenceParam":{"properties":{"type":{"type":"string","nullable":true,"enum":["item_reference"],"description":"The type of item to reference. Always `item_reference`.","default":"item_reference"},"id":{"type":"string","description":"The ID of the item to reference."}},"type":"object","required":["id"],"title":"Item reference","description":"An internal identifier for an item to reference."},"IncludeEnum":{"type":"string","enum":["file_search_call.results","web_search_call.results","web_search_call.action.sources","message.input_image.image_url","computer_call_output.output.image_url","code_interpreter_call.outputs","reasoning.encrypted_content","message.output_text.logprobs"],"description":"Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program)."},"ResponseStreamOptions":{"description":"Options for streaming responses. Only set this when you set `stream: true`.\n","type":"object","properties":{"include_obfuscation":{"type":"boolean","description":"When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events to\nnormalize payload sizes as a mitigation to certain side-channel attacks.\nThese obfuscation fields are included by default, but add a small amount\nof overhead to the data stream. You can set `include_obfuscation` to\nfalse to optimize for bandwidth if you trust the network links between\nyour application and the API.\n"}},"nullable":true},"ConversationParam":{"description":"The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.\nInput items and output items from this response are automatically added to this conversation after this response completes.\n","anyOf":[{"type":"string","title":"Conversation ID","description":"The unique ID of the conversation.\n"},{"$ref":"#/components/schemas/ConversationParam-2"}]},"ConversationParam-2":{"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"type":"object","required":["id"],"title":"Conversation object","description":"The conversation that this response belongs to."},"Response":{"title":"The response object","allOf":[{"$ref":"#/components/schemas/ModelResponseProperties"},{"$ref":"#/components/schemas/ResponseProperties"},{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this Response.\n"},"object":{"type":"string","description":"The object type of this resource - always set to `response`.\n","enum":["response"]},"status":{"type":"string","description":"The status of the response generation. One of `completed`, `failed`,\n`in_progress`, `cancelled`, `queued`, or `incomplete`.\n","enum":["completed","failed","in_progress","cancelled","queued","incomplete"]},"created_at":{"type":"number","description":"Unix timestamp (in seconds) of when this Response was created.\n"},"error":{"$ref":"#/components/schemas/ResponseError"},"incomplete_details":{"type":"object","description":"Details about why the response is incomplete.\n","properties":{"reason":{"type":"string","description":"The reason why the response is incomplete.","enum":["max_output_tokens","content_filter"]}},"nullable":true},"output":{"type":"array","description":"An array of content items generated by the model.\n\n- The length and order of items in the `output` array is dependent\n  on the model's response.\n- Rather than accessing the first item in the `output` array and\n  assuming it's an `assistant` message with the content generated by\n  the model, you might consider using the `output_text` property where\n  supported in SDKs.\n","items":{"$ref":"#/components/schemas/OutputItem"}},"instructions":{"description":"A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n","anyOf":[{"type":"string","description":"A text input to the model, equivalent to a text input with the\n`developer` role.\n"},{"type":"array","title":"Input item list","description":"A list of one or many input items to the model, containing\ndifferent content types.\n","items":{"$ref":"#/components/schemas/InputItem"}}],"nullable":true},"output_text":{"type":"string","description":"SDK-only convenience property that contains the aggregated text output\nfrom all `output_text` items in the `output` array, if any are present.\nSupported in the Python and JavaScript SDKs.\n","nullable":true},"usage":{"$ref":"#/components/schemas/ResponseUsage"},"parallel_tool_calls":{"type":"boolean","description":"Whether to allow the model to run tool calls in parallel.\n","default":true},"conversation":{"$ref":"#/components/schemas/Conversation-2","nullable":true},"provider":{"type":"string","description":"The upstream provider that served the request (e.g. `openai`). Nexos extension.\n"},"completed_at":{"type":"number","nullable":true,"description":"Unix timestamp (in seconds) of when the response generation completed.\nPassed through from the upstream provider.\n"},"store":{"type":"boolean","description":"Whether the response is stored for later retrieval. Echoed from the request\nby the upstream provider.\n"},"frequency_penalty":{"type":"number","nullable":true,"description":"Echoed by some upstream providers alongside the response.\n"},"presence_penalty":{"type":"number","nullable":true,"description":"Echoed by some upstream providers alongside the response.\n"},"moderation":{"type":"object","nullable":true,"description":"Moderation details passed through from the upstream provider, when available.\n"},"content_filters":{"type":"array","nullable":true,"description":"Content-filter annotations passed through from the upstream provider\n(returned by Azure-hosted models).\n","items":{"type":"object","properties":{"blocked":{"type":"boolean"},"source_type":{"type":"string"},"content_filter_raw":{"type":"array","items":{"type":"object"}},"content_filter_results":{"type":"object"},"content_filter_offsets":{"type":"object","properties":{"check_offset":{"type":"integer"},"start_offset":{"type":"integer"},"end_offset":{"type":"integer"}}}}}},"tool_usage":{"type":"object","nullable":true,"description":"Aggregated built-in tool usage for this response. Nexos extension.\n","properties":{"image_gen":{"type":"object","properties":{"input_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"output_tokens":{"type":"integer"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"total_tokens":{"type":"integer"}}},"web_search":{"type":"object","properties":{"num_requests":{"type":"integer"}}}}}},"required":["id","object","created_at","error","incomplete_details","instructions","model","tools","output","parallel_tool_calls","metadata","tool_choice","temperature","top_p"]}]},"ResponseError":{"type":"object","description":"An error object returned when the model fails to generate a Response.\n","properties":{"code":{"$ref":"#/components/schemas/ResponseErrorCode"},"message":{"type":"string","description":"A human-readable description of the error.\n"}},"required":["code","message"],"nullable":true},"ResponseErrorCode":{"type":"string","description":"The error code for the response.\n","enum":["server_error","rate_limit_exceeded","invalid_prompt","vector_store_timeout","invalid_image","invalid_image_format","invalid_base64_image","invalid_image_url","image_too_large","image_too_small","image_parse_error","image_content_policy_violation","invalid_image_mode","image_file_too_large","unsupported_image_media_type","empty_image_file","failed_to_download_image","image_file_not_found"]},"OutputItem":{"anyOf":[{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/FunctionShellCall"},{"$ref":"#/components/schemas/FunctionShellCallOutput"},{"$ref":"#/components/schemas/ApplyPatchToolCall"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutput"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/CustomToolCall"}],"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"]},"FunctionShellCall":{"properties":{"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `shell_call`.","default":"shell_call"},"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the function shell tool call generated by the model."},"action":{"$ref":"#/components/schemas/FunctionShellAction","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/LocalShellCallStatus","description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","action","status"],"title":"Function shell tool call","description":"A tool call that executes one or more shell commands in a managed environment."},"FunctionShellAction":{"properties":{"commands":{"items":{"type":"string","description":"A list of commands to run."},"type":"array"},"timeout_ms":{"type":"integer","description":"Optional timeout in milliseconds for the commands.","nullable":true},"max_output_length":{"type":"integer","description":"Optional maximum number of characters to return from each command.","nullable":true}},"type":"object","required":["commands","timeout_ms","max_output_length"],"title":"Shell exec action","description":"Execute a shell command."},"LocalShellCallStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionShellCallOutput":{"properties":{"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the shell call output. Always `shell_call_output`.","default":"shell_call_output"},"id":{"type":"string","description":"The unique ID of the shell call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContent"},"type":"array","description":"An array of shell call output contents"},"max_output_length":{"type":"integer","description":"The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.","nullable":true},"created_by":{"type":"string"}},"type":"object","required":["type","id","call_id","output","max_output_length"],"title":"Shell call output","description":"The output of a shell tool call."},"FunctionShellCallOutputContent":{"properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"outcome":{"title":"Function shell call outcome","description":"Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcome"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcome"}]},"created_by":{"type":"string"}},"type":"object","required":["stdout","stderr","outcome"],"title":"Shell call output content","description":"The content of a shell call output."},"FunctionShellCallOutputTimeoutOutcome":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcome":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"Exit code from the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCall":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatus","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations applied via apply_patch.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperation"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperation"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperation"}]},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call that applies file diffs by creating, deleting, or updating files."},"ApplyPatchCallStatus":{"type":"string","enum":["in_progress","completed"]},"ApplyPatchCreateFileOperation":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"Create a new file with the provided diff.","default":"create_file"},"path":{"type":"string","description":"Path of the file to create."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction describing how to create a file via the apply_patch tool."},"ApplyPatchDeleteFileOperation":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"Delete the specified file.","default":"delete_file"},"path":{"type":"string","description":"Path of the file to delete."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction describing how to delete a file via the apply_patch tool."},"ApplyPatchUpdateFileOperation":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"Update an existing file with the provided diff.","default":"update_file"},"path":{"type":"string","description":"Path of the file to update."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction describing how to update a file via the apply_patch tool."},"ApplyPatchToolCallOutput":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatus","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","description":"Optional textual output returned by the apply patch tool.","nullable":true},"created_by":{"type":"string","description":"The ID of the entity that created this tool call output."}},"type":"object","required":["type","id","call_id","status"],"title":"Apply patch tool call output","description":"The output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatus":{"type":"string","enum":["completed","failed"]},"ResponseUsage":{"type":"object","description":"Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.\n","properties":{"input_tokens":{"type":"integer","description":"The number of input tokens."},"input_tokens_details":{"type":"object","description":"A detailed breakdown of the input tokens.","properties":{"cached_tokens":{"type":"integer","description":"The number of tokens retrieved from cache. See prompt caching for details.\n"},"cache_write_tokens":{"type":"integer","description":"The number of tokens written to cache. Nexos extension.\n"}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","description":"The number of output tokens."},"output_tokens_details":{"type":"object","description":"A detailed breakdown of the output tokens.","properties":{"reasoning_tokens":{"type":"integer","description":"The number of reasoning tokens."}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","description":"The total number of tokens used."},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]},"Conversation-2":{"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"type":"object","required":["id"],"title":"Conversation","description":"The conversation that this response belongs to. Input items and output items from this response are automatically added to this conversation."},"ResponseStreamEvent":{"anyOf":[{"$ref":"#/components/schemas/ResponseAudioDeltaEvent"},{"$ref":"#/components/schemas/ResponseAudioDoneEvent"},{"$ref":"#/components/schemas/ResponseAudioTranscriptDeltaEvent"},{"$ref":"#/components/schemas/ResponseAudioTranscriptDoneEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallCodeDeltaEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallCodeDoneEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallInterpretingEvent"},{"$ref":"#/components/schemas/ResponseCompletedEvent"},{"$ref":"#/components/schemas/ResponseContentPartAddedEvent"},{"$ref":"#/components/schemas/ResponseContentPartDoneEvent"},{"$ref":"#/components/schemas/ResponseCreatedEvent"},{"$ref":"#/components/schemas/ResponseErrorEvent"},{"$ref":"#/components/schemas/ResponseFileSearchCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseFileSearchCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseFileSearchCallSearchingEvent"},{"$ref":"#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent"},{"$ref":"#/components/schemas/ResponseFunctionCallArgumentsDoneEvent"},{"$ref":"#/components/schemas/ResponseInProgressEvent"},{"$ref":"#/components/schemas/ResponseFailedEvent"},{"$ref":"#/components/schemas/ResponseIncompleteEvent"},{"$ref":"#/components/schemas/ResponseOutputItemAddedEvent"},{"$ref":"#/components/schemas/ResponseOutputItemDoneEvent"},{"$ref":"#/components/schemas/ResponseReasoningSummaryPartAddedEvent"},{"$ref":"#/components/schemas/ResponseReasoningSummaryPartDoneEvent"},{"$ref":"#/components/schemas/ResponseReasoningSummaryTextDeltaEvent"},{"$ref":"#/components/schemas/ResponseReasoningSummaryTextDoneEvent"},{"$ref":"#/components/schemas/ResponseReasoningTextDeltaEvent"},{"$ref":"#/components/schemas/ResponseReasoningTextDoneEvent"},{"$ref":"#/components/schemas/ResponseRefusalDeltaEvent"},{"$ref":"#/components/schemas/ResponseRefusalDoneEvent"},{"$ref":"#/components/schemas/ResponseTextDeltaEvent"},{"$ref":"#/components/schemas/ResponseTextDoneEvent"},{"$ref":"#/components/schemas/ResponseWebSearchCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseWebSearchCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseWebSearchCallSearchingEvent"},{"$ref":"#/components/schemas/ResponseImageGenCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseImageGenCallGeneratingEvent"},{"$ref":"#/components/schemas/ResponseImageGenCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseImageGenCallPartialImageEvent"},{"$ref":"#/components/schemas/ResponseMCPCallArgumentsDeltaEvent"},{"$ref":"#/components/schemas/ResponseMCPCallArgumentsDoneEvent"},{"$ref":"#/components/schemas/ResponseMCPCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseMCPCallFailedEvent"},{"$ref":"#/components/schemas/ResponseMCPCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseMCPListToolsCompletedEvent"},{"$ref":"#/components/schemas/ResponseMCPListToolsFailedEvent"},{"$ref":"#/components/schemas/ResponseMCPListToolsInProgressEvent"},{"$ref":"#/components/schemas/ResponseOutputTextAnnotationAddedEvent"},{"$ref":"#/components/schemas/ResponseQueuedEvent"},{"$ref":"#/components/schemas/ResponseCustomToolCallInputDeltaEvent"},{"$ref":"#/components/schemas/ResponseCustomToolCallInputDoneEvent"}],"discriminator":{"propertyName":"type"}},"ResponseAudioDeltaEvent":{"type":"object","description":"Emitted when there is a partial audio response.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.audio.delta`.\n","enum":["response.audio.delta"]},"sequence_number":{"type":"integer","description":"A sequence number for this chunk of the stream response.\n"},"delta":{"type":"string","description":"A chunk of Base64 encoded response audio bytes.\n"}},"required":["type","delta","sequence_number"]},"ResponseAudioDoneEvent":{"type":"object","description":"Emitted when the audio response is complete.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.audio.done`.\n","enum":["response.audio.done"]},"sequence_number":{"type":"integer","description":"The sequence number of the delta.\n"}},"required":["type","sequence_number","response_id"]},"ResponseAudioTranscriptDeltaEvent":{"type":"object","description":"Emitted when there is a partial transcript of audio.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.audio.transcript.delta`.\n","enum":["response.audio.transcript.delta"]},"delta":{"type":"string","description":"The partial transcript of the audio response.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","response_id","delta","sequence_number"]},"ResponseAudioTranscriptDoneEvent":{"type":"object","description":"Emitted when the full audio transcript is completed.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.audio.transcript.done`.\n","enum":["response.audio.transcript.done"]},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","response_id","sequence_number"]},"ResponseCodeInterpreterCallCodeDeltaEvent":{"type":"object","description":"Emitted when a partial code snippet is streamed by the code interpreter.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.code_interpreter_call_code.delta`.","enum":["response.code_interpreter_call_code.delta"]},"output_index":{"type":"integer","description":"The index of the output item in the response for which the code is being streamed."},"item_id":{"type":"string","description":"The unique identifier of the code interpreter tool call item."},"delta":{"type":"string","description":"The partial code snippet being streamed by the code interpreter."},"sequence_number":{"type":"integer","description":"The sequence number of this event, used to order streaming events."}},"required":["type","output_index","item_id","delta","sequence_number"]},"ResponseCodeInterpreterCallCodeDoneEvent":{"type":"object","description":"Emitted when the code snippet is finalized by the code interpreter.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.code_interpreter_call_code.done`.","enum":["response.code_interpreter_call_code.done"]},"output_index":{"type":"integer","description":"The index of the output item in the response for which the code is finalized."},"item_id":{"type":"string","description":"The unique identifier of the code interpreter tool call item."},"code":{"type":"string","description":"The final code snippet output by the code interpreter."},"sequence_number":{"type":"integer","description":"The sequence number of this event, used to order streaming events."}},"required":["type","output_index","item_id","code","sequence_number"]},"ResponseCodeInterpreterCallCompletedEvent":{"type":"object","description":"Emitted when the code interpreter call is completed.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.code_interpreter_call.completed`.","enum":["response.code_interpreter_call.completed"]},"output_index":{"type":"integer","description":"The index of the output item in the response for which the code interpreter call is completed."},"item_id":{"type":"string","description":"The unique identifier of the code interpreter tool call item."},"sequence_number":{"type":"integer","description":"The sequence number of this event, used to order streaming events."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseCodeInterpreterCallInProgressEvent":{"type":"object","description":"Emitted when a code interpreter call is in progress.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.code_interpreter_call.in_progress`.","enum":["response.code_interpreter_call.in_progress"]},"output_index":{"type":"integer","description":"The index of the output item in the response for which the code interpreter call is in progress."},"item_id":{"type":"string","description":"The unique identifier of the code interpreter tool call item."},"sequence_number":{"type":"integer","description":"The sequence number of this event, used to order streaming events."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseCodeInterpreterCallInterpretingEvent":{"type":"object","description":"Emitted when the code interpreter is actively interpreting the code snippet.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.code_interpreter_call.interpreting`.","enum":["response.code_interpreter_call.interpreting"]},"output_index":{"type":"integer","description":"The index of the output item in the response for which the code interpreter is interpreting code."},"item_id":{"type":"string","description":"The unique identifier of the code interpreter tool call item."},"sequence_number":{"type":"integer","description":"The sequence number of this event, used to order streaming events."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseCompletedEvent":{"type":"object","description":"Emitted when the model response is complete.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.completed`.\n","enum":["response.completed"]},"response":{"$ref":"#/components/schemas/Response","description":"Properties of the completed response.\n"},"sequence_number":{"type":"integer","description":"The sequence number for this event."}},"required":["type","response","sequence_number"]},"ResponseContentPartAddedEvent":{"type":"object","description":"Emitted when a new content part is added.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.content_part.added`.\n","enum":["response.content_part.added"]},"item_id":{"type":"string","description":"The ID of the output item that the content part was added to.\n"},"output_index":{"type":"integer","description":"The index of the output item that the content part was added to.\n"},"content_index":{"type":"integer","description":"The index of the content part that was added.\n"},"part":{"$ref":"#/components/schemas/OutputContent","description":"The content part that was added.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","item_id","output_index","content_index","part","sequence_number"]},"OutputContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"},{"$ref":"#/components/schemas/ReasoningTextContent"}]},"ResponseContentPartDoneEvent":{"type":"object","description":"Emitted when a content part is done.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.content_part.done`.\n","enum":["response.content_part.done"]},"item_id":{"type":"string","description":"The ID of the output item that the content part was added to.\n"},"output_index":{"type":"integer","description":"The index of the output item that the content part was added to.\n"},"content_index":{"type":"integer","description":"The index of the content part that is done.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"part":{"$ref":"#/components/schemas/OutputContent","description":"The content part that is done.\n"}},"required":["type","item_id","output_index","content_index","part","sequence_number"]},"ResponseCreatedEvent":{"type":"object","description":"An event that is emitted when a response is created.\n","properties":{"type":{"type":"string","description":"The type of the event. Always `response.created`.\n","enum":["response.created"]},"response":{"$ref":"#/components/schemas/Response","description":"The response that was created.\n"},"sequence_number":{"type":"integer","description":"The sequence number for this event."}},"required":["type","response","sequence_number"]},"ResponseErrorEvent":{"type":"object","description":"Emitted when an error occurs.","properties":{"type":{"type":"string","description":"The type of the event. Always `error`.\n","enum":["error"]},"code":{"type":"string","description":"The error code.\n","nullable":true},"message":{"type":"string","description":"The error message.\n"},"param":{"type":"string","description":"The error parameter.\n","nullable":true},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","code","message","param","sequence_number"]},"ResponseFileSearchCallCompletedEvent":{"type":"object","description":"Emitted when a file search call is completed (results found).","properties":{"type":{"type":"string","description":"The type of the event. Always `response.file_search_call.completed`.\n","enum":["response.file_search_call.completed"]},"output_index":{"type":"integer","description":"The index of the output item that the file search call is initiated.\n"},"item_id":{"type":"string","description":"The ID of the output item that the file search call is initiated.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseFileSearchCallInProgressEvent":{"type":"object","description":"Emitted when a file search call is initiated.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.file_search_call.in_progress`.\n","enum":["response.file_search_call.in_progress"]},"output_index":{"type":"integer","description":"The index of the output item that the file search call is initiated.\n"},"item_id":{"type":"string","description":"The ID of the output item that the file search call is initiated.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseFileSearchCallSearchingEvent":{"type":"object","description":"Emitted when a file search is currently searching.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.file_search_call.searching`.\n","enum":["response.file_search_call.searching"]},"output_index":{"type":"integer","description":"The index of the output item that the file search call is searching.\n"},"item_id":{"type":"string","description":"The ID of the output item that the file search call is initiated.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseFunctionCallArgumentsDeltaEvent":{"type":"object","description":"Emitted when there is a partial function-call arguments delta.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.function_call_arguments.delta`.\n","enum":["response.function_call_arguments.delta"]},"item_id":{"type":"string","description":"The ID of the output item that the function-call arguments delta is added to.\n"},"output_index":{"type":"integer","description":"The index of the output item that the function-call arguments delta is added to.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"delta":{"type":"string","description":"The function-call arguments delta that is added.\n"}},"required":["type","item_id","output_index","delta","sequence_number"]},"ResponseFunctionCallArgumentsDoneEvent":{"type":"object","description":"Emitted when function-call arguments are finalized.","properties":{"type":{"type":"string","enum":["response.function_call_arguments.done"]},"item_id":{"type":"string","description":"The ID of the item."},"name":{"type":"string","description":"The name of the function that was called."},"output_index":{"type":"integer","description":"The index of the output item."},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"arguments":{"type":"string","description":"The function-call arguments."}},"required":["type","item_id","name","output_index","arguments","sequence_number"]},"ResponseInProgressEvent":{"type":"object","description":"Emitted when the response is in progress.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.in_progress`.\n","enum":["response.in_progress"]},"response":{"$ref":"#/components/schemas/Response","description":"The response that is in progress.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","response","sequence_number"]},"ResponseFailedEvent":{"type":"object","description":"An event that is emitted when a response fails.\n","properties":{"type":{"type":"string","description":"The type of the event. Always `response.failed`.\n","enum":["response.failed"]},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"response":{"$ref":"#/components/schemas/Response","description":"The response that failed.\n"}},"required":["type","response","sequence_number"]},"ResponseIncompleteEvent":{"type":"object","description":"An event that is emitted when a response finishes as incomplete.\n","properties":{"type":{"type":"string","description":"The type of the event. Always `response.incomplete`.\n","enum":["response.incomplete"]},"response":{"$ref":"#/components/schemas/Response","description":"The response that was incomplete.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","response","sequence_number"]},"ResponseOutputItemAddedEvent":{"type":"object","description":"Emitted when a new output item is added.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.output_item.added`.\n","enum":["response.output_item.added"]},"output_index":{"type":"integer","description":"The index of the output item that was added.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"},"item":{"$ref":"#/components/schemas/OutputItem","description":"The output item that was added.\n"}},"required":["type","output_index","item","sequence_number"]},"ResponseOutputItemDoneEvent":{"type":"object","description":"Emitted when an output item is marked done.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.output_item.done`.\n","enum":["response.output_item.done"]},"output_index":{"type":"integer","description":"The index of the output item that was marked done.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"},"item":{"$ref":"#/components/schemas/OutputItem","description":"The output item that was marked done.\n"}},"required":["type","output_index","item","sequence_number"]},"ResponseReasoningSummaryPartAddedEvent":{"type":"object","description":"Emitted when a new reasoning summary part is added.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.reasoning_summary_part.added`.\n","enum":["response.reasoning_summary_part.added"]},"item_id":{"type":"string","description":"The ID of the item this summary part is associated with.\n"},"output_index":{"type":"integer","description":"The index of the output item this summary part is associated with.\n"},"summary_index":{"type":"integer","description":"The index of the summary part within the reasoning summary.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"},"part":{"type":"object","description":"The summary part that was added.\n","properties":{"type":{"type":"string","description":"The type of the summary part. Always `summary_text`.","enum":["summary_text"]},"text":{"type":"string","description":"The text of the summary part."}},"required":["type","text"]}},"required":["type","item_id","output_index","summary_index","part","sequence_number"]},"ResponseReasoningSummaryPartDoneEvent":{"type":"object","description":"Emitted when a reasoning summary part is completed.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.reasoning_summary_part.done`.\n","enum":["response.reasoning_summary_part.done"]},"item_id":{"type":"string","description":"The ID of the item this summary part is associated with.\n"},"output_index":{"type":"integer","description":"The index of the output item this summary part is associated with.\n"},"summary_index":{"type":"integer","description":"The index of the summary part within the reasoning summary.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"},"part":{"type":"object","description":"The completed summary part.\n","properties":{"type":{"type":"string","description":"The type of the summary part. Always `summary_text`.","enum":["summary_text"]},"text":{"type":"string","description":"The text of the summary part."}},"required":["type","text"]}},"required":["type","item_id","output_index","summary_index","part","sequence_number"]},"ResponseReasoningSummaryTextDeltaEvent":{"type":"object","description":"Emitted when a delta is added to a reasoning summary text.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.reasoning_summary_text.delta`.\n","enum":["response.reasoning_summary_text.delta"]},"item_id":{"type":"string","description":"The ID of the item this summary text delta is associated with.\n"},"output_index":{"type":"integer","description":"The index of the output item this summary text delta is associated with.\n"},"summary_index":{"type":"integer","description":"The index of the summary part within the reasoning summary.\n"},"delta":{"type":"string","description":"The text delta that was added to the summary.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"}},"required":["type","item_id","output_index","summary_index","delta","sequence_number"]},"ResponseReasoningSummaryTextDoneEvent":{"type":"object","description":"Emitted when a reasoning summary text is completed.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.reasoning_summary_text.done`.\n","enum":["response.reasoning_summary_text.done"]},"item_id":{"type":"string","description":"The ID of the item this summary text is associated with.\n"},"output_index":{"type":"integer","description":"The index of the output item this summary text is associated with.\n"},"summary_index":{"type":"integer","description":"The index of the summary part within the reasoning summary.\n"},"text":{"type":"string","description":"The full text of the completed reasoning summary.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"}},"required":["type","item_id","output_index","summary_index","text","sequence_number"]},"ResponseReasoningTextDeltaEvent":{"type":"object","description":"Emitted when a delta is added to a reasoning text.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.reasoning_text.delta`.\n","enum":["response.reasoning_text.delta"]},"item_id":{"type":"string","description":"The ID of the item this reasoning text delta is associated with.\n"},"output_index":{"type":"integer","description":"The index of the output item this reasoning text delta is associated with.\n"},"content_index":{"type":"integer","description":"The index of the reasoning content part this delta is associated with.\n"},"delta":{"type":"string","description":"The text delta that was added to the reasoning content.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"}},"required":["type","item_id","output_index","content_index","delta","sequence_number"]},"ResponseReasoningTextDoneEvent":{"type":"object","description":"Emitted when a reasoning text is completed.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.reasoning_text.done`.\n","enum":["response.reasoning_text.done"]},"item_id":{"type":"string","description":"The ID of the item this reasoning text is associated with.\n"},"output_index":{"type":"integer","description":"The index of the output item this reasoning text is associated with.\n"},"content_index":{"type":"integer","description":"The index of the reasoning content part.\n"},"text":{"type":"string","description":"The full text of the completed reasoning content.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"}},"required":["type","item_id","output_index","content_index","text","sequence_number"]},"ResponseRefusalDeltaEvent":{"type":"object","description":"Emitted when there is a partial refusal text.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.refusal.delta`.\n","enum":["response.refusal.delta"]},"item_id":{"type":"string","description":"The ID of the output item that the refusal text is added to.\n"},"output_index":{"type":"integer","description":"The index of the output item that the refusal text is added to.\n"},"content_index":{"type":"integer","description":"The index of the content part that the refusal text is added to.\n"},"delta":{"type":"string","description":"The refusal text that is added.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"}},"required":["type","item_id","output_index","content_index","delta","sequence_number"]},"ResponseRefusalDoneEvent":{"type":"object","description":"Emitted when refusal text is finalized.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.refusal.done`.\n","enum":["response.refusal.done"]},"item_id":{"type":"string","description":"The ID of the output item that the refusal text is finalized.\n"},"output_index":{"type":"integer","description":"The index of the output item that the refusal text is finalized.\n"},"content_index":{"type":"integer","description":"The index of the content part that the refusal text is finalized.\n"},"refusal":{"type":"string","description":"The refusal text that is finalized.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"}},"required":["type","item_id","output_index","content_index","refusal","sequence_number"]},"ResponseTextDeltaEvent":{"type":"object","description":"Emitted when there is an additional text delta.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.output_text.delta`.\n","enum":["response.output_text.delta"]},"item_id":{"type":"string","description":"The ID of the output item that the text delta was added to.\n"},"output_index":{"type":"integer","description":"The index of the output item that the text delta was added to.\n"},"content_index":{"type":"integer","description":"The index of the content part that the text delta was added to.\n"},"delta":{"type":"string","description":"The text delta that was added.\n"},"sequence_number":{"type":"integer","description":"The sequence number for this event."},"logprobs":{"type":"array","description":"The log probabilities of the tokens in the delta.\n","items":{"$ref":"#/components/schemas/ResponseLogProb"}}},"required":["type","item_id","output_index","content_index","delta","sequence_number","logprobs"]},"ResponseLogProb":{"type":"object","description":"A logprob is the logarithmic probability that the model assigns to producing \na particular token at a given position in the sequence. Less-negative (higher) \nlogprob values indicate greater model confidence in that token choice.\n","properties":{"token":{"description":"A possible text token.","type":"string"},"logprob":{"description":"The log probability of this token.\n","type":"number"},"top_logprobs":{"description":"The log probability of the top 20 most likely tokens.\n","type":"array","items":{"type":"object","properties":{"token":{"description":"A possible text token.","type":"string"},"logprob":{"description":"The log probability of this token.","type":"number"}}}}},"required":["token","logprob"]},"ResponseTextDoneEvent":{"type":"object","description":"Emitted when text content is finalized.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.output_text.done`.\n","enum":["response.output_text.done"]},"item_id":{"type":"string","description":"The ID of the output item that the text content is finalized.\n"},"output_index":{"type":"integer","description":"The index of the output item that the text content is finalized.\n"},"content_index":{"type":"integer","description":"The index of the content part that the text content is finalized.\n"},"text":{"type":"string","description":"The text content that is finalized.\n"},"sequence_number":{"type":"integer","description":"The sequence number for this event."},"logprobs":{"type":"array","description":"The log probabilities of the tokens in the delta.\n","items":{"$ref":"#/components/schemas/ResponseLogProb"}}},"required":["type","item_id","output_index","content_index","text","sequence_number","logprobs"]},"ResponseWebSearchCallCompletedEvent":{"type":"object","description":"Emitted when a web search call is completed.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.web_search_call.completed`.\n","enum":["response.web_search_call.completed"]},"output_index":{"type":"integer","description":"The index of the output item that the web search call is associated with.\n"},"item_id":{"type":"string","description":"Unique ID for the output item associated with the web search call.\n"},"sequence_number":{"type":"integer","description":"The sequence number of the web search call being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseWebSearchCallInProgressEvent":{"type":"object","description":"Emitted when a web search call is initiated.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.web_search_call.in_progress`.\n","enum":["response.web_search_call.in_progress"]},"output_index":{"type":"integer","description":"The index of the output item that the web search call is associated with.\n"},"item_id":{"type":"string","description":"Unique ID for the output item associated with the web search call.\n"},"sequence_number":{"type":"integer","description":"The sequence number of the web search call being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseWebSearchCallSearchingEvent":{"type":"object","description":"Emitted when a web search call is executing.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.web_search_call.searching`.\n","enum":["response.web_search_call.searching"]},"output_index":{"type":"integer","description":"The index of the output item that the web search call is associated with.\n"},"item_id":{"type":"string","description":"Unique ID for the output item associated with the web search call.\n"},"sequence_number":{"type":"integer","description":"The sequence number of the web search call being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseImageGenCallCompletedEvent":{"type":"object","title":"ResponseImageGenCallCompletedEvent","description":"Emitted when an image generation tool call has completed and the final image is available.\n","properties":{"type":{"type":"string","enum":["response.image_generation_call.completed"],"description":"The type of the event. Always 'response.image_generation_call.completed'."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"item_id":{"type":"string","description":"The unique identifier of the image generation item being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseImageGenCallGeneratingEvent":{"type":"object","title":"ResponseImageGenCallGeneratingEvent","description":"Emitted when an image generation tool call is actively generating an image (intermediate state).\n","properties":{"type":{"type":"string","enum":["response.image_generation_call.generating"],"description":"The type of the event. Always 'response.image_generation_call.generating'."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"item_id":{"type":"string","description":"The unique identifier of the image generation item being processed."},"sequence_number":{"type":"integer","description":"The sequence number of the image generation item being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseImageGenCallInProgressEvent":{"type":"object","title":"ResponseImageGenCallInProgressEvent","description":"Emitted when an image generation tool call is in progress.\n","properties":{"type":{"type":"string","enum":["response.image_generation_call.in_progress"],"description":"The type of the event. Always 'response.image_generation_call.in_progress'."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"item_id":{"type":"string","description":"The unique identifier of the image generation item being processed."},"sequence_number":{"type":"integer","description":"The sequence number of the image generation item being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseImageGenCallPartialImageEvent":{"type":"object","title":"ResponseImageGenCallPartialImageEvent","description":"Emitted when a partial image is available during image generation streaming.\n","properties":{"type":{"type":"string","enum":["response.image_generation_call.partial_image"],"description":"The type of the event. Always 'response.image_generation_call.partial_image'."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"item_id":{"type":"string","description":"The unique identifier of the image generation item being processed."},"sequence_number":{"type":"integer","description":"The sequence number of the image generation item being processed."},"partial_image_index":{"type":"integer","description":"0-based index for the partial image (backend is 1-based, but this is 0-based for the user)."},"partial_image_b64":{"type":"string","description":"Base64-encoded partial image data, suitable for rendering as an image."}},"required":["type","output_index","item_id","sequence_number","partial_image_index","partial_image_b64"]},"ResponseMCPCallArgumentsDeltaEvent":{"type":"object","title":"ResponseMCPCallArgumentsDeltaEvent","description":"Emitted when there is a delta (partial update) to the arguments of an MCP tool call.\n","properties":{"type":{"type":"string","enum":["response.mcp_call_arguments.delta"],"description":"The type of the event. Always 'response.mcp_call_arguments.delta'."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"item_id":{"type":"string","description":"The unique identifier of the MCP tool call item being processed."},"delta":{"type":"string","description":"A JSON string containing the partial update to the arguments for the MCP tool call.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","output_index","item_id","delta","sequence_number"]},"ResponseMCPCallArgumentsDoneEvent":{"type":"object","title":"ResponseMCPCallArgumentsDoneEvent","description":"Emitted when the arguments for an MCP tool call are finalized.\n","properties":{"type":{"type":"string","enum":["response.mcp_call_arguments.done"],"description":"The type of the event. Always 'response.mcp_call_arguments.done'."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"item_id":{"type":"string","description":"The unique identifier of the MCP tool call item being processed."},"arguments":{"type":"string","description":"A JSON string containing the finalized arguments for the MCP tool call.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","output_index","item_id","arguments","sequence_number"]},"ResponseMCPCallCompletedEvent":{"type":"object","title":"ResponseMCPCallCompletedEvent","description":"Emitted when an MCP  tool call has completed successfully.\n","properties":{"type":{"type":"string","enum":["response.mcp_call.completed"],"description":"The type of the event. Always 'response.mcp_call.completed'."},"item_id":{"type":"string","description":"The ID of the MCP tool call item that completed."},"output_index":{"type":"integer","description":"The index of the output item that completed."},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","item_id","output_index","sequence_number"]},"ResponseMCPCallFailedEvent":{"type":"object","title":"ResponseMCPCallFailedEvent","description":"Emitted when an MCP  tool call has failed.\n","properties":{"type":{"type":"string","enum":["response.mcp_call.failed"],"description":"The type of the event. Always 'response.mcp_call.failed'."},"item_id":{"type":"string","description":"The ID of the MCP tool call item that failed."},"output_index":{"type":"integer","description":"The index of the output item that failed."},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","item_id","output_index","sequence_number"]},"ResponseMCPCallInProgressEvent":{"type":"object","title":"ResponseMCPCallInProgressEvent","description":"Emitted when an MCP  tool call is in progress.\n","properties":{"type":{"type":"string","enum":["response.mcp_call.in_progress"],"description":"The type of the event. Always 'response.mcp_call.in_progress'."},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"item_id":{"type":"string","description":"The unique identifier of the MCP tool call item being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseMCPListToolsCompletedEvent":{"type":"object","title":"ResponseMCPListToolsCompletedEvent","description":"Emitted when the list of available MCP tools has been successfully retrieved.\n","properties":{"type":{"type":"string","enum":["response.mcp_list_tools.completed"],"description":"The type of the event. Always 'response.mcp_list_tools.completed'."},"item_id":{"type":"string","description":"The ID of the MCP tool call item that produced this output."},"output_index":{"type":"integer","description":"The index of the output item that was processed."},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","item_id","output_index","sequence_number"]},"ResponseMCPListToolsFailedEvent":{"type":"object","title":"ResponseMCPListToolsFailedEvent","description":"Emitted when the attempt to list available MCP tools has failed.\n","properties":{"type":{"type":"string","enum":["response.mcp_list_tools.failed"],"description":"The type of the event. Always 'response.mcp_list_tools.failed'."},"item_id":{"type":"string","description":"The ID of the MCP tool call item that failed."},"output_index":{"type":"integer","description":"The index of the output item that failed."},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","item_id","output_index","sequence_number"]},"ResponseMCPListToolsInProgressEvent":{"type":"object","title":"ResponseMCPListToolsInProgressEvent","description":"Emitted when the system is in the process of retrieving the list of available MCP tools.\n","properties":{"type":{"type":"string","enum":["response.mcp_list_tools.in_progress"],"description":"The type of the event. Always 'response.mcp_list_tools.in_progress'."},"item_id":{"type":"string","description":"The ID of the MCP tool call item that is being processed."},"output_index":{"type":"integer","description":"The index of the output item that is being processed."},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","item_id","output_index","sequence_number"]},"ResponseOutputTextAnnotationAddedEvent":{"type":"object","title":"ResponseOutputTextAnnotationAddedEvent","description":"Emitted when an annotation is added to output text content.\n","properties":{"type":{"type":"string","enum":["response.output_text.annotation.added"],"description":"The type of the event. Always 'response.output_text.annotation.added'."},"item_id":{"type":"string","description":"The unique identifier of the item to which the annotation is being added."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"content_index":{"type":"integer","description":"The index of the content part within the output item."},"annotation_index":{"type":"integer","description":"The index of the annotation within the content part."},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"annotation":{"type":"object","description":"The annotation object being added. (See annotation schema for details.)"}},"required":["type","item_id","output_index","content_index","annotation_index","annotation","sequence_number"]},"ResponseQueuedEvent":{"type":"object","title":"ResponseQueuedEvent","description":"Emitted when a response is queued and waiting to be processed.\n","properties":{"type":{"type":"string","enum":["response.queued"],"description":"The type of the event. Always 'response.queued'."},"response":{"$ref":"#/components/schemas/Response","description":"The full response object that is queued."},"sequence_number":{"type":"integer","description":"The sequence number for this event."}},"required":["type","response","sequence_number"]},"ResponseCustomToolCallInputDeltaEvent":{"title":"ResponseCustomToolCallInputDelta","type":"object","description":"Event representing a delta (partial update) to the input of a custom tool call.\n","properties":{"type":{"type":"string","enum":["response.custom_tool_call_input.delta"],"description":"The event type identifier."},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"output_index":{"type":"integer","description":"The index of the output this delta applies to."},"item_id":{"type":"string","description":"Unique identifier for the API item associated with this event."},"delta":{"type":"string","description":"The incremental input data (delta) for the custom tool call."}},"required":["type","output_index","item_id","delta","sequence_number"]},"ResponseCustomToolCallInputDoneEvent":{"title":"ResponseCustomToolCallInputDone","type":"object","description":"Event indicating that input for a custom tool call is complete.\n","properties":{"type":{"type":"string","enum":["response.custom_tool_call_input.done"],"description":"The event type identifier."},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"output_index":{"type":"integer","description":"The index of the output this event applies to."},"item_id":{"type":"string","description":"Unique identifier for the API item associated with this event."},"input":{"type":"string","description":"The complete input data for the custom tool call."}},"required":["type","output_index","item_id","input","sequence_number"]}}},"paths":{"/v1/responses":{"post":{"operationId":"createResponse","tags":["Responses"],"summary":"Create a model response","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponseRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/ResponseStreamEvent"}}}}},"description":"Creates a model response."}}}}
````

## Get a model response

> Retrieves a model response with the given ID.<br>

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Responses","description":"Create and manage model responses."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: nexos-...` for a user key or `X-Api-Key: nexos-team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"IncludeEnum":{"type":"string","enum":["file_search_call.results","web_search_call.results","web_search_call.action.sources","message.input_image.image_url","computer_call_output.output.image_url","code_interpreter_call.outputs","reasoning.encrypted_content","message.output_text.logprobs"],"description":"Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program)."},"Response":{"title":"The response object","allOf":[{"$ref":"#/components/schemas/ModelResponseProperties"},{"$ref":"#/components/schemas/ResponseProperties"},{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this Response.\n"},"object":{"type":"string","description":"The object type of this resource - always set to `response`.\n","enum":["response"]},"status":{"type":"string","description":"The status of the response generation. One of `completed`, `failed`,\n`in_progress`, `cancelled`, `queued`, or `incomplete`.\n","enum":["completed","failed","in_progress","cancelled","queued","incomplete"]},"created_at":{"type":"number","description":"Unix timestamp (in seconds) of when this Response was created.\n"},"error":{"$ref":"#/components/schemas/ResponseError"},"incomplete_details":{"type":"object","description":"Details about why the response is incomplete.\n","properties":{"reason":{"type":"string","description":"The reason why the response is incomplete.","enum":["max_output_tokens","content_filter"]}},"nullable":true},"output":{"type":"array","description":"An array of content items generated by the model.\n\n- The length and order of items in the `output` array is dependent\n  on the model's response.\n- Rather than accessing the first item in the `output` array and\n  assuming it's an `assistant` message with the content generated by\n  the model, you might consider using the `output_text` property where\n  supported in SDKs.\n","items":{"$ref":"#/components/schemas/OutputItem"}},"instructions":{"description":"A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n","anyOf":[{"type":"string","description":"A text input to the model, equivalent to a text input with the\n`developer` role.\n"},{"type":"array","title":"Input item list","description":"A list of one or many input items to the model, containing\ndifferent content types.\n","items":{"$ref":"#/components/schemas/InputItem"}}],"nullable":true},"output_text":{"type":"string","description":"SDK-only convenience property that contains the aggregated text output\nfrom all `output_text` items in the `output` array, if any are present.\nSupported in the Python and JavaScript SDKs.\n","nullable":true},"usage":{"$ref":"#/components/schemas/ResponseUsage"},"parallel_tool_calls":{"type":"boolean","description":"Whether to allow the model to run tool calls in parallel.\n","default":true},"conversation":{"$ref":"#/components/schemas/Conversation-2","nullable":true},"provider":{"type":"string","description":"The upstream provider that served the request (e.g. `openai`). Nexos extension.\n"},"completed_at":{"type":"number","nullable":true,"description":"Unix timestamp (in seconds) of when the response generation completed.\nPassed through from the upstream provider.\n"},"store":{"type":"boolean","description":"Whether the response is stored for later retrieval. Echoed from the request\nby the upstream provider.\n"},"frequency_penalty":{"type":"number","nullable":true,"description":"Echoed by some upstream providers alongside the response.\n"},"presence_penalty":{"type":"number","nullable":true,"description":"Echoed by some upstream providers alongside the response.\n"},"moderation":{"type":"object","nullable":true,"description":"Moderation details passed through from the upstream provider, when available.\n"},"content_filters":{"type":"array","nullable":true,"description":"Content-filter annotations passed through from the upstream provider\n(returned by Azure-hosted models).\n","items":{"type":"object","properties":{"blocked":{"type":"boolean"},"source_type":{"type":"string"},"content_filter_raw":{"type":"array","items":{"type":"object"}},"content_filter_results":{"type":"object"},"content_filter_offsets":{"type":"object","properties":{"check_offset":{"type":"integer"},"start_offset":{"type":"integer"},"end_offset":{"type":"integer"}}}}}},"tool_usage":{"type":"object","nullable":true,"description":"Aggregated built-in tool usage for this response. Nexos extension.\n","properties":{"image_gen":{"type":"object","properties":{"input_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"output_tokens":{"type":"integer"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"total_tokens":{"type":"integer"}}},"web_search":{"type":"object","properties":{"num_requests":{"type":"integer"}}}}}},"required":["id","object","created_at","error","incomplete_details","instructions","model","tools","output","parallel_tool_calls","metadata","tool_choice","temperature","top_p"]}]},"ModelResponseProperties":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/responses_Metadata"},"top_logprobs":{"description":"An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n","type":"integer","minimum":0,"maximum":20,"nullable":true},"temperature":{"type":"number","minimum":0,"maximum":2,"default":1,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n","nullable":true},"top_p":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n","nullable":true},"user":{"type":"string","deprecated":true,"description":"Deprecated in favor of `safety_identifier` and `prompt_cache_key`; use `prompt_cache_key` to maintain caching. A stable end-user identifier to improve cache hit rates and help detect abuse.\n"},"safety_identifier":{"type":"string","description":"A stable identifier used to help detect users who may violate usage policies. Use a unique per-user string (e.g., a hash of username or email) to avoid sending identifying information.\n"},"prompt_cache_key":{"type":"string","description":"Used to cache responses for similar requests and improve cache hit rates. Replaces the `user` field.\n"},"service_tier":{"$ref":"#/components/schemas/ServiceTier"},"prompt_cache_retention":{"type":"string","enum":["in-memory","24h"],"description":"Retention policy for the prompt cache. Set to `24h` to keep cached prefixes active longer (up to 24 hours).\n","nullable":true}}},"responses_Metadata":{"type":"object","description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n","additionalProperties":{"type":"string"},"nullable":true},"ServiceTier":{"type":"string","description":"Specifies the processing tier for the request.\nThe response includes the actual tier used, which may differ from the requested value.\n","enum":["auto","default","flex","scale","priority"],"default":"auto","nullable":true},"ResponseProperties":{"type":"object","required":["model"],"properties":{"previous_response_id":{"type":"string","description":"The unique ID of the previous response to the model. Use this to create multi-turn conversations. Cannot be used with `conversation`.\n","nullable":true},"model":{"description":"Model ID used to generate the response (e.g., `gpt-4o` or `o3`). See your provider's model guide for available options.\n","type":"string"},"reasoning":{"$ref":"#/components/schemas/Reasoning","nullable":true},"background":{"type":"boolean","description":"Whether to run the model response in the background.\n","default":false,"nullable":true},"max_output_tokens":{"description":"An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.\n","type":"integer","nullable":true},"max_tool_calls":{"description":"The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n","type":"integer","nullable":true},"text":{"$ref":"#/components/schemas/ResponseTextParam"},"tools":{"$ref":"#/components/schemas/ToolsArray"},"tool_choice":{"$ref":"#/components/schemas/ToolChoiceParam"},"prompt":{"$ref":"#/components/schemas/Prompt"},"truncation":{"type":"string","description":"The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n  the model's context window size, the model will truncate the\n  response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n  size for a model, the request will fail with a 400 error.\n","enum":["auto","disabled"],"default":"disabled","nullable":true}}},"Reasoning":{"type":"object","description":"Configuration options for reasoning models. Applicable to gpt-5 and o-series models only.\n","title":"Reasoning","properties":{"effort":{"$ref":"#/components/schemas/ReasoningEffort"},"mode":{"type":"string","description":"Reasoning mode for models that support it. One of `standard` or `pro`.\n","enum":["standard","pro"]},"summary":{"type":"string","nullable":true,"description":"A summary of the model's reasoning.\nOne of `auto`, `concise`, or `detailed` (only `concise` is supported for `computer-use-preview`).\n","enum":["auto","concise","detailed"]},"generate_summary":{"type":"string","nullable":true,"deprecated":true,"description":"Deprecated: use `summary` instead.\nA summary of the model's reasoning. One of `auto`, `concise`, or `detailed`.\n","enum":["auto","concise","detailed"]}}},"ReasoningEffort":{"type":"string","nullable":true,"enum":["none","minimal","low","medium","high"],"default":"medium","description":"Controls how much reasoning effort the model uses. Lower settings are faster and use fewer tokens; higher settings provide more detailed reasoning.\n"},"ResponseTextParam":{"type":"object","description":"Configuration options for a text response. Supports plain text or structured JSON.\n","properties":{"format":{"$ref":"#/components/schemas/TextResponseFormatConfiguration"},"verbosity":{"$ref":"#/components/schemas/Verbosity"}}},"TextResponseFormatConfiguration":{"description":"Specifies the required output format. Use `type: json_schema` to enforce a schema; `type: text` is the default.\n","anyOf":[{"$ref":"#/components/schemas/responses_ResponseFormatText"},{"$ref":"#/components/schemas/TextResponseFormatJsonSchema"},{"$ref":"#/components/schemas/responses_ResponseFormatJsonObject"}],"discriminator":{"propertyName":"type"}},"responses_ResponseFormatText":{"type":"object","title":"Text","description":"Default response format. Used to generate text responses.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `text`.","enum":["text"]}},"required":["type"]},"TextResponseFormatJsonSchema":{"type":"object","title":"JSON schema","description":"JSON Schema response format used to generate structured JSON responses.\nLearn more in the Structured Outputs guide.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_schema`.","enum":["json_schema"]},"description":{"type":"string","description":"A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n"},"name":{"type":"string","description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n"},"schema":{"$ref":"#/components/schemas/responses_ResponseFormatJsonSchemaSchema"},"strict":{"type":"boolean","nullable":true,"default":false,"description":"Whether to enable strict schema adherence when generating the output.\nIf true, the model will follow the exact schema; only a subset of JSON Schema is supported.\n"}},"required":["type","schema","name"]},"responses_ResponseFormatJsonSchemaSchema":{"type":"object","title":"JSON schema","description":"The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n","additionalProperties":true},"responses_ResponseFormatJsonObject":{"type":"object","title":"JSON object","description":"JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_object`.","enum":["json_object"]}},"required":["type"]},"Verbosity":{"type":"string","nullable":true,"enum":["low","medium","high"],"default":"medium","description":"Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n"},"ToolsArray":{"type":"array","description":"An array of tools the model may call while generating a response. Categories include built-in tools, MCP tools, and custom function calls.\n","items":{"$ref":"#/components/schemas/responses_Tool"}},"responses_Tool":{"description":"A tool that can be used to generate a response.\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionTool"},{"$ref":"#/components/schemas/FileSearchTool"},{"$ref":"#/components/schemas/ComputerUsePreviewTool"},{"$ref":"#/components/schemas/WebSearchTool"},{"$ref":"#/components/schemas/MCPTool"},{"$ref":"#/components/schemas/CodeInterpreterTool"},{"$ref":"#/components/schemas/ImageGenTool"},{"$ref":"#/components/schemas/LocalShellToolParam"},{"$ref":"#/components/schemas/FunctionShellToolParam"},{"$ref":"#/components/schemas/CustomToolParam"},{"$ref":"#/components/schemas/WebSearchPreviewTool"},{"$ref":"#/components/schemas/ApplyPatchToolParam"}]},"FunctionTool":{"properties":{"type":{"type":"string","enum":["function"],"description":"The type of the function tool. Always `function`.","default":"function"},"name":{"type":"string","description":"The name of the function to call."},"description":{"type":"string","nullable":true,"description":"A description of the function. Used by the model to determine whether or not to call the function."},"parameters":{"type":"object","nullable":true,"additionalProperties":{},"description":"A JSON schema object describing the parameters of the function."},"strict":{"type":"boolean","nullable":true,"description":"Whether to enforce strict parameter validation. Default `true`."}},"type":"object","required":["type","name","strict","parameters"],"title":"Function","description":"Defines a function in your code that the model can call."},"FileSearchTool":{"properties":{"type":{"type":"string","enum":["file_search"],"description":"The type of the file search tool. Always `file_search`.","default":"file_search"},"vector_store_ids":{"items":{"type":"string"},"type":"array","description":"The IDs of the vector stores to search."},"max_num_results":{"type":"integer","description":"The maximum number of results to return. This number should be between 1 and 50 inclusive."},"ranking_options":{"$ref":"#/components/schemas/RankingOptions","description":"Ranking options for search."},"filters":{"$ref":"#/components/schemas/Filters","description":"A filter to apply.","nullable":true}},"type":"object","required":["type","vector_store_ids"],"title":"File search","description":"Searches uploaded files for relevant content. See the file search guide."},"RankingOptions":{"properties":{"ranker":{"$ref":"#/components/schemas/RankerVersionType","description":"The ranker to use for the file search."},"score_threshold":{"type":"number","description":"The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results."},"hybrid_search":{"$ref":"#/components/schemas/HybridSearchOptions","description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled."}},"type":"object","required":[]},"RankerVersionType":{"type":"string","enum":["auto","default-2024-11-15"]},"HybridSearchOptions":{"properties":{"embedding_weight":{"type":"number","description":"The weight of the embedding in the reciprocal ranking fusion."},"text_weight":{"type":"number","description":"The weight of the text in the reciprocal ranking fusion."}},"type":"object","required":["embedding_weight","text_weight"]},"Filters":{"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]},"ComparisonFilter":{"type":"object","additionalProperties":false,"title":"Comparison Filter","description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.\n","properties":{"type":{"type":"string","default":"eq","enum":["eq","ne","gt","gte","lt","lte"],"description":"Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.\n- `eq`: equals\n- `ne`: not equal\n- `gt`: greater than\n- `gte`: greater than or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `in`: in\n- `nin`: not in\n"},"key":{"type":"string","description":"The key to compare against the value."},"value":{"description":"The value to compare against the attribute key; supports string, number, or boolean types.","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"$ref":"#/components/schemas/ComparisonFilterValueItems"}}]}},"required":["type","key","value"]},"ComparisonFilterValueItems":{"anyOf":[{"type":"string"},{"type":"number"}]},"CompoundFilter":{"type":"object","additionalProperties":false,"title":"Compound Filter","description":"Combine multiple filters using `and` or `or`.","properties":{"type":{"type":"string","description":"Type of operation: `and` or `or`.","enum":["and","or"]},"filters":{"type":"array","description":"Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]}}},"required":["type","filters"]},"ComputerUsePreviewTool":{"properties":{"type":{"type":"string","enum":["computer_use_preview"],"description":"The type of the computer use tool. Always `computer_use_preview`.","default":"computer_use_preview"},"environment":{"$ref":"#/components/schemas/ComputerEnvironment","description":"The type of computer environment to control."},"display_width":{"type":"integer","description":"The width of the computer display."},"display_height":{"type":"integer","description":"The height of the computer display."}},"type":"object","required":["type","environment","display_width","display_height"],"title":"Computer use preview","description":"A tool that controls a virtual computer. Learn more in the computer tool guide."},"ComputerEnvironment":{"type":"string","enum":["windows","mac","linux","ubuntu","browser"]},"WebSearchTool":{"type":"object","title":"Web search","description":"Search the internet for sources related to the prompt. Learn more in the web search tool guide.\n","properties":{"type":{"type":"string","enum":["web_search","web_search_2025_08_26"],"description":"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.","default":"web_search"},"filters":{"type":"object","description":"Filters for the search.\n","properties":{"allowed_domains":{"type":"array","title":"Allowed domains for the search.","description":"Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well.\n\nExample: `[\"pubmed.ncbi.nlm.nih.gov\"]`\n","items":{"type":"string","description":"Allowed domain for the search."},"default":[],"nullable":true}},"nullable":true},"user_location":{"$ref":"#/components/schemas/WebSearchApproximateLocation"},"search_context_size":{"type":"string","enum":["low","medium","high"],"default":"medium","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"required":["type"]},"WebSearchApproximateLocation":{"type":"object","nullable":true,"title":"Web search approximate location","description":"The approximate location of the user.\n","properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","nullable":true,"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`."},"region":{"type":"string","nullable":true,"description":"Free text input for the region of the user, e.g. `California`."},"city":{"type":"string","nullable":true,"description":"Free text input for the city of the user, e.g. `San Francisco`."},"timezone":{"type":"string","nullable":true,"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`."}}},"MCPTool":{"type":"object","title":"MCP tool","description":"Give the model access to tools via remote Model Context Protocol (MCP) servers. Learn more in the MCP guide.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"The type of the MCP tool. Always `mcp`."},"server_label":{"type":"string","description":"A label for this MCP server, used to identify it in tool calls.\n"},"server_url":{"type":"string","description":"The URL for the MCP server. One of `server_url` or `connector_id` must be\nprovided.\n"},"connector_id":{"type":"string","enum":["connector_dropbox","connector_gmail","connector_googlecalendar","connector_googledrive","connector_microsoftteams","connector_outlookcalendar","connector_outlookemail","connector_sharepoint"],"description":"Identifier for service connectors, like those available in ChatGPT. One of\n`server_url` or `connector_id` must be provided.\n\nCurrently supported `connector_id` values are:\n\n- Dropbox: `connector_dropbox`\n- Gmail: `connector_gmail`\n- Google Calendar: `connector_googlecalendar`\n- Google Drive: `connector_googledrive`\n- Microsoft Teams: `connector_microsoftteams`\n- Outlook Calendar: `connector_outlookcalendar`\n- Outlook Email: `connector_outlookemail`\n- SharePoint: `connector_sharepoint`\n"},"authorization":{"type":"string","description":"An OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.\n"},"server_description":{"type":"string","description":"Optional description of the MCP server, used to provide more context.\n"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.\n","nullable":true},"allowed_tools":{"description":"List of allowed tool names or a filter object.\n","anyOf":[{"type":"array","title":"MCP allowed tools","description":"A string array of allowed tool names","items":{"type":"string"}},{"$ref":"#/components/schemas/MCPToolFilter"}],"nullable":true},"require_approval":{"description":"Specify which of the MCP server's tools require approval.","default":"always","anyOf":[{"type":"object","title":"MCP tool approval filter","description":"Specify which of the MCP server's tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.\n","properties":{"always":{"$ref":"#/components/schemas/MCPToolFilter"},"never":{"$ref":"#/components/schemas/MCPToolFilter"}},"additionalProperties":false},{"type":"string","title":"MCP tool approval setting","description":"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.\n","enum":["always","never"]}],"nullable":true}},"required":["type","server_label"]},"MCPToolFilter":{"type":"object","title":"MCP tool filter","description":"A filter object to specify which tools are allowed.\n","properties":{"tool_names":{"type":"array","title":"MCP allowed tools","items":{"type":"string"},"description":"List of allowed tool names."},"read_only":{"type":"boolean","description":"Indicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.\n"}},"required":[],"additionalProperties":false},"CodeInterpreterTool":{"type":"object","title":"Code interpreter","description":"A tool that runs Python code to help generate a response to a prompt.\n","properties":{"type":{"type":"string","enum":["code_interpreter"],"description":"The type of the code interpreter tool. Always `code_interpreter`.\n"},"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.\n","anyOf":[{"type":"string","description":"The container ID."},{"$ref":"#/components/schemas/CodeInterpreterContainerAuto"}]}},"required":["type","container"]},"CodeInterpreterContainerAuto":{"properties":{"type":{"type":"string","enum":["auto"],"description":"Always `auto`.","default":"auto"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"description":"An optional list of uploaded files to make available to your code."},"memory_limit":{"$ref":"#/components/schemas/ContainerMemoryLimit","nullable":true}},"type":"object","required":["type"],"title":"CodeInterpreterToolAuto","description":"Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on."},"ContainerMemoryLimit":{"type":"string","enum":["1g","4g","16g","64g"]},"ImageGenTool":{"type":"object","title":"Image generation tool","description":"A tool that generates images using a model like `gpt-image-1`.\n","properties":{"type":{"type":"string","enum":["image_generation"],"description":"The type of the image generation tool. Always `image_generation`.\n"},"model":{"type":"string","enum":["gpt-image-1","gpt-image-1-mini"],"description":"The image generation model to use. Default: `gpt-image-1`.\n","default":"gpt-image-1"},"quality":{"type":"string","enum":["low","medium","high","auto"],"description":"The quality of the generated image. One of `low`, `medium`, `high`,\nor `auto`. Default: `auto`.\n","default":"auto"},"size":{"type":"string","enum":["1024x1024","1024x1536","1536x1024","auto"],"description":"The size of the generated image. One of `1024x1024`, `1024x1536`,\n`1536x1024`, or `auto`. Default: `auto`.\n","default":"auto"},"output_format":{"type":"string","enum":["png","webp","jpeg"],"description":"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.\n","default":"png"},"output_compression":{"type":"integer","minimum":0,"maximum":100,"description":"Compression level for the output image. Default: 100.\n","default":100},"moderation":{"type":"string","enum":["auto","low"],"description":"Moderation level for the generated image. Default: `auto`.\n","default":"auto"},"background":{"type":"string","enum":["transparent","opaque","auto"],"description":"Background type for the generated image. One of `transparent`,\n`opaque`, or `auto`. Default: `auto`.\n","default":"auto"},"input_fidelity":{"$ref":"#/components/schemas/InputFidelity","nullable":true},"input_image_mask":{"type":"object","description":"Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).\n","properties":{"image_url":{"type":"string","description":"Base64-encoded mask image.\n"},"file_id":{"type":"string","description":"File ID for the mask image.\n"}},"required":[],"additionalProperties":false},"partial_images":{"type":"integer","minimum":0,"maximum":3,"description":"Number of partial images to generate in streaming mode, from 0 (default value) to 3.\n","default":0}},"required":["type"]},"InputFidelity":{"type":"string","enum":["high","low"],"description":"Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`."},"LocalShellToolParam":{"properties":{"type":{"type":"string","enum":["local_shell"],"description":"The type of the local shell tool. Always `local_shell`.","default":"local_shell"}},"type":"object","required":["type"],"title":"Local shell tool","description":"A tool that allows the model to execute shell commands in a local environment."},"FunctionShellToolParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The type of the shell tool. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Shell tool","description":"A tool that allows the model to execute shell commands."},"CustomToolParam":{"properties":{"type":{"type":"string","enum":["custom"],"description":"The type of the custom tool. Always `custom`.","default":"custom"},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls."},"description":{"type":"string","description":"Optional description of the custom tool, used to provide more context."},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CustomTextFormatParam"},{"$ref":"#/components/schemas/CustomGrammarFormatParam"}]}},"type":"object","required":["type","name"],"title":"Custom tool","description":"A custom tool that processes input using a specified format."},"CustomTextFormatParam":{"properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`.","default":"text"}},"type":"object","required":["type"],"title":"Text format","description":"Unconstrained free-form text."},"CustomGrammarFormatParam":{"properties":{"type":{"type":"string","enum":["grammar"],"description":"Grammar format. Always `grammar`.","default":"grammar"},"syntax":{"$ref":"#/components/schemas/GrammarSyntax1","description":"The syntax of the grammar definition. One of `lark` or `regex`."},"definition":{"type":"string","description":"The grammar definition."}},"type":"object","required":["type","syntax","definition"],"title":"Grammar format","description":"A grammar defined by the user."},"GrammarSyntax1":{"type":"string","enum":["lark","regex"]},"WebSearchPreviewTool":{"properties":{"type":{"type":"string","enum":["web_search_preview","web_search_preview_2025_03_11"],"description":"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.","default":"web_search_preview"},"user_location":{"$ref":"#/components/schemas/ApproximateLocation","description":"The user's location.","nullable":true},"search_context_size":{"$ref":"#/components/schemas/SearchContextSize","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"type":"object","required":["type"],"title":"Web search preview","description":"Searches the web for relevant results to use in a response. Learn more in the web search tool guide."},"ApproximateLocation":{"properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.","nullable":true},"region":{"type":"string","description":"Free text input for the region of the user, e.g. `California`.","nullable":true},"city":{"type":"string","description":"Free text input for the city of the user, e.g. `San Francisco`.","nullable":true},"timezone":{"type":"string","description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.","nullable":true}},"type":"object","required":["type"]},"SearchContextSize":{"type":"string","enum":["low","medium","high"]},"ApplyPatchToolParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The type of the tool. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Apply patch tool","description":"Allows the assistant to create, delete, or update files using unified diffs."},"ToolChoiceParam":{"description":"How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call.\n","anyOf":[{"$ref":"#/components/schemas/ToolChoiceOptions"},{"$ref":"#/components/schemas/ToolChoiceAllowed"},{"$ref":"#/components/schemas/ToolChoiceTypes"},{"$ref":"#/components/schemas/ToolChoiceFunction"},{"$ref":"#/components/schemas/ToolChoiceMCP"},{"$ref":"#/components/schemas/ToolChoiceCustom"},{"$ref":"#/components/schemas/SpecificApplyPatchParam"},{"$ref":"#/components/schemas/SpecificFunctionShellParam"}]},"ToolChoiceOptions":{"type":"string","title":"Tool choice mode","description":"Controls which (if any) tool is called by the model.\n\n`none` means the model will not call any tool and instead generates a message.\n\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n\n`required` means the model must call one or more tools.\n","enum":["none","auto","required"]},"ToolChoiceAllowed":{"type":"object","title":"Allowed tools","description":"Constrains the tools available to the model to a pre-defined set.\n","properties":{"type":{"type":"string","enum":["allowed_tools"],"description":"Allowed tool configuration type. Always `allowed_tools`."},"mode":{"type":"string","enum":["auto","required"],"description":"Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n"},"tools":{"type":"array","description":"A list of tool definitions that the model should be allowed to call.\n\nFor the Responses API, the list of tool definitions might look like:\n```json\n[\n  { \"type\": \"function\", \"name\": \"get_weather\" },\n  { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n  { \"type\": \"image_generation\" }\n]\n```\n","items":{"type":"object","description":"A tool definition that the model should be allowed to call.\n","additionalProperties":true}}},"required":["type","mode","tools"]},"ToolChoiceTypes":{"type":"object","title":"Hosted tool","description":"Indicates that the model should use a built-in tool to generate a response.\nUse this to select a specific hosted capability.\n","properties":{"type":{"type":"string","description":"The type of hosted tool the model should to use. \n\nAllowed values are:\n- `file_search`\n- `web_search_preview`\n- `computer_use_preview`\n- `code_interpreter`\n- `image_generation`\n","enum":["file_search","web_search_preview","computer_use_preview","web_search_preview_2025_03_11","image_generation","code_interpreter"]}},"required":["type"]},"ToolChoiceFunction":{"type":"object","title":"Function tool","description":"Use this option to force the model to call a specific function.\n","properties":{"type":{"type":"string","enum":["function"],"description":"For function calling, the type is always `function`."},"name":{"type":"string","description":"The name of the function to call."}},"required":["type","name"]},"ToolChoiceMCP":{"type":"object","title":"MCP tool","description":"Use this option to force the model to call a specific tool on a remote MCP server.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"For MCP tools, the type is always `mcp`."},"server_label":{"type":"string","description":"The label of the MCP server to use.\n"},"name":{"type":"string","description":"The name of the tool to call on the server.\n","nullable":true}},"required":["type","server_label"]},"ToolChoiceCustom":{"type":"object","title":"Custom tool","description":"Use this option to force the model to call a specific custom tool.\n","properties":{"type":{"type":"string","enum":["custom"],"description":"For custom tool calling, the type is always `custom`."},"name":{"type":"string","description":"The name of the custom tool to call."}},"required":["type","name"]},"SpecificApplyPatchParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The tool to call. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Specific apply patch tool choice","description":"Forces the model to call the apply_patch tool when executing a tool call."},"SpecificFunctionShellParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The tool to call. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Specific shell tool choice","description":"Forces the model to call the function shell tool when a tool call is required."},"Prompt":{"type":"object","nullable":true,"description":"Reference to a prompt template and its variables.\n","required":["id"],"properties":{"id":{"type":"string","description":"The unique identifier of the prompt template to use."},"version":{"type":"string","nullable":true,"description":"Optional version of the prompt template."},"variables":{"$ref":"#/components/schemas/ResponsePromptVariables"}}},"ResponsePromptVariables":{"type":"object","title":"Prompt Variables","description":"Optional map of values to substitute in for variables in your\nprompt. The substitution values can either be strings, or other\nResponse input types like images or files.\n","additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"nullable":true},"InputTextContent":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContent":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/ImageDetail","description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type","detail"],"title":"Input image","description":"An image input to the model. See the vision guide for details."},"ImageDetail":{"type":"string","enum":["low","high","auto"]},"InputFileContent":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","description":"The name of the file to be sent to the model."},"file_url":{"type":"string","description":"The URL of the file to be sent to the model."},"file_data":{"type":"string","description":"The content of the file to be sent to the model.\n"}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"ResponseError":{"type":"object","description":"An error object returned when the model fails to generate a Response.\n","properties":{"code":{"$ref":"#/components/schemas/ResponseErrorCode"},"message":{"type":"string","description":"A human-readable description of the error.\n"}},"required":["code","message"],"nullable":true},"ResponseErrorCode":{"type":"string","description":"The error code for the response.\n","enum":["server_error","rate_limit_exceeded","invalid_prompt","vector_store_timeout","invalid_image","invalid_image_format","invalid_base64_image","invalid_image_url","image_too_large","image_too_small","image_parse_error","image_content_policy_violation","invalid_image_mode","image_file_too_large","unsupported_image_media_type","empty_image_file","failed_to_download_image","image_file_not_found"]},"OutputItem":{"anyOf":[{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/FunctionShellCall"},{"$ref":"#/components/schemas/FunctionShellCallOutput"},{"$ref":"#/components/schemas/ApplyPatchToolCall"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutput"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/CustomToolCall"}],"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"]},"OutputMessage":{"type":"object","title":"Output message","description":"An output message from the model.\n","properties":{"id":{"type":"string","description":"The unique ID of the output message.\n"},"type":{"type":"string","description":"The type of the output message. Always `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the output message. Always `assistant`.\n","enum":["assistant"]},"content":{"type":"array","description":"The content of the output message.\n","items":{"$ref":"#/components/schemas/OutputMessageContent"}},"status":{"type":"string","description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","type","role","content","status"]},"OutputMessageContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"}]},"OutputTextContent":{"properties":{"type":{"type":"string","enum":["output_text"],"description":"The type of the output text. Always `output_text`.","default":"output_text"},"text":{"type":"string","description":"The text output from the model."},"annotations":{"items":{"$ref":"#/components/schemas/responses_Annotation"},"type":"array","description":"The annotations of the text output."},"logprobs":{"items":{"$ref":"#/components/schemas/LogProb"},"type":"array"}},"type":"object","required":["type","text","annotations"],"title":"Output text","description":"A text output from the model."},"responses_Annotation":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FileCitationBody"},{"$ref":"#/components/schemas/UrlCitationBody"},{"$ref":"#/components/schemas/ContainerFileCitationBody"},{"$ref":"#/components/schemas/FilePath"}]},"FileCitationBody":{"properties":{"type":{"type":"string","enum":["file_citation"],"description":"The type of the file citation. Always `file_citation`.","default":"file_citation"},"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","description":"The index of the file in the list of files."},"filename":{"type":"string","description":"The filename of the file cited."}},"type":"object","required":["type","file_id","index","filename"],"title":"File citation","description":"A citation to a file."},"UrlCitationBody":{"properties":{"type":{"type":"string","enum":["url_citation"],"description":"The type of the URL citation. Always `url_citation`.","default":"url_citation"},"url":{"type":"string","description":"The URL of the web resource."},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message."},"title":{"type":"string","description":"The title of the web resource."}},"type":"object","required":["type","url","start_index","end_index","title"],"title":"URL citation","description":"A citation for a web resource used to generate a model response."},"ContainerFileCitationBody":{"properties":{"type":{"type":"string","enum":["container_file_citation"],"description":"The type of the container file citation. Always `container_file_citation`.","default":"container_file_citation"},"container_id":{"type":"string","description":"The ID of the container file."},"file_id":{"type":"string","description":"The ID of the file."},"start_index":{"type":"integer","description":"The index of the first character of the container file citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the container file citation in the message."},"filename":{"type":"string","description":"The filename of the container file cited."}},"type":"object","required":["type","container_id","file_id","start_index","end_index","filename"],"title":"Container file citation","description":"A citation for a container file used to generate a model response."},"FilePath":{"type":"object","title":"File path","description":"A path to a file.\n","properties":{"type":{"type":"string","description":"The type of the file path. Always `file_path`.\n","enum":["file_path"]},"file_id":{"type":"string","description":"The ID of the file.\n"},"index":{"type":"integer","description":"The index of the file in the list of files.\n"}},"required":["type","file_id","index"]},"LogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"},"top_logprobs":{"items":{"$ref":"#/components/schemas/TopLogProb"},"type":"array"}},"type":"object","required":["token","logprob","bytes","top_logprobs"],"title":"Log probability","description":"The log probability of a token."},"TopLogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"}},"type":"object","required":["token","logprob","bytes"],"title":"Top log probability","description":"The top log probability of a token."},"RefusalContent":{"properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the refusal. Always `refusal`.","default":"refusal"},"refusal":{"type":"string","description":"The refusal explanation from the model."}},"type":"object","required":["type","refusal"],"title":"Refusal","description":"A refusal from the model."},"FileSearchToolCall":{"type":"object","title":"File search tool call","description":"The results of a file search tool call. See the file search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the file search tool call.\n"},"type":{"type":"string","enum":["file_search_call"],"default":"file_search_call","description":"The type of the file search tool call. Always `file_search_call`.\n"},"status":{"type":"string","description":"The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n","enum":["in_progress","searching","completed","incomplete","failed"]},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files.\n"},"results":{"type":"array","description":"The results of the file search tool call.\n","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The unique ID of the file.\n"},"text":{"type":"string","description":"The text that was retrieved from the file.\n"},"filename":{"type":"string","description":"The name of the file.\n"},"attributes":{"$ref":"#/components/schemas/VectorStoreFileAttributes"},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1.\n"}}},"nullable":true}}},"VectorStoreFileAttributes":{"type":"object","nullable":true,"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n","maxProperties":16,"propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"FunctionToolCall":{"type":"object","title":"Function tool call","description":"A tool call to run a function. Used when the model requests your code to execute a function.\n","properties":{"id":{"type":"string","description":"The unique ID of the function tool call.\n"},"type":{"type":"string","enum":["function_call"],"default":"function_call","description":"The type of the function tool call. Always `function_call`.\n"},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model.\n"},"name":{"type":"string","description":"The name of the function to run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","name","arguments"]},"WebSearchToolCall":{"type":"object","title":"Web search tool call","description":"The results of a web search tool call. See the web search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the web search tool call.\n"},"type":{"type":"string","enum":["web_search_call"],"default":"web_search_call","description":"The type of the web search tool call. Always `web_search_call`.\n"},"status":{"type":"string","description":"The status of the web search tool call.\n","enum":["in_progress","searching","completed","failed"]},"action":{"type":"object","description":"An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find).\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/WebSearchActionSearch"},{"$ref":"#/components/schemas/WebSearchActionOpenPage"},{"$ref":"#/components/schemas/WebSearchActionFind"}]}},"required":["id","type","status","action"]},"WebSearchActionSearch":{"type":"object","title":"Search action","description":"Action type \"search\" - Performs a web search query.\n","properties":{"type":{"type":"string","enum":["search"],"description":"The action type.\n"},"query":{"type":"string","description":"The search query.\n"},"sources":{"type":"array","title":"Web search sources","description":"The sources used in the search.\n","items":{"type":"object","title":"Web search source","description":"A source used in the search.\n","properties":{"type":{"type":"string","enum":["url"],"description":"The type of source. Always `url`.\n"},"url":{"type":"string","description":"The URL of the source.\n"}},"required":["type","url"]}}},"required":["type","query"]},"WebSearchActionOpenPage":{"type":"object","title":"Open page action","description":"Action type \"open_page\" - Opens a specific URL from search results.\n","properties":{"type":{"type":"string","enum":["open_page"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL opened by the model.\n"}},"required":["type","url"]},"WebSearchActionFind":{"type":"object","title":"Find action","description":"Action type \"find\": Searches for a pattern within a loaded page.\n","properties":{"type":{"type":"string","enum":["find"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL of the page searched for the pattern.\n"},"pattern":{"type":"string","description":"The pattern or text to search for within the page.\n"}},"required":["type","url","pattern"]},"ComputerToolCall":{"type":"object","title":"Computer tool call","description":"A tool call to a computer use tool. See the computer use guide for more information.\n","properties":{"type":{"type":"string","description":"The type of the computer call. Always `computer_call`.","enum":["computer_call"],"default":"computer_call"},"id":{"type":"string","description":"The unique ID of the computer call."},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output.\n"},"action":{"$ref":"#/components/schemas/ComputerAction"},"pending_safety_checks":{"type":"array","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","id","action","call_id","pending_safety_checks","status"]},"ComputerAction":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ClickParam"},{"$ref":"#/components/schemas/DoubleClickAction"},{"$ref":"#/components/schemas/Drag"},{"$ref":"#/components/schemas/KeyPressAction"},{"$ref":"#/components/schemas/Move"},{"$ref":"#/components/schemas/Screenshot"},{"$ref":"#/components/schemas/Scroll"},{"$ref":"#/components/schemas/Type"},{"$ref":"#/components/schemas/Wait"}]},"ClickParam":{"properties":{"type":{"type":"string","enum":["click"],"description":"Specifies the event type. For a click action, this property is always `click`.","default":"click"},"button":{"$ref":"#/components/schemas/ClickButtonType","description":"Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."},"x":{"type":"integer","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","description":"The y-coordinate where the click occurred."}},"type":"object","required":["type","button","x","y"],"title":"Click","description":"A click action."},"ClickButtonType":{"type":"string","enum":["left","right","wheel","back","forward"]},"DoubleClickAction":{"properties":{"type":{"type":"string","enum":["double_click"],"description":"Specifies the event type. For a double click action, this property is always set to `double_click`.","default":"double_click"},"x":{"type":"integer","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","description":"The y-coordinate where the double click occurred."}},"type":"object","required":["type","x","y"],"title":"DoubleClick","description":"A double click action."},"Drag":{"type":"object","title":"Drag","description":"A drag action.\n","properties":{"type":{"type":"string","enum":["drag"],"default":"drag","description":"Specifies the event type. For a drag action, this property is \nalways set to `drag`.\n"},"path":{"type":"array","description":"An array of coordinates representing the path of the drag action. Coordinates will appear as an array\nof objects, eg\n```\n[\n  { x: 100, y: 200 },\n  { x: 200, y: 300 }\n]\n```\n","items":{"$ref":"#/components/schemas/DragPoint"}}},"required":["type","path"]},"DragPoint":{"properties":{"x":{"type":"integer","description":"The x-coordinate."},"y":{"type":"integer","description":"The y-coordinate."}},"type":"object","required":["x","y"],"title":"Coordinate","description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."},"KeyPressAction":{"properties":{"type":{"type":"string","enum":["keypress"],"description":"Specifies the event type. For a keypress action, this property is always set to `keypress`.","default":"keypress"},"keys":{"items":{"type":"string","description":"One of the keys the model is requesting to be pressed."},"type":"array","description":"The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key."}},"type":"object","required":["type","keys"],"title":"KeyPress","description":"A collection of keypresses the model would like to perform."},"Move":{"type":"object","title":"Move","description":"A mouse move action.\n","properties":{"type":{"type":"string","enum":["move"],"default":"move","description":"Specifies the event type. For a move action, this property is \nalways set to `move`.\n"},"x":{"type":"integer","description":"The x-coordinate to move to.\n"},"y":{"type":"integer","description":"The y-coordinate to move to.\n"}},"required":["type","x","y"]},"Screenshot":{"type":"object","title":"Screenshot","description":"A screenshot action.\n","properties":{"type":{"type":"string","enum":["screenshot"],"default":"screenshot","description":"Specifies the event type. For a screenshot action, this property is \nalways set to `screenshot`.\n"}},"required":["type"]},"Scroll":{"type":"object","title":"Scroll","description":"A scroll action.\n","properties":{"type":{"type":"string","enum":["scroll"],"default":"scroll","description":"Specifies the event type. For a scroll action, this property is \nalways set to `scroll`.\n"},"x":{"type":"integer","description":"The x-coordinate where the scroll occurred.\n"},"y":{"type":"integer","description":"The y-coordinate where the scroll occurred.\n"},"scroll_x":{"type":"integer","description":"The horizontal scroll distance.\n"},"scroll_y":{"type":"integer","description":"The vertical scroll distance.\n"}},"required":["type","x","y","scroll_x","scroll_y"]},"Type":{"type":"object","title":"Type","description":"An action to type in text.\n","properties":{"type":{"type":"string","enum":["type"],"default":"type","description":"Specifies the event type. For a type action, this property is \nalways set to `type`.\n"},"text":{"type":"string","description":"The text to type.\n"}},"required":["type","text"]},"Wait":{"type":"object","title":"Wait","description":"A wait action.\n","properties":{"type":{"type":"string","enum":["wait"],"default":"wait","description":"Specifies the event type. For a wait action, this property is \nalways set to `wait`.\n"}},"required":["type"]},"ComputerCallSafetyCheckParam":{"properties":{"id":{"type":"string","description":"The ID of the pending safety check."},"code":{"type":"string","description":"The type of the pending safety check.","nullable":true},"message":{"type":"string","description":"Details about the pending safety check.","nullable":true}},"type":"object","required":["id"],"description":"A pending safety check for the computer call."},"ReasoningItem":{"type":"object","description":"A description of the chain of thought used by a reasoning model while generating a response.\nInclude these items in your input for subsequent turns if you are manually managing context.\n","title":"Reasoning","properties":{"type":{"type":"string","description":"The type of the object. Always `reasoning`.\n","enum":["reasoning"],"default":"reasoning"},"id":{"type":"string","description":"The unique identifier of the reasoning content.\n"},"encrypted_content":{"type":"string","description":"The encrypted content of the reasoning item - populated when a response is\ngenerated with `reasoning.encrypted_content` in the `include` parameter.\n","nullable":true},"summary":{"type":"array","description":"Reasoning summary content.\n","items":{"$ref":"#/components/schemas/Summary"}},"content":{"type":"array","description":"Reasoning text content.\n","items":{"$ref":"#/components/schemas/ReasoningTextContent"}},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","summary","type"]},"Summary":{"properties":{"type":{"type":"string","enum":["summary_text"],"description":"The type of the object. Always `summary_text`.","default":"summary_text"},"text":{"type":"string","description":"A summary of the reasoning output from the model so far."}},"type":"object","required":["type","text"],"title":"Summary text","description":"A summary text from the model."},"ReasoningTextContent":{"properties":{"type":{"type":"string","enum":["reasoning_text"],"description":"The type of the reasoning text. Always `reasoning_text`.","default":"reasoning_text"},"text":{"type":"string","description":"The reasoning text from the model."}},"type":"object","required":["type","text"],"title":"ReasoningTextContent","description":"Reasoning text from the model."},"ImageGenToolCall":{"type":"object","title":"Image generation call","description":"An image generation request made by the model.\n","properties":{"type":{"type":"string","enum":["image_generation_call"],"default":"image_generation_call","description":"The type of the image generation call. Always `image_generation_call`.\n"},"id":{"type":"string","description":"The unique ID of the image generation call.\n"},"status":{"type":"string","enum":["in_progress","completed","generating","failed"],"description":"The status of the image generation call.\n"},"result":{"type":"string","description":"The generated image encoded in base64.\n","nullable":true}},"required":["type","id","status","result"]},"CodeInterpreterToolCall":{"type":"object","title":"Code interpreter tool call","description":"A tool call to run code.\n","properties":{"type":{"type":"string","enum":["code_interpreter_call"],"default":"code_interpreter_call","description":"The type of the code interpreter tool call. Always `code_interpreter_call`.\n"},"id":{"type":"string","description":"The unique ID of the code interpreter tool call.\n"},"status":{"type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"description":"The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"},"container_id":{"type":"string","description":"The ID of the container used to run the code.\n"},"code":{"type":"string","description":"The code to run, or null if not available.\n","nullable":true},"outputs":{"type":"array","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CodeInterpreterOutputLogs"},{"$ref":"#/components/schemas/CodeInterpreterOutputImage"}]},"discriminator":{"propertyName":"type"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n","nullable":true}},"required":["type","id","status","container_id","code","outputs"]},"CodeInterpreterOutputLogs":{"properties":{"type":{"type":"string","enum":["logs"],"description":"The type of the output. Always `logs`.","default":"logs"},"logs":{"type":"string","description":"The logs output from the code interpreter."}},"type":"object","required":["type","logs"],"title":"Code interpreter output logs","description":"The logs output from the code interpreter."},"CodeInterpreterOutputImage":{"properties":{"type":{"type":"string","enum":["image"],"description":"The type of the output. Always `image`.","default":"image"},"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"type":"object","required":["type","url"],"title":"Code interpreter output image","description":"The image output from the code interpreter."},"LocalShellToolCall":{"type":"object","title":"Local shell call","description":"A tool call to run a command on the local shell.\n","properties":{"type":{"type":"string","enum":["local_shell_call"],"default":"local_shell_call","description":"The type of the local shell call. Always `local_shell_call`.\n"},"id":{"type":"string","description":"The unique ID of the local shell call.\n"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"action":{"$ref":"#/components/schemas/LocalShellExecAction"},"status":{"type":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the local shell call.\n"}},"required":["type","id","call_id","action","status"]},"LocalShellExecAction":{"properties":{"type":{"type":"string","enum":["exec"],"description":"The type of the local shell action. Always `exec`.","default":"exec"},"command":{"items":{"type":"string"},"type":"array","description":"The command to run."},"timeout_ms":{"type":"integer","nullable":true,"description":"Optional timeout in milliseconds for the command."},"working_directory":{"type":"string","nullable":true,"description":"Optional working directory to run the command in."},"env":{"additionalProperties":{"type":"string"},"type":"object","description":"Environment variables to set for the command."},"user":{"type":"string","nullable":true,"description":"Optional user to run the command as."}},"type":"object","required":["type","command","env"],"title":"Local shell exec action","description":"Execute a shell command on the server."},"FunctionShellCall":{"properties":{"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `shell_call`.","default":"shell_call"},"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the function shell tool call generated by the model."},"action":{"$ref":"#/components/schemas/FunctionShellAction","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/LocalShellCallStatus","description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","action","status"],"title":"Function shell tool call","description":"A tool call that executes one or more shell commands in a managed environment."},"FunctionShellAction":{"properties":{"commands":{"items":{"type":"string","description":"A list of commands to run."},"type":"array"},"timeout_ms":{"type":"integer","description":"Optional timeout in milliseconds for the commands.","nullable":true},"max_output_length":{"type":"integer","description":"Optional maximum number of characters to return from each command.","nullable":true}},"type":"object","required":["commands","timeout_ms","max_output_length"],"title":"Shell exec action","description":"Execute a shell command."},"LocalShellCallStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionShellCallOutput":{"properties":{"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the shell call output. Always `shell_call_output`.","default":"shell_call_output"},"id":{"type":"string","description":"The unique ID of the shell call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContent"},"type":"array","description":"An array of shell call output contents"},"max_output_length":{"type":"integer","description":"The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.","nullable":true},"created_by":{"type":"string"}},"type":"object","required":["type","id","call_id","output","max_output_length"],"title":"Shell call output","description":"The output of a shell tool call."},"FunctionShellCallOutputContent":{"properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"outcome":{"title":"Function shell call outcome","description":"Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcome"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcome"}]},"created_by":{"type":"string"}},"type":"object","required":["stdout","stderr","outcome"],"title":"Shell call output content","description":"The content of a shell call output."},"FunctionShellCallOutputTimeoutOutcome":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcome":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"Exit code from the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCall":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatus","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations applied via apply_patch.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperation"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperation"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperation"}]},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call that applies file diffs by creating, deleting, or updating files."},"ApplyPatchCallStatus":{"type":"string","enum":["in_progress","completed"]},"ApplyPatchCreateFileOperation":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"Create a new file with the provided diff.","default":"create_file"},"path":{"type":"string","description":"Path of the file to create."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction describing how to create a file via the apply_patch tool."},"ApplyPatchDeleteFileOperation":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"Delete the specified file.","default":"delete_file"},"path":{"type":"string","description":"Path of the file to delete."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction describing how to delete a file via the apply_patch tool."},"ApplyPatchUpdateFileOperation":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"Update an existing file with the provided diff.","default":"update_file"},"path":{"type":"string","description":"Path of the file to update."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction describing how to update a file via the apply_patch tool."},"ApplyPatchToolCallOutput":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatus","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","description":"Optional textual output returned by the apply patch tool.","nullable":true},"created_by":{"type":"string","description":"The ID of the entity that created this tool call output."}},"type":"object","required":["type","id","call_id","status"],"title":"Apply patch tool call output","description":"The output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatus":{"type":"string","enum":["completed","failed"]},"MCPToolCall":{"type":"object","title":"MCP tool call","description":"An invocation of a tool on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_call"],"default":"mcp_call","description":"The type of the item. Always `mcp_call`.\n"},"id":{"type":"string","description":"The unique ID of the tool call.\n"},"server_label":{"type":"string","description":"The label of the MCP server running the tool.\n"},"name":{"type":"string","description":"The name of the tool that was run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool.\n"},"output":{"type":"string","description":"The output from the tool call.\n","nullable":true},"error":{"type":"string","description":"The error from the tool call, if any.\n","nullable":true},"status":{"$ref":"#/components/schemas/MCPToolCallStatus","description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"},"approval_request_id":{"type":"string","description":"Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n","nullable":true}},"required":["type","id","server_label","name","arguments"]},"MCPToolCallStatus":{"type":"string","enum":["in_progress","completed","incomplete","calling","failed"]},"MCPListTools":{"type":"object","title":"MCP list tools","description":"A list of tools available on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_list_tools"],"default":"mcp_list_tools","description":"The type of the item. Always `mcp_list_tools`.\n"},"id":{"type":"string","description":"The unique ID of the list.\n"},"server_label":{"type":"string","description":"The label of the MCP server.\n"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/MCPListToolsTool"},"description":"The tools available on the server.\n"},"error":{"type":"string","description":"Error message if the server could not list tools.\n","nullable":true}},"required":["type","id","server_label","tools"]},"MCPListToolsTool":{"type":"object","title":"MCP list tools tool","description":"A tool available on an MCP server.\n","properties":{"name":{"type":"string","description":"The name of the tool.\n"},"description":{"type":"string","description":"The description of the tool.\n","nullable":true},"input_schema":{"type":"object","description":"The JSON schema describing the tool's input.\n"},"annotations":{"type":"object","description":"Additional annotations about the tool.\n","nullable":true}},"required":["name","input_schema"]},"MCPApprovalRequest":{"type":"object","title":"MCP approval request","description":"A request for human approval of a tool invocation.\n","properties":{"type":{"type":"string","enum":["mcp_approval_request"],"default":"mcp_approval_request","description":"The type of the item. Always `mcp_approval_request`.\n"},"id":{"type":"string","description":"The unique ID of the approval request.\n"},"server_label":{"type":"string","description":"The label of the MCP server making the request.\n"},"name":{"type":"string","description":"The name of the tool to run.\n"},"arguments":{"type":"string","description":"A JSON string of arguments for the tool.\n"}},"required":["type","id","server_label","name","arguments"]},"CustomToolCall":{"type":"object","title":"Custom tool call","description":"A call to a custom tool created by the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call"],"default":"custom_tool_call","description":"The type of the custom tool call. Always `custom_tool_call`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call in the platform.\n"},"call_id":{"type":"string","description":"An identifier used to map this custom tool call to a tool call output.\n"},"name":{"type":"string","description":"The name of the custom tool being called.\n"},"input":{"type":"string","description":"The input for the custom tool call generated by the model.\n"}},"required":["type","call_id","name","input"]},"InputItem":{"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/EasyInputMessage"},{"$ref":"#/components/schemas/Item"},{"$ref":"#/components/schemas/ItemReferenceParam"}]},"EasyInputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n","properties":{"role":{"type":"string","description":"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n","enum":["user","assistant","system","developer"]},"content":{"description":"Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n","anyOf":[{"type":"string","title":"Text input","description":"A text input to the model.\n"},{"$ref":"#/components/schemas/InputMessageContentList"}]},"type":{"type":"string","description":"The type of the message input. Always `message`.\n","enum":["message"],"default":"message"}},"required":["role","content"]},"InputMessageContentList":{"type":"array","title":"Input item content list","description":"A list of one or many input items to the model, containing different content \ntypes.\n","items":{"$ref":"#/components/schemas/InputContent"}},"InputContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"Item":{"type":"object","description":"Content item used to generate a response.\n","discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/responses_InputMessage"},{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ComputerCallOutputItemParam"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/FunctionCallOutputItemParam"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/CompactionSummaryItemParam"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/LocalShellToolCallOutput"},{"$ref":"#/components/schemas/FunctionShellCallItemParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutputItemParam"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/MCPApprovalResponse"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/CustomToolCallOutput"},{"$ref":"#/components/schemas/CustomToolCall"}]},"responses_InputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n","properties":{"type":{"type":"string","description":"The type of the message input. Always set to `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the message input. One of `user`, `system`, or `developer`.\n","enum":["user","system","developer"]},"status":{"type":"string","description":"The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]},"content":{"$ref":"#/components/schemas/InputMessageContentList"}},"required":["role","content"]},"ComputerCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The ID of the computer tool call output.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The ID of the computer tool call that produced the output."},"type":{"type":"string","enum":["computer_call_output"],"description":"The type of the computer tool call output. Always `computer_call_output`.","default":"computer_call_output"},"output":{"$ref":"#/components/schemas/ComputerScreenshotImage"},"acknowledged_safety_checks":{"items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"type":"array","description":"The safety checks reported by the API that have been acknowledged by the developer.","nullable":true},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Computer tool call output","description":"The output of a computer tool call."},"ComputerScreenshotImage":{"type":"object","description":"A computer screenshot image used with the computer use tool.\n","properties":{"type":{"type":"string","enum":["computer_screenshot"],"default":"computer_screenshot","description":"Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n"},"image_url":{"type":"string","description":"The URL of the screenshot image."},"file_id":{"type":"string","description":"The identifier of an uploaded file that contains the screenshot."}},"required":["type"]},"FunctionCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function tool call generated by the model."},"type":{"type":"string","enum":["function_call_output"],"description":"The type of the function tool call output. Always `function_call_output`.","default":"function_call_output"},"output":{"description":"Text, image, or file output of the function tool call.","anyOf":[{"type":"string","maxLength":10485760,"description":"A JSON string of the output of the function tool call."},{"items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContentParam"},{"$ref":"#/components/schemas/InputImageContentParamAutoParam"},{"$ref":"#/components/schemas/InputFileContentParam"}]},"type":"array"}]},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function tool call output","description":"The output of a function tool call."},"InputTextContentParam":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","maxLength":10485760,"description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContentParamAutoParam":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","maxLength":20971520,"nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/DetailEnum","nullable":true,"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type"],"title":"Input image","description":"An image input to the model."},"DetailEnum":{"type":"string","enum":["low","high","auto"]},"InputFileContentParam":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","nullable":true,"description":"The name of the file to be sent to the model."},"file_data":{"type":"string","maxLength":33554432,"nullable":true,"description":"The base64-encoded data of the file to be sent to the model."},"file_url":{"type":"string","nullable":true,"description":"The URL of the file to be sent to the model."}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"CompactionSummaryItemParam":{"properties":{"id":{"type":"string","description":"The ID of the compaction item.","nullable":true},"type":{"type":"string","enum":["compaction"],"description":"The type of the item. Always `compaction`.","default":"compaction"},"encrypted_content":{"type":"string","maxLength":10485760}},"type":"object","required":["type","encrypted_content"],"title":"Compaction item","description":"A compaction item generated by the `v1/responses/compact` API."},"LocalShellToolCallOutput":{"type":"object","title":"Local shell call output","description":"The output of a local shell tool call.\n","properties":{"type":{"type":"string","enum":["local_shell_call_output"],"default":"local_shell_call_output","description":"The type of the local shell tool call output. Always `local_shell_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"output":{"type":"string","description":"A JSON string of the output of the local shell tool call.\n"},"status":{"ype":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n","nullable":true}},"required":["id","type","call_id","output"]},"FunctionShellCallItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `function_shell_call`.","default":"shell_call"},"action":{"$ref":"#/components/schemas/FunctionShellActionParam","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/FunctionShellCallItemStatus","nullable":true}},"type":"object","required":["call_id","type","action"],"title":"Function shell tool call","description":"A tool representing a request to execute one or more shell commands."},"FunctionShellActionParam":{"properties":{"commands":{"items":{"type":"string"},"type":"array","description":"Ordered shell commands for the execution environment to run."},"timeout_ms":{"type":"integer","description":"Maximum wall-clock time in milliseconds to allow the shell commands to run.","nullable":true},"max_output_length":{"type":"integer","description":"Maximum number of UTF-8 characters to capture from combined stdout and stderr output.","nullable":true}},"type":"object","required":["commands"],"title":"Function shell action","description":"Commands and limits describing how to run the function shell tool call."},"FunctionShellCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"],"title":"Function shell call status","description":"Status values reported for function shell tool calls."},"FunctionShellCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the item. Always `function_shell_call_output`.","default":"shell_call_output"},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContentParam"},"type":"array","description":"Captured chunks of stdout and stderr output, along with their associated outcomes."},"max_output_length":{"type":"integer","description":"The maximum number of UTF-8 characters captured for this shell call's combined output.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function shell tool call output","description":"The streamed output items emitted by a function shell tool call."},"FunctionShellCallOutputContentParam":{"properties":{"stdout":{"type":"string","maxLength":10485760,"description":"Captured stdout output for this chunk of the shell call."},"stderr":{"type":"string","maxLength":10485760,"description":"Captured stderr output for this chunk of the shell call."},"outcome":{"$ref":"#/components/schemas/FunctionShellCallOutputOutcomeParam","description":"The exit or timeout outcome associated with this chunk."}},"type":"object","required":["stdout","stderr","outcome"],"title":"Function shell output chunk","description":"Captured stdout and stderr for a portion of a function shell tool call output."},"FunctionShellCallOutputOutcomeParam":{"title":"Function shell call outcome","description":"The exit or timeout outcome associated with this chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcomeParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcomeParam"}]},"FunctionShellCallOutputTimeoutOutcomeParam":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcomeParam":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"The exit code returned by the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCallItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatusParam","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"$ref":"#/components/schemas/ApplyPatchOperationParam","description":"The specific create, delete, or update instruction for the apply_patch tool call."}},"type":"object","required":["type","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call representing a request to create, delete, or update files using diff patches."},"ApplyPatchCallStatusParam":{"type":"string","enum":["in_progress","completed"],"title":"Apply patch call status","description":"Status values reported for apply_patch tool calls."},"ApplyPatchOperationParam":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperationParam"}]},"ApplyPatchCreateFileOperationParam":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"The operation type. Always `create_file`.","default":"create_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to create relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply when creating the file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction for creating a new file via the apply_patch tool."},"ApplyPatchDeleteFileOperationParam":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"The operation type. Always `delete_file`.","default":"delete_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to delete relative to the workspace root."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction for deleting an existing file via the apply_patch tool."},"ApplyPatchUpdateFileOperationParam":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"The operation type. Always `update_file`.","default":"update_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to update relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply to the existing file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction for updating an existing file via the apply_patch tool."},"ApplyPatchToolCallOutputItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatusParam","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","maxLength":10485760,"description":"Optional human-readable log text from the apply patch tool (e.g., patch results or errors).","nullable":true}},"type":"object","required":["type","call_id","status"],"title":"Apply patch tool call output","description":"The streamed output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatusParam":{"type":"string","enum":["completed","failed"],"title":"Apply patch call output status","description":"Outcome values reported for apply_patch tool call outputs."},"MCPApprovalResponse":{"type":"object","title":"MCP approval response","description":"A response to an MCP approval request.\n","properties":{"type":{"type":"string","enum":["mcp_approval_response"],"default":"mcp_approval_response","description":"The type of the item. Always `mcp_approval_response`.\n"},"id":{"type":"string","description":"The unique ID of the approval response\n","nullable":true},"approval_request_id":{"type":"string","description":"The ID of the approval request being answered.\n"},"approve":{"type":"boolean","description":"Whether the request was approved.\n"},"reason":{"type":"string","description":"Optional reason for the decision.\n","nullable":true}},"required":["type","request_id","approve","approval_request_id"]},"CustomToolCallOutput":{"type":"object","title":"Custom tool call output","description":"The output of a custom tool call from your code, being sent back to the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call_output"],"default":"custom_tool_call_output","description":"The type of the custom tool call output. Always `custom_tool_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call output in the platform.\n"},"call_id":{"type":"string","description":"The call ID, used to map this custom tool call output to a custom tool call.\n"},"output":{"description":"The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n","anyOf":[{"type":"string","description":"A string of the output of the custom tool call.\n","title":"string output"},{"type":"array","items":{"$ref":"#/components/schemas/FunctionAndCustomToolCallOutput"},"title":"output content list","description":"Text, image, or file output of the custom tool call.\n"}]}},"required":["type","call_id","output"]},"FunctionAndCustomToolCallOutput":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"ItemReferenceParam":{"properties":{"type":{"type":"string","nullable":true,"enum":["item_reference"],"description":"The type of item to reference. Always `item_reference`.","default":"item_reference"},"id":{"type":"string","description":"The ID of the item to reference."}},"type":"object","required":["id"],"title":"Item reference","description":"An internal identifier for an item to reference."},"ResponseUsage":{"type":"object","description":"Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.\n","properties":{"input_tokens":{"type":"integer","description":"The number of input tokens."},"input_tokens_details":{"type":"object","description":"A detailed breakdown of the input tokens.","properties":{"cached_tokens":{"type":"integer","description":"The number of tokens retrieved from cache. See prompt caching for details.\n"},"cache_write_tokens":{"type":"integer","description":"The number of tokens written to cache. Nexos extension.\n"}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","description":"The number of output tokens."},"output_tokens_details":{"type":"object","description":"A detailed breakdown of the output tokens.","properties":{"reasoning_tokens":{"type":"integer","description":"The number of reasoning tokens."}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","description":"The total number of tokens used."},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]},"Conversation-2":{"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"type":"object","required":["id"],"title":"Conversation","description":"The conversation that this response belongs to. Input items and output items from this response are automatically added to this conversation."}}},"paths":{"/v1/responses/{response_id}":{"get":{"operationId":"getResponse","tags":["Responses"],"summary":"Get a model response","parameters":[{"in":"path","name":"response_id","required":true,"schema":{"type":"string"},"description":"The ID of the response to retrieve."},{"in":"query","name":"include","schema":{"type":"array","items":{"$ref":"#/components/schemas/IncludeEnum"}},"description":"Additional fields to include in the response. See the `include`\nparameter for Response creation above for more information.\n"},{"in":"query","name":"stream","schema":{"type":"boolean"},"description":"If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n"},{"in":"query","name":"starting_after","schema":{"type":"integer"},"description":"The sequence number of the event after which to start streaming.\n"},{"in":"query","name":"include_obfuscation","schema":{"type":"boolean"},"description":"When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events\nto normalize payload sizes as a mitigation to certain side-channel\nattacks. These obfuscation fields are included by default, but add a\nsmall amount of overhead to the data stream.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}},"description":"Retrieves a model response with the given ID.\n"}}}}
````

## Delete a model response

> Deletes a model response with the given ID.<br>

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Responses","description":"Create and manage model responses."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: nexos-...` for a user key or `X-Api-Key: nexos-team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"Error":{"type":"object","description":"Error details. Two shapes occur: gateway-generated errors carry a numeric nexos error `code` and a `message` (no `type`/`param`); errors passed through from an upstream provider follow the provider's own schema (for OpenAI: string `code`, `message`, `param`, `type`) and the response body additionally carries a top-level `provider` field identifying the provider.\n","properties":{"code":{"description":"Nexos numeric error code (gateway errors) or provider error code (passthrough errors).","oneOf":[{"type":"string","nullable":true},{"type":"integer"}]},"message":{"type":"string"},"param":{"type":"string","nullable":true,"description":"Present only on provider-passthrough errors."},"type":{"type":"string","description":"Present only on provider-passthrough errors."}},"required":["message"]}}},"paths":{"/v1/responses/{response_id}":{"delete":{"operationId":"deleteResponse","tags":["Responses"],"summary":"Delete a model response","parameters":[{"in":"path","name":"response_id","required":true,"schema":{"type":"string"},"description":"The ID of the response to delete."}],"responses":{"200":{"description":"OK"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Deletes a model response with the given ID.\n"}}}}
```

## List input items

> Returns a list of input items for a given response.

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Responses","description":"Create and manage model responses."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: nexos-...` for a user key or `X-Api-Key: nexos-team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"IncludeEnum":{"type":"string","enum":["file_search_call.results","web_search_call.results","web_search_call.action.sources","message.input_image.image_url","computer_call_output.output.image_url","code_interpreter_call.outputs","reasoning.encrypted_content","message.output_text.logprobs"],"description":"Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program)."},"ResponseItemList":{"type":"object","description":"A list of Response items.","properties":{"object":{"description":"The type of object returned, must be `list`.","const":"list"},"data":{"type":"array","description":"A list of items used to generate this response.","items":{"$ref":"#/components/schemas/ItemResource"}},"has_more":{"type":"boolean","description":"Whether there are more items available."},"first_id":{"type":"string","description":"The ID of the first item in the list."},"last_id":{"type":"string","description":"The ID of the last item in the list."}},"required":["object","data","has_more","first_id","last_id"]},"ItemResource":{"description":"Content item used to generate a response.\n","discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/InputMessageResource"},{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ComputerToolCallOutputResource"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCallResource"},{"$ref":"#/components/schemas/FunctionToolCallOutputResource"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/LocalShellToolCallOutput"},{"$ref":"#/components/schemas/FunctionShellCall"},{"$ref":"#/components/schemas/FunctionShellCallOutput"},{"$ref":"#/components/schemas/ApplyPatchToolCall"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutput"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/MCPApprovalResponseResource"},{"$ref":"#/components/schemas/MCPToolCall"}]},"InputMessageResource":{"allOf":[{"$ref":"#/components/schemas/responses_InputMessage"},{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the message input.\n"}},"required":["id"]}]},"responses_InputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n","properties":{"type":{"type":"string","description":"The type of the message input. Always set to `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the message input. One of `user`, `system`, or `developer`.\n","enum":["user","system","developer"]},"status":{"type":"string","description":"The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]},"content":{"$ref":"#/components/schemas/InputMessageContentList"}},"required":["role","content"]},"InputMessageContentList":{"type":"array","title":"Input item content list","description":"A list of one or many input items to the model, containing different content \ntypes.\n","items":{"$ref":"#/components/schemas/InputContent"}},"InputContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"InputTextContent":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContent":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/ImageDetail","description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type","detail"],"title":"Input image","description":"An image input to the model. See the vision guide for details."},"ImageDetail":{"type":"string","enum":["low","high","auto"]},"InputFileContent":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","description":"The name of the file to be sent to the model."},"file_url":{"type":"string","description":"The URL of the file to be sent to the model."},"file_data":{"type":"string","description":"The content of the file to be sent to the model.\n"}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"OutputMessage":{"type":"object","title":"Output message","description":"An output message from the model.\n","properties":{"id":{"type":"string","description":"The unique ID of the output message.\n"},"type":{"type":"string","description":"The type of the output message. Always `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the output message. Always `assistant`.\n","enum":["assistant"]},"content":{"type":"array","description":"The content of the output message.\n","items":{"$ref":"#/components/schemas/OutputMessageContent"}},"status":{"type":"string","description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","type","role","content","status"]},"OutputMessageContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"}]},"OutputTextContent":{"properties":{"type":{"type":"string","enum":["output_text"],"description":"The type of the output text. Always `output_text`.","default":"output_text"},"text":{"type":"string","description":"The text output from the model."},"annotations":{"items":{"$ref":"#/components/schemas/responses_Annotation"},"type":"array","description":"The annotations of the text output."},"logprobs":{"items":{"$ref":"#/components/schemas/LogProb"},"type":"array"}},"type":"object","required":["type","text","annotations"],"title":"Output text","description":"A text output from the model."},"responses_Annotation":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FileCitationBody"},{"$ref":"#/components/schemas/UrlCitationBody"},{"$ref":"#/components/schemas/ContainerFileCitationBody"},{"$ref":"#/components/schemas/FilePath"}]},"FileCitationBody":{"properties":{"type":{"type":"string","enum":["file_citation"],"description":"The type of the file citation. Always `file_citation`.","default":"file_citation"},"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","description":"The index of the file in the list of files."},"filename":{"type":"string","description":"The filename of the file cited."}},"type":"object","required":["type","file_id","index","filename"],"title":"File citation","description":"A citation to a file."},"UrlCitationBody":{"properties":{"type":{"type":"string","enum":["url_citation"],"description":"The type of the URL citation. Always `url_citation`.","default":"url_citation"},"url":{"type":"string","description":"The URL of the web resource."},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message."},"title":{"type":"string","description":"The title of the web resource."}},"type":"object","required":["type","url","start_index","end_index","title"],"title":"URL citation","description":"A citation for a web resource used to generate a model response."},"ContainerFileCitationBody":{"properties":{"type":{"type":"string","enum":["container_file_citation"],"description":"The type of the container file citation. Always `container_file_citation`.","default":"container_file_citation"},"container_id":{"type":"string","description":"The ID of the container file."},"file_id":{"type":"string","description":"The ID of the file."},"start_index":{"type":"integer","description":"The index of the first character of the container file citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the container file citation in the message."},"filename":{"type":"string","description":"The filename of the container file cited."}},"type":"object","required":["type","container_id","file_id","start_index","end_index","filename"],"title":"Container file citation","description":"A citation for a container file used to generate a model response."},"FilePath":{"type":"object","title":"File path","description":"A path to a file.\n","properties":{"type":{"type":"string","description":"The type of the file path. Always `file_path`.\n","enum":["file_path"]},"file_id":{"type":"string","description":"The ID of the file.\n"},"index":{"type":"integer","description":"The index of the file in the list of files.\n"}},"required":["type","file_id","index"]},"LogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"},"top_logprobs":{"items":{"$ref":"#/components/schemas/TopLogProb"},"type":"array"}},"type":"object","required":["token","logprob","bytes","top_logprobs"],"title":"Log probability","description":"The log probability of a token."},"TopLogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"}},"type":"object","required":["token","logprob","bytes"],"title":"Top log probability","description":"The top log probability of a token."},"RefusalContent":{"properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the refusal. Always `refusal`.","default":"refusal"},"refusal":{"type":"string","description":"The refusal explanation from the model."}},"type":"object","required":["type","refusal"],"title":"Refusal","description":"A refusal from the model."},"FileSearchToolCall":{"type":"object","title":"File search tool call","description":"The results of a file search tool call. See the file search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the file search tool call.\n"},"type":{"type":"string","enum":["file_search_call"],"default":"file_search_call","description":"The type of the file search tool call. Always `file_search_call`.\n"},"status":{"type":"string","description":"The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n","enum":["in_progress","searching","completed","incomplete","failed"]},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files.\n"},"results":{"type":"array","description":"The results of the file search tool call.\n","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The unique ID of the file.\n"},"text":{"type":"string","description":"The text that was retrieved from the file.\n"},"filename":{"type":"string","description":"The name of the file.\n"},"attributes":{"$ref":"#/components/schemas/VectorStoreFileAttributes"},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1.\n"}}},"nullable":true}}},"VectorStoreFileAttributes":{"type":"object","nullable":true,"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n","maxProperties":16,"propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"ComputerToolCall":{"type":"object","title":"Computer tool call","description":"A tool call to a computer use tool. See the computer use guide for more information.\n","properties":{"type":{"type":"string","description":"The type of the computer call. Always `computer_call`.","enum":["computer_call"],"default":"computer_call"},"id":{"type":"string","description":"The unique ID of the computer call."},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output.\n"},"action":{"$ref":"#/components/schemas/ComputerAction"},"pending_safety_checks":{"type":"array","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","id","action","call_id","pending_safety_checks","status"]},"ComputerAction":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ClickParam"},{"$ref":"#/components/schemas/DoubleClickAction"},{"$ref":"#/components/schemas/Drag"},{"$ref":"#/components/schemas/KeyPressAction"},{"$ref":"#/components/schemas/Move"},{"$ref":"#/components/schemas/Screenshot"},{"$ref":"#/components/schemas/Scroll"},{"$ref":"#/components/schemas/Type"},{"$ref":"#/components/schemas/Wait"}]},"ClickParam":{"properties":{"type":{"type":"string","enum":["click"],"description":"Specifies the event type. For a click action, this property is always `click`.","default":"click"},"button":{"$ref":"#/components/schemas/ClickButtonType","description":"Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."},"x":{"type":"integer","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","description":"The y-coordinate where the click occurred."}},"type":"object","required":["type","button","x","y"],"title":"Click","description":"A click action."},"ClickButtonType":{"type":"string","enum":["left","right","wheel","back","forward"]},"DoubleClickAction":{"properties":{"type":{"type":"string","enum":["double_click"],"description":"Specifies the event type. For a double click action, this property is always set to `double_click`.","default":"double_click"},"x":{"type":"integer","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","description":"The y-coordinate where the double click occurred."}},"type":"object","required":["type","x","y"],"title":"DoubleClick","description":"A double click action."},"Drag":{"type":"object","title":"Drag","description":"A drag action.\n","properties":{"type":{"type":"string","enum":["drag"],"default":"drag","description":"Specifies the event type. For a drag action, this property is \nalways set to `drag`.\n"},"path":{"type":"array","description":"An array of coordinates representing the path of the drag action. Coordinates will appear as an array\nof objects, eg\n```\n[\n  { x: 100, y: 200 },\n  { x: 200, y: 300 }\n]\n```\n","items":{"$ref":"#/components/schemas/DragPoint"}}},"required":["type","path"]},"DragPoint":{"properties":{"x":{"type":"integer","description":"The x-coordinate."},"y":{"type":"integer","description":"The y-coordinate."}},"type":"object","required":["x","y"],"title":"Coordinate","description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."},"KeyPressAction":{"properties":{"type":{"type":"string","enum":["keypress"],"description":"Specifies the event type. For a keypress action, this property is always set to `keypress`.","default":"keypress"},"keys":{"items":{"type":"string","description":"One of the keys the model is requesting to be pressed."},"type":"array","description":"The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key."}},"type":"object","required":["type","keys"],"title":"KeyPress","description":"A collection of keypresses the model would like to perform."},"Move":{"type":"object","title":"Move","description":"A mouse move action.\n","properties":{"type":{"type":"string","enum":["move"],"default":"move","description":"Specifies the event type. For a move action, this property is \nalways set to `move`.\n"},"x":{"type":"integer","description":"The x-coordinate to move to.\n"},"y":{"type":"integer","description":"The y-coordinate to move to.\n"}},"required":["type","x","y"]},"Screenshot":{"type":"object","title":"Screenshot","description":"A screenshot action.\n","properties":{"type":{"type":"string","enum":["screenshot"],"default":"screenshot","description":"Specifies the event type. For a screenshot action, this property is \nalways set to `screenshot`.\n"}},"required":["type"]},"Scroll":{"type":"object","title":"Scroll","description":"A scroll action.\n","properties":{"type":{"type":"string","enum":["scroll"],"default":"scroll","description":"Specifies the event type. For a scroll action, this property is \nalways set to `scroll`.\n"},"x":{"type":"integer","description":"The x-coordinate where the scroll occurred.\n"},"y":{"type":"integer","description":"The y-coordinate where the scroll occurred.\n"},"scroll_x":{"type":"integer","description":"The horizontal scroll distance.\n"},"scroll_y":{"type":"integer","description":"The vertical scroll distance.\n"}},"required":["type","x","y","scroll_x","scroll_y"]},"Type":{"type":"object","title":"Type","description":"An action to type in text.\n","properties":{"type":{"type":"string","enum":["type"],"default":"type","description":"Specifies the event type. For a type action, this property is \nalways set to `type`.\n"},"text":{"type":"string","description":"The text to type.\n"}},"required":["type","text"]},"Wait":{"type":"object","title":"Wait","description":"A wait action.\n","properties":{"type":{"type":"string","enum":["wait"],"default":"wait","description":"Specifies the event type. For a wait action, this property is \nalways set to `wait`.\n"}},"required":["type"]},"ComputerCallSafetyCheckParam":{"properties":{"id":{"type":"string","description":"The ID of the pending safety check."},"code":{"type":"string","description":"The type of the pending safety check.","nullable":true},"message":{"type":"string","description":"Details about the pending safety check.","nullable":true}},"type":"object","required":["id"],"description":"A pending safety check for the computer call."},"ComputerToolCallOutputResource":{"allOf":[{"$ref":"#/components/schemas/ComputerToolCallOutput"},{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the computer call tool output.\n"}},"required":["id"]}]},"ComputerToolCallOutput":{"type":"object","title":"Computer tool call output","description":"The output of a computer tool call.\n","properties":{"type":{"type":"string","description":"The type of the computer tool call output. Always `computer_call_output`.\n","enum":["computer_call_output"],"default":"computer_call_output"},"id":{"type":"string","description":"The ID of the computer tool call output.\n"},"call_id":{"type":"string","description":"The ID of the computer tool call that produced the output.\n"},"acknowledged_safety_checks":{"type":"array","description":"The safety checks reported by the API that have been acknowledged by the\ndeveloper.\n","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"}},"output":{"$ref":"#/components/schemas/ComputerScreenshotImage"},"status":{"type":"string","description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","output"]},"ComputerScreenshotImage":{"type":"object","description":"A computer screenshot image used with the computer use tool.\n","properties":{"type":{"type":"string","enum":["computer_screenshot"],"default":"computer_screenshot","description":"Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n"},"image_url":{"type":"string","description":"The URL of the screenshot image."},"file_id":{"type":"string","description":"The identifier of an uploaded file that contains the screenshot."}},"required":["type"]},"WebSearchToolCall":{"type":"object","title":"Web search tool call","description":"The results of a web search tool call. See the web search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the web search tool call.\n"},"type":{"type":"string","enum":["web_search_call"],"default":"web_search_call","description":"The type of the web search tool call. Always `web_search_call`.\n"},"status":{"type":"string","description":"The status of the web search tool call.\n","enum":["in_progress","searching","completed","failed"]},"action":{"type":"object","description":"An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find).\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/WebSearchActionSearch"},{"$ref":"#/components/schemas/WebSearchActionOpenPage"},{"$ref":"#/components/schemas/WebSearchActionFind"}]}},"required":["id","type","status","action"]},"WebSearchActionSearch":{"type":"object","title":"Search action","description":"Action type \"search\" - Performs a web search query.\n","properties":{"type":{"type":"string","enum":["search"],"description":"The action type.\n"},"query":{"type":"string","description":"The search query.\n"},"sources":{"type":"array","title":"Web search sources","description":"The sources used in the search.\n","items":{"type":"object","title":"Web search source","description":"A source used in the search.\n","properties":{"type":{"type":"string","enum":["url"],"description":"The type of source. Always `url`.\n"},"url":{"type":"string","description":"The URL of the source.\n"}},"required":["type","url"]}}},"required":["type","query"]},"WebSearchActionOpenPage":{"type":"object","title":"Open page action","description":"Action type \"open_page\" - Opens a specific URL from search results.\n","properties":{"type":{"type":"string","enum":["open_page"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL opened by the model.\n"}},"required":["type","url"]},"WebSearchActionFind":{"type":"object","title":"Find action","description":"Action type \"find\": Searches for a pattern within a loaded page.\n","properties":{"type":{"type":"string","enum":["find"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL of the page searched for the pattern.\n"},"pattern":{"type":"string","description":"The pattern or text to search for within the page.\n"}},"required":["type","url","pattern"]},"FunctionToolCallResource":{"allOf":[{"$ref":"#/components/schemas/FunctionToolCall"},{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the function tool call.\n"}},"required":["id"]}]},"FunctionToolCall":{"type":"object","title":"Function tool call","description":"A tool call to run a function. Used when the model requests your code to execute a function.\n","properties":{"id":{"type":"string","description":"The unique ID of the function tool call.\n"},"type":{"type":"string","enum":["function_call"],"default":"function_call","description":"The type of the function tool call. Always `function_call`.\n"},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model.\n"},"name":{"type":"string","description":"The name of the function to run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","name","arguments"]},"FunctionToolCallOutputResource":{"allOf":[{"$ref":"#/components/schemas/FunctionToolCallOutput"},{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the function call tool output.\n"}},"required":["id"]}]},"FunctionToolCallOutput":{"type":"object","title":"Function tool call output","description":"The output of a function tool call.\n","properties":{"id":{"type":"string","description":"The unique ID of the function tool call output. Populated when this item\nis returned via API.\n"},"type":{"type":"string","enum":["function_call_output"],"description":"The type of the function tool call output. Always `function_call_output`.\n"},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model.\n"},"output":{"description":"The output from the function call generated by your code.\nCan be a string or an list of output content.\n","anyOf":[{"type":"string","description":"A string of the output of the function call.\n","title":"string output"},{"type":"array","items":{"$ref":"#/components/schemas/FunctionAndCustomToolCallOutput"},"title":"output content list","description":"Text, image, or file output of the function call.\n"}]},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","output"]},"FunctionAndCustomToolCallOutput":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"ImageGenToolCall":{"type":"object","title":"Image generation call","description":"An image generation request made by the model.\n","properties":{"type":{"type":"string","enum":["image_generation_call"],"default":"image_generation_call","description":"The type of the image generation call. Always `image_generation_call`.\n"},"id":{"type":"string","description":"The unique ID of the image generation call.\n"},"status":{"type":"string","enum":["in_progress","completed","generating","failed"],"description":"The status of the image generation call.\n"},"result":{"type":"string","description":"The generated image encoded in base64.\n","nullable":true}},"required":["type","id","status","result"]},"CodeInterpreterToolCall":{"type":"object","title":"Code interpreter tool call","description":"A tool call to run code.\n","properties":{"type":{"type":"string","enum":["code_interpreter_call"],"default":"code_interpreter_call","description":"The type of the code interpreter tool call. Always `code_interpreter_call`.\n"},"id":{"type":"string","description":"The unique ID of the code interpreter tool call.\n"},"status":{"type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"description":"The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"},"container_id":{"type":"string","description":"The ID of the container used to run the code.\n"},"code":{"type":"string","description":"The code to run, or null if not available.\n","nullable":true},"outputs":{"type":"array","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CodeInterpreterOutputLogs"},{"$ref":"#/components/schemas/CodeInterpreterOutputImage"}]},"discriminator":{"propertyName":"type"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n","nullable":true}},"required":["type","id","status","container_id","code","outputs"]},"CodeInterpreterOutputLogs":{"properties":{"type":{"type":"string","enum":["logs"],"description":"The type of the output. Always `logs`.","default":"logs"},"logs":{"type":"string","description":"The logs output from the code interpreter."}},"type":"object","required":["type","logs"],"title":"Code interpreter output logs","description":"The logs output from the code interpreter."},"CodeInterpreterOutputImage":{"properties":{"type":{"type":"string","enum":["image"],"description":"The type of the output. Always `image`.","default":"image"},"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"type":"object","required":["type","url"],"title":"Code interpreter output image","description":"The image output from the code interpreter."},"LocalShellToolCall":{"type":"object","title":"Local shell call","description":"A tool call to run a command on the local shell.\n","properties":{"type":{"type":"string","enum":["local_shell_call"],"default":"local_shell_call","description":"The type of the local shell call. Always `local_shell_call`.\n"},"id":{"type":"string","description":"The unique ID of the local shell call.\n"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"action":{"$ref":"#/components/schemas/LocalShellExecAction"},"status":{"type":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the local shell call.\n"}},"required":["type","id","call_id","action","status"]},"LocalShellExecAction":{"properties":{"type":{"type":"string","enum":["exec"],"description":"The type of the local shell action. Always `exec`.","default":"exec"},"command":{"items":{"type":"string"},"type":"array","description":"The command to run."},"timeout_ms":{"type":"integer","nullable":true,"description":"Optional timeout in milliseconds for the command."},"working_directory":{"type":"string","nullable":true,"description":"Optional working directory to run the command in."},"env":{"additionalProperties":{"type":"string"},"type":"object","description":"Environment variables to set for the command."},"user":{"type":"string","nullable":true,"description":"Optional user to run the command as."}},"type":"object","required":["type","command","env"],"title":"Local shell exec action","description":"Execute a shell command on the server."},"LocalShellToolCallOutput":{"type":"object","title":"Local shell call output","description":"The output of a local shell tool call.\n","properties":{"type":{"type":"string","enum":["local_shell_call_output"],"default":"local_shell_call_output","description":"The type of the local shell tool call output. Always `local_shell_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"output":{"type":"string","description":"A JSON string of the output of the local shell tool call.\n"},"status":{"ype":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n","nullable":true}},"required":["id","type","call_id","output"]},"FunctionShellCall":{"properties":{"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `shell_call`.","default":"shell_call"},"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the function shell tool call generated by the model."},"action":{"$ref":"#/components/schemas/FunctionShellAction","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/LocalShellCallStatus","description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","action","status"],"title":"Function shell tool call","description":"A tool call that executes one or more shell commands in a managed environment."},"FunctionShellAction":{"properties":{"commands":{"items":{"type":"string","description":"A list of commands to run."},"type":"array"},"timeout_ms":{"type":"integer","description":"Optional timeout in milliseconds for the commands.","nullable":true},"max_output_length":{"type":"integer","description":"Optional maximum number of characters to return from each command.","nullable":true}},"type":"object","required":["commands","timeout_ms","max_output_length"],"title":"Shell exec action","description":"Execute a shell command."},"LocalShellCallStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionShellCallOutput":{"properties":{"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the shell call output. Always `shell_call_output`.","default":"shell_call_output"},"id":{"type":"string","description":"The unique ID of the shell call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContent"},"type":"array","description":"An array of shell call output contents"},"max_output_length":{"type":"integer","description":"The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.","nullable":true},"created_by":{"type":"string"}},"type":"object","required":["type","id","call_id","output","max_output_length"],"title":"Shell call output","description":"The output of a shell tool call."},"FunctionShellCallOutputContent":{"properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"outcome":{"title":"Function shell call outcome","description":"Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcome"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcome"}]},"created_by":{"type":"string"}},"type":"object","required":["stdout","stderr","outcome"],"title":"Shell call output content","description":"The content of a shell call output."},"FunctionShellCallOutputTimeoutOutcome":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcome":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"Exit code from the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCall":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatus","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations applied via apply_patch.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperation"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperation"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperation"}]},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call that applies file diffs by creating, deleting, or updating files."},"ApplyPatchCallStatus":{"type":"string","enum":["in_progress","completed"]},"ApplyPatchCreateFileOperation":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"Create a new file with the provided diff.","default":"create_file"},"path":{"type":"string","description":"Path of the file to create."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction describing how to create a file via the apply_patch tool."},"ApplyPatchDeleteFileOperation":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"Delete the specified file.","default":"delete_file"},"path":{"type":"string","description":"Path of the file to delete."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction describing how to delete a file via the apply_patch tool."},"ApplyPatchUpdateFileOperation":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"Update an existing file with the provided diff.","default":"update_file"},"path":{"type":"string","description":"Path of the file to update."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction describing how to update a file via the apply_patch tool."},"ApplyPatchToolCallOutput":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatus","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","description":"Optional textual output returned by the apply patch tool.","nullable":true},"created_by":{"type":"string","description":"The ID of the entity that created this tool call output."}},"type":"object","required":["type","id","call_id","status"],"title":"Apply patch tool call output","description":"The output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatus":{"type":"string","enum":["completed","failed"]},"MCPListTools":{"type":"object","title":"MCP list tools","description":"A list of tools available on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_list_tools"],"default":"mcp_list_tools","description":"The type of the item. Always `mcp_list_tools`.\n"},"id":{"type":"string","description":"The unique ID of the list.\n"},"server_label":{"type":"string","description":"The label of the MCP server.\n"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/MCPListToolsTool"},"description":"The tools available on the server.\n"},"error":{"type":"string","description":"Error message if the server could not list tools.\n","nullable":true}},"required":["type","id","server_label","tools"]},"MCPListToolsTool":{"type":"object","title":"MCP list tools tool","description":"A tool available on an MCP server.\n","properties":{"name":{"type":"string","description":"The name of the tool.\n"},"description":{"type":"string","description":"The description of the tool.\n","nullable":true},"input_schema":{"type":"object","description":"The JSON schema describing the tool's input.\n"},"annotations":{"type":"object","description":"Additional annotations about the tool.\n","nullable":true}},"required":["name","input_schema"]},"MCPApprovalRequest":{"type":"object","title":"MCP approval request","description":"A request for human approval of a tool invocation.\n","properties":{"type":{"type":"string","enum":["mcp_approval_request"],"default":"mcp_approval_request","description":"The type of the item. Always `mcp_approval_request`.\n"},"id":{"type":"string","description":"The unique ID of the approval request.\n"},"server_label":{"type":"string","description":"The label of the MCP server making the request.\n"},"name":{"type":"string","description":"The name of the tool to run.\n"},"arguments":{"type":"string","description":"A JSON string of arguments for the tool.\n"}},"required":["type","id","server_label","name","arguments"]},"MCPApprovalResponseResource":{"type":"object","title":"MCP approval response","description":"A response to an MCP approval request.\n","properties":{"type":{"type":"string","enum":["mcp_approval_response"],"description":"The type of the item. Always `mcp_approval_response`.\n"},"id":{"type":"string","description":"The unique ID of the approval response\n"},"approval_request_id":{"type":"string","description":"The ID of the approval request being answered.\n"},"approve":{"type":"boolean","description":"Whether the request was approved.\n"},"reason":{"type":"string","description":"Optional reason for the decision.\n","nullable":true}},"required":["type","id","request_id","approve","approval_request_id"]},"MCPToolCall":{"type":"object","title":"MCP tool call","description":"An invocation of a tool on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_call"],"default":"mcp_call","description":"The type of the item. Always `mcp_call`.\n"},"id":{"type":"string","description":"The unique ID of the tool call.\n"},"server_label":{"type":"string","description":"The label of the MCP server running the tool.\n"},"name":{"type":"string","description":"The name of the tool that was run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool.\n"},"output":{"type":"string","description":"The output from the tool call.\n","nullable":true},"error":{"type":"string","description":"The error from the tool call, if any.\n","nullable":true},"status":{"$ref":"#/components/schemas/MCPToolCallStatus","description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"},"approval_request_id":{"type":"string","description":"Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n","nullable":true}},"required":["type","id","server_label","name","arguments"]},"MCPToolCallStatus":{"type":"string","enum":["in_progress","completed","incomplete","calling","failed"]}}},"paths":{"/v1/responses/{response_id}/input_items":{"get":{"operationId":"listInputItems","tags":["Responses"],"summary":"List input items","parameters":[{"in":"path","name":"response_id","required":true,"schema":{"type":"string"},"description":"The ID of the response to retrieve input items for."},{"name":"limit","in":"query","description":"A limit on the number of objects to be returned. Limit can range between\n1 and 100, and the default is 20.\n","required":false,"schema":{"type":"integer","default":20}},{"in":"query","name":"order","schema":{"type":"string","enum":["asc","desc"]},"description":"The order to return the input items in. Default is `desc`.\n- `asc`: Return the input items in ascending order.\n- `desc`: Return the input items in descending order.\n"},{"in":"query","name":"after","schema":{"type":"string"},"description":"An item ID to list items after, used in pagination.\n"},{"in":"query","name":"include","schema":{"type":"array","items":{"$ref":"#/components/schemas/IncludeEnum"}},"description":"Additional fields to include in the response. See the `include`\nparameter for Response creation above for more information.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseItemList"}}}}},"description":"Returns a list of input items for a given response."}}}}
````

## Cancel a response

> Cancels a model response with the given ID. Only responses created with\
> the \`background\` parameter set to \`true\` can be cancelled.\
> \
> \*\*Note:\*\* background responses are temporarily disabled on the platform —\
> requests with \`background: true\` currently return error \`100101\`, so this\
> operation cannot be used until background responses are re-enabled.<br>

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Responses","description":"Create and manage model responses."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: nexos-...` for a user key or `X-Api-Key: nexos-team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"Response":{"title":"The response object","allOf":[{"$ref":"#/components/schemas/ModelResponseProperties"},{"$ref":"#/components/schemas/ResponseProperties"},{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this Response.\n"},"object":{"type":"string","description":"The object type of this resource - always set to `response`.\n","enum":["response"]},"status":{"type":"string","description":"The status of the response generation. One of `completed`, `failed`,\n`in_progress`, `cancelled`, `queued`, or `incomplete`.\n","enum":["completed","failed","in_progress","cancelled","queued","incomplete"]},"created_at":{"type":"number","description":"Unix timestamp (in seconds) of when this Response was created.\n"},"error":{"$ref":"#/components/schemas/ResponseError"},"incomplete_details":{"type":"object","description":"Details about why the response is incomplete.\n","properties":{"reason":{"type":"string","description":"The reason why the response is incomplete.","enum":["max_output_tokens","content_filter"]}},"nullable":true},"output":{"type":"array","description":"An array of content items generated by the model.\n\n- The length and order of items in the `output` array is dependent\n  on the model's response.\n- Rather than accessing the first item in the `output` array and\n  assuming it's an `assistant` message with the content generated by\n  the model, you might consider using the `output_text` property where\n  supported in SDKs.\n","items":{"$ref":"#/components/schemas/OutputItem"}},"instructions":{"description":"A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n","anyOf":[{"type":"string","description":"A text input to the model, equivalent to a text input with the\n`developer` role.\n"},{"type":"array","title":"Input item list","description":"A list of one or many input items to the model, containing\ndifferent content types.\n","items":{"$ref":"#/components/schemas/InputItem"}}],"nullable":true},"output_text":{"type":"string","description":"SDK-only convenience property that contains the aggregated text output\nfrom all `output_text` items in the `output` array, if any are present.\nSupported in the Python and JavaScript SDKs.\n","nullable":true},"usage":{"$ref":"#/components/schemas/ResponseUsage"},"parallel_tool_calls":{"type":"boolean","description":"Whether to allow the model to run tool calls in parallel.\n","default":true},"conversation":{"$ref":"#/components/schemas/Conversation-2","nullable":true},"provider":{"type":"string","description":"The upstream provider that served the request (e.g. `openai`). Nexos extension.\n"},"completed_at":{"type":"number","nullable":true,"description":"Unix timestamp (in seconds) of when the response generation completed.\nPassed through from the upstream provider.\n"},"store":{"type":"boolean","description":"Whether the response is stored for later retrieval. Echoed from the request\nby the upstream provider.\n"},"frequency_penalty":{"type":"number","nullable":true,"description":"Echoed by some upstream providers alongside the response.\n"},"presence_penalty":{"type":"number","nullable":true,"description":"Echoed by some upstream providers alongside the response.\n"},"moderation":{"type":"object","nullable":true,"description":"Moderation details passed through from the upstream provider, when available.\n"},"content_filters":{"type":"array","nullable":true,"description":"Content-filter annotations passed through from the upstream provider\n(returned by Azure-hosted models).\n","items":{"type":"object","properties":{"blocked":{"type":"boolean"},"source_type":{"type":"string"},"content_filter_raw":{"type":"array","items":{"type":"object"}},"content_filter_results":{"type":"object"},"content_filter_offsets":{"type":"object","properties":{"check_offset":{"type":"integer"},"start_offset":{"type":"integer"},"end_offset":{"type":"integer"}}}}}},"tool_usage":{"type":"object","nullable":true,"description":"Aggregated built-in tool usage for this response. Nexos extension.\n","properties":{"image_gen":{"type":"object","properties":{"input_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"output_tokens":{"type":"integer"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"total_tokens":{"type":"integer"}}},"web_search":{"type":"object","properties":{"num_requests":{"type":"integer"}}}}}},"required":["id","object","created_at","error","incomplete_details","instructions","model","tools","output","parallel_tool_calls","metadata","tool_choice","temperature","top_p"]}]},"ModelResponseProperties":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/responses_Metadata"},"top_logprobs":{"description":"An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n","type":"integer","minimum":0,"maximum":20,"nullable":true},"temperature":{"type":"number","minimum":0,"maximum":2,"default":1,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n","nullable":true},"top_p":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n","nullable":true},"user":{"type":"string","deprecated":true,"description":"Deprecated in favor of `safety_identifier` and `prompt_cache_key`; use `prompt_cache_key` to maintain caching. A stable end-user identifier to improve cache hit rates and help detect abuse.\n"},"safety_identifier":{"type":"string","description":"A stable identifier used to help detect users who may violate usage policies. Use a unique per-user string (e.g., a hash of username or email) to avoid sending identifying information.\n"},"prompt_cache_key":{"type":"string","description":"Used to cache responses for similar requests and improve cache hit rates. Replaces the `user` field.\n"},"service_tier":{"$ref":"#/components/schemas/ServiceTier"},"prompt_cache_retention":{"type":"string","enum":["in-memory","24h"],"description":"Retention policy for the prompt cache. Set to `24h` to keep cached prefixes active longer (up to 24 hours).\n","nullable":true}}},"responses_Metadata":{"type":"object","description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n","additionalProperties":{"type":"string"},"nullable":true},"ServiceTier":{"type":"string","description":"Specifies the processing tier for the request.\nThe response includes the actual tier used, which may differ from the requested value.\n","enum":["auto","default","flex","scale","priority"],"default":"auto","nullable":true},"ResponseProperties":{"type":"object","required":["model"],"properties":{"previous_response_id":{"type":"string","description":"The unique ID of the previous response to the model. Use this to create multi-turn conversations. Cannot be used with `conversation`.\n","nullable":true},"model":{"description":"Model ID used to generate the response (e.g., `gpt-4o` or `o3`). See your provider's model guide for available options.\n","type":"string"},"reasoning":{"$ref":"#/components/schemas/Reasoning","nullable":true},"background":{"type":"boolean","description":"Whether to run the model response in the background.\n","default":false,"nullable":true},"max_output_tokens":{"description":"An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.\n","type":"integer","nullable":true},"max_tool_calls":{"description":"The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n","type":"integer","nullable":true},"text":{"$ref":"#/components/schemas/ResponseTextParam"},"tools":{"$ref":"#/components/schemas/ToolsArray"},"tool_choice":{"$ref":"#/components/schemas/ToolChoiceParam"},"prompt":{"$ref":"#/components/schemas/Prompt"},"truncation":{"type":"string","description":"The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n  the model's context window size, the model will truncate the\n  response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n  size for a model, the request will fail with a 400 error.\n","enum":["auto","disabled"],"default":"disabled","nullable":true}}},"Reasoning":{"type":"object","description":"Configuration options for reasoning models. Applicable to gpt-5 and o-series models only.\n","title":"Reasoning","properties":{"effort":{"$ref":"#/components/schemas/ReasoningEffort"},"mode":{"type":"string","description":"Reasoning mode for models that support it. One of `standard` or `pro`.\n","enum":["standard","pro"]},"summary":{"type":"string","nullable":true,"description":"A summary of the model's reasoning.\nOne of `auto`, `concise`, or `detailed` (only `concise` is supported for `computer-use-preview`).\n","enum":["auto","concise","detailed"]},"generate_summary":{"type":"string","nullable":true,"deprecated":true,"description":"Deprecated: use `summary` instead.\nA summary of the model's reasoning. One of `auto`, `concise`, or `detailed`.\n","enum":["auto","concise","detailed"]}}},"ReasoningEffort":{"type":"string","nullable":true,"enum":["none","minimal","low","medium","high"],"default":"medium","description":"Controls how much reasoning effort the model uses. Lower settings are faster and use fewer tokens; higher settings provide more detailed reasoning.\n"},"ResponseTextParam":{"type":"object","description":"Configuration options for a text response. Supports plain text or structured JSON.\n","properties":{"format":{"$ref":"#/components/schemas/TextResponseFormatConfiguration"},"verbosity":{"$ref":"#/components/schemas/Verbosity"}}},"TextResponseFormatConfiguration":{"description":"Specifies the required output format. Use `type: json_schema` to enforce a schema; `type: text` is the default.\n","anyOf":[{"$ref":"#/components/schemas/responses_ResponseFormatText"},{"$ref":"#/components/schemas/TextResponseFormatJsonSchema"},{"$ref":"#/components/schemas/responses_ResponseFormatJsonObject"}],"discriminator":{"propertyName":"type"}},"responses_ResponseFormatText":{"type":"object","title":"Text","description":"Default response format. Used to generate text responses.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `text`.","enum":["text"]}},"required":["type"]},"TextResponseFormatJsonSchema":{"type":"object","title":"JSON schema","description":"JSON Schema response format used to generate structured JSON responses.\nLearn more in the Structured Outputs guide.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_schema`.","enum":["json_schema"]},"description":{"type":"string","description":"A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n"},"name":{"type":"string","description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n"},"schema":{"$ref":"#/components/schemas/responses_ResponseFormatJsonSchemaSchema"},"strict":{"type":"boolean","nullable":true,"default":false,"description":"Whether to enable strict schema adherence when generating the output.\nIf true, the model will follow the exact schema; only a subset of JSON Schema is supported.\n"}},"required":["type","schema","name"]},"responses_ResponseFormatJsonSchemaSchema":{"type":"object","title":"JSON schema","description":"The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n","additionalProperties":true},"responses_ResponseFormatJsonObject":{"type":"object","title":"JSON object","description":"JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_object`.","enum":["json_object"]}},"required":["type"]},"Verbosity":{"type":"string","nullable":true,"enum":["low","medium","high"],"default":"medium","description":"Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n"},"ToolsArray":{"type":"array","description":"An array of tools the model may call while generating a response. Categories include built-in tools, MCP tools, and custom function calls.\n","items":{"$ref":"#/components/schemas/responses_Tool"}},"responses_Tool":{"description":"A tool that can be used to generate a response.\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionTool"},{"$ref":"#/components/schemas/FileSearchTool"},{"$ref":"#/components/schemas/ComputerUsePreviewTool"},{"$ref":"#/components/schemas/WebSearchTool"},{"$ref":"#/components/schemas/MCPTool"},{"$ref":"#/components/schemas/CodeInterpreterTool"},{"$ref":"#/components/schemas/ImageGenTool"},{"$ref":"#/components/schemas/LocalShellToolParam"},{"$ref":"#/components/schemas/FunctionShellToolParam"},{"$ref":"#/components/schemas/CustomToolParam"},{"$ref":"#/components/schemas/WebSearchPreviewTool"},{"$ref":"#/components/schemas/ApplyPatchToolParam"}]},"FunctionTool":{"properties":{"type":{"type":"string","enum":["function"],"description":"The type of the function tool. Always `function`.","default":"function"},"name":{"type":"string","description":"The name of the function to call."},"description":{"type":"string","nullable":true,"description":"A description of the function. Used by the model to determine whether or not to call the function."},"parameters":{"type":"object","nullable":true,"additionalProperties":{},"description":"A JSON schema object describing the parameters of the function."},"strict":{"type":"boolean","nullable":true,"description":"Whether to enforce strict parameter validation. Default `true`."}},"type":"object","required":["type","name","strict","parameters"],"title":"Function","description":"Defines a function in your code that the model can call."},"FileSearchTool":{"properties":{"type":{"type":"string","enum":["file_search"],"description":"The type of the file search tool. Always `file_search`.","default":"file_search"},"vector_store_ids":{"items":{"type":"string"},"type":"array","description":"The IDs of the vector stores to search."},"max_num_results":{"type":"integer","description":"The maximum number of results to return. This number should be between 1 and 50 inclusive."},"ranking_options":{"$ref":"#/components/schemas/RankingOptions","description":"Ranking options for search."},"filters":{"$ref":"#/components/schemas/Filters","description":"A filter to apply.","nullable":true}},"type":"object","required":["type","vector_store_ids"],"title":"File search","description":"Searches uploaded files for relevant content. See the file search guide."},"RankingOptions":{"properties":{"ranker":{"$ref":"#/components/schemas/RankerVersionType","description":"The ranker to use for the file search."},"score_threshold":{"type":"number","description":"The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results."},"hybrid_search":{"$ref":"#/components/schemas/HybridSearchOptions","description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled."}},"type":"object","required":[]},"RankerVersionType":{"type":"string","enum":["auto","default-2024-11-15"]},"HybridSearchOptions":{"properties":{"embedding_weight":{"type":"number","description":"The weight of the embedding in the reciprocal ranking fusion."},"text_weight":{"type":"number","description":"The weight of the text in the reciprocal ranking fusion."}},"type":"object","required":["embedding_weight","text_weight"]},"Filters":{"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]},"ComparisonFilter":{"type":"object","additionalProperties":false,"title":"Comparison Filter","description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.\n","properties":{"type":{"type":"string","default":"eq","enum":["eq","ne","gt","gte","lt","lte"],"description":"Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.\n- `eq`: equals\n- `ne`: not equal\n- `gt`: greater than\n- `gte`: greater than or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `in`: in\n- `nin`: not in\n"},"key":{"type":"string","description":"The key to compare against the value."},"value":{"description":"The value to compare against the attribute key; supports string, number, or boolean types.","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"$ref":"#/components/schemas/ComparisonFilterValueItems"}}]}},"required":["type","key","value"]},"ComparisonFilterValueItems":{"anyOf":[{"type":"string"},{"type":"number"}]},"CompoundFilter":{"type":"object","additionalProperties":false,"title":"Compound Filter","description":"Combine multiple filters using `and` or `or`.","properties":{"type":{"type":"string","description":"Type of operation: `and` or `or`.","enum":["and","or"]},"filters":{"type":"array","description":"Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]}}},"required":["type","filters"]},"ComputerUsePreviewTool":{"properties":{"type":{"type":"string","enum":["computer_use_preview"],"description":"The type of the computer use tool. Always `computer_use_preview`.","default":"computer_use_preview"},"environment":{"$ref":"#/components/schemas/ComputerEnvironment","description":"The type of computer environment to control."},"display_width":{"type":"integer","description":"The width of the computer display."},"display_height":{"type":"integer","description":"The height of the computer display."}},"type":"object","required":["type","environment","display_width","display_height"],"title":"Computer use preview","description":"A tool that controls a virtual computer. Learn more in the computer tool guide."},"ComputerEnvironment":{"type":"string","enum":["windows","mac","linux","ubuntu","browser"]},"WebSearchTool":{"type":"object","title":"Web search","description":"Search the internet for sources related to the prompt. Learn more in the web search tool guide.\n","properties":{"type":{"type":"string","enum":["web_search","web_search_2025_08_26"],"description":"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.","default":"web_search"},"filters":{"type":"object","description":"Filters for the search.\n","properties":{"allowed_domains":{"type":"array","title":"Allowed domains for the search.","description":"Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well.\n\nExample: `[\"pubmed.ncbi.nlm.nih.gov\"]`\n","items":{"type":"string","description":"Allowed domain for the search."},"default":[],"nullable":true}},"nullable":true},"user_location":{"$ref":"#/components/schemas/WebSearchApproximateLocation"},"search_context_size":{"type":"string","enum":["low","medium","high"],"default":"medium","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"required":["type"]},"WebSearchApproximateLocation":{"type":"object","nullable":true,"title":"Web search approximate location","description":"The approximate location of the user.\n","properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","nullable":true,"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`."},"region":{"type":"string","nullable":true,"description":"Free text input for the region of the user, e.g. `California`."},"city":{"type":"string","nullable":true,"description":"Free text input for the city of the user, e.g. `San Francisco`."},"timezone":{"type":"string","nullable":true,"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`."}}},"MCPTool":{"type":"object","title":"MCP tool","description":"Give the model access to tools via remote Model Context Protocol (MCP) servers. Learn more in the MCP guide.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"The type of the MCP tool. Always `mcp`."},"server_label":{"type":"string","description":"A label for this MCP server, used to identify it in tool calls.\n"},"server_url":{"type":"string","description":"The URL for the MCP server. One of `server_url` or `connector_id` must be\nprovided.\n"},"connector_id":{"type":"string","enum":["connector_dropbox","connector_gmail","connector_googlecalendar","connector_googledrive","connector_microsoftteams","connector_outlookcalendar","connector_outlookemail","connector_sharepoint"],"description":"Identifier for service connectors, like those available in ChatGPT. One of\n`server_url` or `connector_id` must be provided.\n\nCurrently supported `connector_id` values are:\n\n- Dropbox: `connector_dropbox`\n- Gmail: `connector_gmail`\n- Google Calendar: `connector_googlecalendar`\n- Google Drive: `connector_googledrive`\n- Microsoft Teams: `connector_microsoftteams`\n- Outlook Calendar: `connector_outlookcalendar`\n- Outlook Email: `connector_outlookemail`\n- SharePoint: `connector_sharepoint`\n"},"authorization":{"type":"string","description":"An OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.\n"},"server_description":{"type":"string","description":"Optional description of the MCP server, used to provide more context.\n"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.\n","nullable":true},"allowed_tools":{"description":"List of allowed tool names or a filter object.\n","anyOf":[{"type":"array","title":"MCP allowed tools","description":"A string array of allowed tool names","items":{"type":"string"}},{"$ref":"#/components/schemas/MCPToolFilter"}],"nullable":true},"require_approval":{"description":"Specify which of the MCP server's tools require approval.","default":"always","anyOf":[{"type":"object","title":"MCP tool approval filter","description":"Specify which of the MCP server's tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.\n","properties":{"always":{"$ref":"#/components/schemas/MCPToolFilter"},"never":{"$ref":"#/components/schemas/MCPToolFilter"}},"additionalProperties":false},{"type":"string","title":"MCP tool approval setting","description":"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.\n","enum":["always","never"]}],"nullable":true}},"required":["type","server_label"]},"MCPToolFilter":{"type":"object","title":"MCP tool filter","description":"A filter object to specify which tools are allowed.\n","properties":{"tool_names":{"type":"array","title":"MCP allowed tools","items":{"type":"string"},"description":"List of allowed tool names."},"read_only":{"type":"boolean","description":"Indicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.\n"}},"required":[],"additionalProperties":false},"CodeInterpreterTool":{"type":"object","title":"Code interpreter","description":"A tool that runs Python code to help generate a response to a prompt.\n","properties":{"type":{"type":"string","enum":["code_interpreter"],"description":"The type of the code interpreter tool. Always `code_interpreter`.\n"},"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.\n","anyOf":[{"type":"string","description":"The container ID."},{"$ref":"#/components/schemas/CodeInterpreterContainerAuto"}]}},"required":["type","container"]},"CodeInterpreterContainerAuto":{"properties":{"type":{"type":"string","enum":["auto"],"description":"Always `auto`.","default":"auto"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"description":"An optional list of uploaded files to make available to your code."},"memory_limit":{"$ref":"#/components/schemas/ContainerMemoryLimit","nullable":true}},"type":"object","required":["type"],"title":"CodeInterpreterToolAuto","description":"Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on."},"ContainerMemoryLimit":{"type":"string","enum":["1g","4g","16g","64g"]},"ImageGenTool":{"type":"object","title":"Image generation tool","description":"A tool that generates images using a model like `gpt-image-1`.\n","properties":{"type":{"type":"string","enum":["image_generation"],"description":"The type of the image generation tool. Always `image_generation`.\n"},"model":{"type":"string","enum":["gpt-image-1","gpt-image-1-mini"],"description":"The image generation model to use. Default: `gpt-image-1`.\n","default":"gpt-image-1"},"quality":{"type":"string","enum":["low","medium","high","auto"],"description":"The quality of the generated image. One of `low`, `medium`, `high`,\nor `auto`. Default: `auto`.\n","default":"auto"},"size":{"type":"string","enum":["1024x1024","1024x1536","1536x1024","auto"],"description":"The size of the generated image. One of `1024x1024`, `1024x1536`,\n`1536x1024`, or `auto`. Default: `auto`.\n","default":"auto"},"output_format":{"type":"string","enum":["png","webp","jpeg"],"description":"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.\n","default":"png"},"output_compression":{"type":"integer","minimum":0,"maximum":100,"description":"Compression level for the output image. Default: 100.\n","default":100},"moderation":{"type":"string","enum":["auto","low"],"description":"Moderation level for the generated image. Default: `auto`.\n","default":"auto"},"background":{"type":"string","enum":["transparent","opaque","auto"],"description":"Background type for the generated image. One of `transparent`,\n`opaque`, or `auto`. Default: `auto`.\n","default":"auto"},"input_fidelity":{"$ref":"#/components/schemas/InputFidelity","nullable":true},"input_image_mask":{"type":"object","description":"Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).\n","properties":{"image_url":{"type":"string","description":"Base64-encoded mask image.\n"},"file_id":{"type":"string","description":"File ID for the mask image.\n"}},"required":[],"additionalProperties":false},"partial_images":{"type":"integer","minimum":0,"maximum":3,"description":"Number of partial images to generate in streaming mode, from 0 (default value) to 3.\n","default":0}},"required":["type"]},"InputFidelity":{"type":"string","enum":["high","low"],"description":"Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`."},"LocalShellToolParam":{"properties":{"type":{"type":"string","enum":["local_shell"],"description":"The type of the local shell tool. Always `local_shell`.","default":"local_shell"}},"type":"object","required":["type"],"title":"Local shell tool","description":"A tool that allows the model to execute shell commands in a local environment."},"FunctionShellToolParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The type of the shell tool. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Shell tool","description":"A tool that allows the model to execute shell commands."},"CustomToolParam":{"properties":{"type":{"type":"string","enum":["custom"],"description":"The type of the custom tool. Always `custom`.","default":"custom"},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls."},"description":{"type":"string","description":"Optional description of the custom tool, used to provide more context."},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CustomTextFormatParam"},{"$ref":"#/components/schemas/CustomGrammarFormatParam"}]}},"type":"object","required":["type","name"],"title":"Custom tool","description":"A custom tool that processes input using a specified format."},"CustomTextFormatParam":{"properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`.","default":"text"}},"type":"object","required":["type"],"title":"Text format","description":"Unconstrained free-form text."},"CustomGrammarFormatParam":{"properties":{"type":{"type":"string","enum":["grammar"],"description":"Grammar format. Always `grammar`.","default":"grammar"},"syntax":{"$ref":"#/components/schemas/GrammarSyntax1","description":"The syntax of the grammar definition. One of `lark` or `regex`."},"definition":{"type":"string","description":"The grammar definition."}},"type":"object","required":["type","syntax","definition"],"title":"Grammar format","description":"A grammar defined by the user."},"GrammarSyntax1":{"type":"string","enum":["lark","regex"]},"WebSearchPreviewTool":{"properties":{"type":{"type":"string","enum":["web_search_preview","web_search_preview_2025_03_11"],"description":"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.","default":"web_search_preview"},"user_location":{"$ref":"#/components/schemas/ApproximateLocation","description":"The user's location.","nullable":true},"search_context_size":{"$ref":"#/components/schemas/SearchContextSize","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"type":"object","required":["type"],"title":"Web search preview","description":"Searches the web for relevant results to use in a response. Learn more in the web search tool guide."},"ApproximateLocation":{"properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.","nullable":true},"region":{"type":"string","description":"Free text input for the region of the user, e.g. `California`.","nullable":true},"city":{"type":"string","description":"Free text input for the city of the user, e.g. `San Francisco`.","nullable":true},"timezone":{"type":"string","description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.","nullable":true}},"type":"object","required":["type"]},"SearchContextSize":{"type":"string","enum":["low","medium","high"]},"ApplyPatchToolParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The type of the tool. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Apply patch tool","description":"Allows the assistant to create, delete, or update files using unified diffs."},"ToolChoiceParam":{"description":"How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call.\n","anyOf":[{"$ref":"#/components/schemas/ToolChoiceOptions"},{"$ref":"#/components/schemas/ToolChoiceAllowed"},{"$ref":"#/components/schemas/ToolChoiceTypes"},{"$ref":"#/components/schemas/ToolChoiceFunction"},{"$ref":"#/components/schemas/ToolChoiceMCP"},{"$ref":"#/components/schemas/ToolChoiceCustom"},{"$ref":"#/components/schemas/SpecificApplyPatchParam"},{"$ref":"#/components/schemas/SpecificFunctionShellParam"}]},"ToolChoiceOptions":{"type":"string","title":"Tool choice mode","description":"Controls which (if any) tool is called by the model.\n\n`none` means the model will not call any tool and instead generates a message.\n\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n\n`required` means the model must call one or more tools.\n","enum":["none","auto","required"]},"ToolChoiceAllowed":{"type":"object","title":"Allowed tools","description":"Constrains the tools available to the model to a pre-defined set.\n","properties":{"type":{"type":"string","enum":["allowed_tools"],"description":"Allowed tool configuration type. Always `allowed_tools`."},"mode":{"type":"string","enum":["auto","required"],"description":"Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n"},"tools":{"type":"array","description":"A list of tool definitions that the model should be allowed to call.\n\nFor the Responses API, the list of tool definitions might look like:\n```json\n[\n  { \"type\": \"function\", \"name\": \"get_weather\" },\n  { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n  { \"type\": \"image_generation\" }\n]\n```\n","items":{"type":"object","description":"A tool definition that the model should be allowed to call.\n","additionalProperties":true}}},"required":["type","mode","tools"]},"ToolChoiceTypes":{"type":"object","title":"Hosted tool","description":"Indicates that the model should use a built-in tool to generate a response.\nUse this to select a specific hosted capability.\n","properties":{"type":{"type":"string","description":"The type of hosted tool the model should to use. \n\nAllowed values are:\n- `file_search`\n- `web_search_preview`\n- `computer_use_preview`\n- `code_interpreter`\n- `image_generation`\n","enum":["file_search","web_search_preview","computer_use_preview","web_search_preview_2025_03_11","image_generation","code_interpreter"]}},"required":["type"]},"ToolChoiceFunction":{"type":"object","title":"Function tool","description":"Use this option to force the model to call a specific function.\n","properties":{"type":{"type":"string","enum":["function"],"description":"For function calling, the type is always `function`."},"name":{"type":"string","description":"The name of the function to call."}},"required":["type","name"]},"ToolChoiceMCP":{"type":"object","title":"MCP tool","description":"Use this option to force the model to call a specific tool on a remote MCP server.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"For MCP tools, the type is always `mcp`."},"server_label":{"type":"string","description":"The label of the MCP server to use.\n"},"name":{"type":"string","description":"The name of the tool to call on the server.\n","nullable":true}},"required":["type","server_label"]},"ToolChoiceCustom":{"type":"object","title":"Custom tool","description":"Use this option to force the model to call a specific custom tool.\n","properties":{"type":{"type":"string","enum":["custom"],"description":"For custom tool calling, the type is always `custom`."},"name":{"type":"string","description":"The name of the custom tool to call."}},"required":["type","name"]},"SpecificApplyPatchParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The tool to call. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Specific apply patch tool choice","description":"Forces the model to call the apply_patch tool when executing a tool call."},"SpecificFunctionShellParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The tool to call. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Specific shell tool choice","description":"Forces the model to call the function shell tool when a tool call is required."},"Prompt":{"type":"object","nullable":true,"description":"Reference to a prompt template and its variables.\n","required":["id"],"properties":{"id":{"type":"string","description":"The unique identifier of the prompt template to use."},"version":{"type":"string","nullable":true,"description":"Optional version of the prompt template."},"variables":{"$ref":"#/components/schemas/ResponsePromptVariables"}}},"ResponsePromptVariables":{"type":"object","title":"Prompt Variables","description":"Optional map of values to substitute in for variables in your\nprompt. The substitution values can either be strings, or other\nResponse input types like images or files.\n","additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"nullable":true},"InputTextContent":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContent":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/ImageDetail","description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type","detail"],"title":"Input image","description":"An image input to the model. See the vision guide for details."},"ImageDetail":{"type":"string","enum":["low","high","auto"]},"InputFileContent":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","description":"The name of the file to be sent to the model."},"file_url":{"type":"string","description":"The URL of the file to be sent to the model."},"file_data":{"type":"string","description":"The content of the file to be sent to the model.\n"}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"ResponseError":{"type":"object","description":"An error object returned when the model fails to generate a Response.\n","properties":{"code":{"$ref":"#/components/schemas/ResponseErrorCode"},"message":{"type":"string","description":"A human-readable description of the error.\n"}},"required":["code","message"],"nullable":true},"ResponseErrorCode":{"type":"string","description":"The error code for the response.\n","enum":["server_error","rate_limit_exceeded","invalid_prompt","vector_store_timeout","invalid_image","invalid_image_format","invalid_base64_image","invalid_image_url","image_too_large","image_too_small","image_parse_error","image_content_policy_violation","invalid_image_mode","image_file_too_large","unsupported_image_media_type","empty_image_file","failed_to_download_image","image_file_not_found"]},"OutputItem":{"anyOf":[{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/FunctionShellCall"},{"$ref":"#/components/schemas/FunctionShellCallOutput"},{"$ref":"#/components/schemas/ApplyPatchToolCall"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutput"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/CustomToolCall"}],"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"]},"OutputMessage":{"type":"object","title":"Output message","description":"An output message from the model.\n","properties":{"id":{"type":"string","description":"The unique ID of the output message.\n"},"type":{"type":"string","description":"The type of the output message. Always `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the output message. Always `assistant`.\n","enum":["assistant"]},"content":{"type":"array","description":"The content of the output message.\n","items":{"$ref":"#/components/schemas/OutputMessageContent"}},"status":{"type":"string","description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","type","role","content","status"]},"OutputMessageContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"}]},"OutputTextContent":{"properties":{"type":{"type":"string","enum":["output_text"],"description":"The type of the output text. Always `output_text`.","default":"output_text"},"text":{"type":"string","description":"The text output from the model."},"annotations":{"items":{"$ref":"#/components/schemas/responses_Annotation"},"type":"array","description":"The annotations of the text output."},"logprobs":{"items":{"$ref":"#/components/schemas/LogProb"},"type":"array"}},"type":"object","required":["type","text","annotations"],"title":"Output text","description":"A text output from the model."},"responses_Annotation":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FileCitationBody"},{"$ref":"#/components/schemas/UrlCitationBody"},{"$ref":"#/components/schemas/ContainerFileCitationBody"},{"$ref":"#/components/schemas/FilePath"}]},"FileCitationBody":{"properties":{"type":{"type":"string","enum":["file_citation"],"description":"The type of the file citation. Always `file_citation`.","default":"file_citation"},"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","description":"The index of the file in the list of files."},"filename":{"type":"string","description":"The filename of the file cited."}},"type":"object","required":["type","file_id","index","filename"],"title":"File citation","description":"A citation to a file."},"UrlCitationBody":{"properties":{"type":{"type":"string","enum":["url_citation"],"description":"The type of the URL citation. Always `url_citation`.","default":"url_citation"},"url":{"type":"string","description":"The URL of the web resource."},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message."},"title":{"type":"string","description":"The title of the web resource."}},"type":"object","required":["type","url","start_index","end_index","title"],"title":"URL citation","description":"A citation for a web resource used to generate a model response."},"ContainerFileCitationBody":{"properties":{"type":{"type":"string","enum":["container_file_citation"],"description":"The type of the container file citation. Always `container_file_citation`.","default":"container_file_citation"},"container_id":{"type":"string","description":"The ID of the container file."},"file_id":{"type":"string","description":"The ID of the file."},"start_index":{"type":"integer","description":"The index of the first character of the container file citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the container file citation in the message."},"filename":{"type":"string","description":"The filename of the container file cited."}},"type":"object","required":["type","container_id","file_id","start_index","end_index","filename"],"title":"Container file citation","description":"A citation for a container file used to generate a model response."},"FilePath":{"type":"object","title":"File path","description":"A path to a file.\n","properties":{"type":{"type":"string","description":"The type of the file path. Always `file_path`.\n","enum":["file_path"]},"file_id":{"type":"string","description":"The ID of the file.\n"},"index":{"type":"integer","description":"The index of the file in the list of files.\n"}},"required":["type","file_id","index"]},"LogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"},"top_logprobs":{"items":{"$ref":"#/components/schemas/TopLogProb"},"type":"array"}},"type":"object","required":["token","logprob","bytes","top_logprobs"],"title":"Log probability","description":"The log probability of a token."},"TopLogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"}},"type":"object","required":["token","logprob","bytes"],"title":"Top log probability","description":"The top log probability of a token."},"RefusalContent":{"properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the refusal. Always `refusal`.","default":"refusal"},"refusal":{"type":"string","description":"The refusal explanation from the model."}},"type":"object","required":["type","refusal"],"title":"Refusal","description":"A refusal from the model."},"FileSearchToolCall":{"type":"object","title":"File search tool call","description":"The results of a file search tool call. See the file search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the file search tool call.\n"},"type":{"type":"string","enum":["file_search_call"],"default":"file_search_call","description":"The type of the file search tool call. Always `file_search_call`.\n"},"status":{"type":"string","description":"The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n","enum":["in_progress","searching","completed","incomplete","failed"]},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files.\n"},"results":{"type":"array","description":"The results of the file search tool call.\n","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The unique ID of the file.\n"},"text":{"type":"string","description":"The text that was retrieved from the file.\n"},"filename":{"type":"string","description":"The name of the file.\n"},"attributes":{"$ref":"#/components/schemas/VectorStoreFileAttributes"},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1.\n"}}},"nullable":true}}},"VectorStoreFileAttributes":{"type":"object","nullable":true,"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n","maxProperties":16,"propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"FunctionToolCall":{"type":"object","title":"Function tool call","description":"A tool call to run a function. Used when the model requests your code to execute a function.\n","properties":{"id":{"type":"string","description":"The unique ID of the function tool call.\n"},"type":{"type":"string","enum":["function_call"],"default":"function_call","description":"The type of the function tool call. Always `function_call`.\n"},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model.\n"},"name":{"type":"string","description":"The name of the function to run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","name","arguments"]},"WebSearchToolCall":{"type":"object","title":"Web search tool call","description":"The results of a web search tool call. See the web search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the web search tool call.\n"},"type":{"type":"string","enum":["web_search_call"],"default":"web_search_call","description":"The type of the web search tool call. Always `web_search_call`.\n"},"status":{"type":"string","description":"The status of the web search tool call.\n","enum":["in_progress","searching","completed","failed"]},"action":{"type":"object","description":"An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find).\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/WebSearchActionSearch"},{"$ref":"#/components/schemas/WebSearchActionOpenPage"},{"$ref":"#/components/schemas/WebSearchActionFind"}]}},"required":["id","type","status","action"]},"WebSearchActionSearch":{"type":"object","title":"Search action","description":"Action type \"search\" - Performs a web search query.\n","properties":{"type":{"type":"string","enum":["search"],"description":"The action type.\n"},"query":{"type":"string","description":"The search query.\n"},"sources":{"type":"array","title":"Web search sources","description":"The sources used in the search.\n","items":{"type":"object","title":"Web search source","description":"A source used in the search.\n","properties":{"type":{"type":"string","enum":["url"],"description":"The type of source. Always `url`.\n"},"url":{"type":"string","description":"The URL of the source.\n"}},"required":["type","url"]}}},"required":["type","query"]},"WebSearchActionOpenPage":{"type":"object","title":"Open page action","description":"Action type \"open_page\" - Opens a specific URL from search results.\n","properties":{"type":{"type":"string","enum":["open_page"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL opened by the model.\n"}},"required":["type","url"]},"WebSearchActionFind":{"type":"object","title":"Find action","description":"Action type \"find\": Searches for a pattern within a loaded page.\n","properties":{"type":{"type":"string","enum":["find"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL of the page searched for the pattern.\n"},"pattern":{"type":"string","description":"The pattern or text to search for within the page.\n"}},"required":["type","url","pattern"]},"ComputerToolCall":{"type":"object","title":"Computer tool call","description":"A tool call to a computer use tool. See the computer use guide for more information.\n","properties":{"type":{"type":"string","description":"The type of the computer call. Always `computer_call`.","enum":["computer_call"],"default":"computer_call"},"id":{"type":"string","description":"The unique ID of the computer call."},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output.\n"},"action":{"$ref":"#/components/schemas/ComputerAction"},"pending_safety_checks":{"type":"array","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","id","action","call_id","pending_safety_checks","status"]},"ComputerAction":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ClickParam"},{"$ref":"#/components/schemas/DoubleClickAction"},{"$ref":"#/components/schemas/Drag"},{"$ref":"#/components/schemas/KeyPressAction"},{"$ref":"#/components/schemas/Move"},{"$ref":"#/components/schemas/Screenshot"},{"$ref":"#/components/schemas/Scroll"},{"$ref":"#/components/schemas/Type"},{"$ref":"#/components/schemas/Wait"}]},"ClickParam":{"properties":{"type":{"type":"string","enum":["click"],"description":"Specifies the event type. For a click action, this property is always `click`.","default":"click"},"button":{"$ref":"#/components/schemas/ClickButtonType","description":"Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."},"x":{"type":"integer","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","description":"The y-coordinate where the click occurred."}},"type":"object","required":["type","button","x","y"],"title":"Click","description":"A click action."},"ClickButtonType":{"type":"string","enum":["left","right","wheel","back","forward"]},"DoubleClickAction":{"properties":{"type":{"type":"string","enum":["double_click"],"description":"Specifies the event type. For a double click action, this property is always set to `double_click`.","default":"double_click"},"x":{"type":"integer","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","description":"The y-coordinate where the double click occurred."}},"type":"object","required":["type","x","y"],"title":"DoubleClick","description":"A double click action."},"Drag":{"type":"object","title":"Drag","description":"A drag action.\n","properties":{"type":{"type":"string","enum":["drag"],"default":"drag","description":"Specifies the event type. For a drag action, this property is \nalways set to `drag`.\n"},"path":{"type":"array","description":"An array of coordinates representing the path of the drag action. Coordinates will appear as an array\nof objects, eg\n```\n[\n  { x: 100, y: 200 },\n  { x: 200, y: 300 }\n]\n```\n","items":{"$ref":"#/components/schemas/DragPoint"}}},"required":["type","path"]},"DragPoint":{"properties":{"x":{"type":"integer","description":"The x-coordinate."},"y":{"type":"integer","description":"The y-coordinate."}},"type":"object","required":["x","y"],"title":"Coordinate","description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."},"KeyPressAction":{"properties":{"type":{"type":"string","enum":["keypress"],"description":"Specifies the event type. For a keypress action, this property is always set to `keypress`.","default":"keypress"},"keys":{"items":{"type":"string","description":"One of the keys the model is requesting to be pressed."},"type":"array","description":"The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key."}},"type":"object","required":["type","keys"],"title":"KeyPress","description":"A collection of keypresses the model would like to perform."},"Move":{"type":"object","title":"Move","description":"A mouse move action.\n","properties":{"type":{"type":"string","enum":["move"],"default":"move","description":"Specifies the event type. For a move action, this property is \nalways set to `move`.\n"},"x":{"type":"integer","description":"The x-coordinate to move to.\n"},"y":{"type":"integer","description":"The y-coordinate to move to.\n"}},"required":["type","x","y"]},"Screenshot":{"type":"object","title":"Screenshot","description":"A screenshot action.\n","properties":{"type":{"type":"string","enum":["screenshot"],"default":"screenshot","description":"Specifies the event type. For a screenshot action, this property is \nalways set to `screenshot`.\n"}},"required":["type"]},"Scroll":{"type":"object","title":"Scroll","description":"A scroll action.\n","properties":{"type":{"type":"string","enum":["scroll"],"default":"scroll","description":"Specifies the event type. For a scroll action, this property is \nalways set to `scroll`.\n"},"x":{"type":"integer","description":"The x-coordinate where the scroll occurred.\n"},"y":{"type":"integer","description":"The y-coordinate where the scroll occurred.\n"},"scroll_x":{"type":"integer","description":"The horizontal scroll distance.\n"},"scroll_y":{"type":"integer","description":"The vertical scroll distance.\n"}},"required":["type","x","y","scroll_x","scroll_y"]},"Type":{"type":"object","title":"Type","description":"An action to type in text.\n","properties":{"type":{"type":"string","enum":["type"],"default":"type","description":"Specifies the event type. For a type action, this property is \nalways set to `type`.\n"},"text":{"type":"string","description":"The text to type.\n"}},"required":["type","text"]},"Wait":{"type":"object","title":"Wait","description":"A wait action.\n","properties":{"type":{"type":"string","enum":["wait"],"default":"wait","description":"Specifies the event type. For a wait action, this property is \nalways set to `wait`.\n"}},"required":["type"]},"ComputerCallSafetyCheckParam":{"properties":{"id":{"type":"string","description":"The ID of the pending safety check."},"code":{"type":"string","description":"The type of the pending safety check.","nullable":true},"message":{"type":"string","description":"Details about the pending safety check.","nullable":true}},"type":"object","required":["id"],"description":"A pending safety check for the computer call."},"ReasoningItem":{"type":"object","description":"A description of the chain of thought used by a reasoning model while generating a response.\nInclude these items in your input for subsequent turns if you are manually managing context.\n","title":"Reasoning","properties":{"type":{"type":"string","description":"The type of the object. Always `reasoning`.\n","enum":["reasoning"],"default":"reasoning"},"id":{"type":"string","description":"The unique identifier of the reasoning content.\n"},"encrypted_content":{"type":"string","description":"The encrypted content of the reasoning item - populated when a response is\ngenerated with `reasoning.encrypted_content` in the `include` parameter.\n","nullable":true},"summary":{"type":"array","description":"Reasoning summary content.\n","items":{"$ref":"#/components/schemas/Summary"}},"content":{"type":"array","description":"Reasoning text content.\n","items":{"$ref":"#/components/schemas/ReasoningTextContent"}},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","summary","type"]},"Summary":{"properties":{"type":{"type":"string","enum":["summary_text"],"description":"The type of the object. Always `summary_text`.","default":"summary_text"},"text":{"type":"string","description":"A summary of the reasoning output from the model so far."}},"type":"object","required":["type","text"],"title":"Summary text","description":"A summary text from the model."},"ReasoningTextContent":{"properties":{"type":{"type":"string","enum":["reasoning_text"],"description":"The type of the reasoning text. Always `reasoning_text`.","default":"reasoning_text"},"text":{"type":"string","description":"The reasoning text from the model."}},"type":"object","required":["type","text"],"title":"ReasoningTextContent","description":"Reasoning text from the model."},"ImageGenToolCall":{"type":"object","title":"Image generation call","description":"An image generation request made by the model.\n","properties":{"type":{"type":"string","enum":["image_generation_call"],"default":"image_generation_call","description":"The type of the image generation call. Always `image_generation_call`.\n"},"id":{"type":"string","description":"The unique ID of the image generation call.\n"},"status":{"type":"string","enum":["in_progress","completed","generating","failed"],"description":"The status of the image generation call.\n"},"result":{"type":"string","description":"The generated image encoded in base64.\n","nullable":true}},"required":["type","id","status","result"]},"CodeInterpreterToolCall":{"type":"object","title":"Code interpreter tool call","description":"A tool call to run code.\n","properties":{"type":{"type":"string","enum":["code_interpreter_call"],"default":"code_interpreter_call","description":"The type of the code interpreter tool call. Always `code_interpreter_call`.\n"},"id":{"type":"string","description":"The unique ID of the code interpreter tool call.\n"},"status":{"type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"description":"The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"},"container_id":{"type":"string","description":"The ID of the container used to run the code.\n"},"code":{"type":"string","description":"The code to run, or null if not available.\n","nullable":true},"outputs":{"type":"array","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CodeInterpreterOutputLogs"},{"$ref":"#/components/schemas/CodeInterpreterOutputImage"}]},"discriminator":{"propertyName":"type"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n","nullable":true}},"required":["type","id","status","container_id","code","outputs"]},"CodeInterpreterOutputLogs":{"properties":{"type":{"type":"string","enum":["logs"],"description":"The type of the output. Always `logs`.","default":"logs"},"logs":{"type":"string","description":"The logs output from the code interpreter."}},"type":"object","required":["type","logs"],"title":"Code interpreter output logs","description":"The logs output from the code interpreter."},"CodeInterpreterOutputImage":{"properties":{"type":{"type":"string","enum":["image"],"description":"The type of the output. Always `image`.","default":"image"},"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"type":"object","required":["type","url"],"title":"Code interpreter output image","description":"The image output from the code interpreter."},"LocalShellToolCall":{"type":"object","title":"Local shell call","description":"A tool call to run a command on the local shell.\n","properties":{"type":{"type":"string","enum":["local_shell_call"],"default":"local_shell_call","description":"The type of the local shell call. Always `local_shell_call`.\n"},"id":{"type":"string","description":"The unique ID of the local shell call.\n"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"action":{"$ref":"#/components/schemas/LocalShellExecAction"},"status":{"type":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the local shell call.\n"}},"required":["type","id","call_id","action","status"]},"LocalShellExecAction":{"properties":{"type":{"type":"string","enum":["exec"],"description":"The type of the local shell action. Always `exec`.","default":"exec"},"command":{"items":{"type":"string"},"type":"array","description":"The command to run."},"timeout_ms":{"type":"integer","nullable":true,"description":"Optional timeout in milliseconds for the command."},"working_directory":{"type":"string","nullable":true,"description":"Optional working directory to run the command in."},"env":{"additionalProperties":{"type":"string"},"type":"object","description":"Environment variables to set for the command."},"user":{"type":"string","nullable":true,"description":"Optional user to run the command as."}},"type":"object","required":["type","command","env"],"title":"Local shell exec action","description":"Execute a shell command on the server."},"FunctionShellCall":{"properties":{"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `shell_call`.","default":"shell_call"},"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the function shell tool call generated by the model."},"action":{"$ref":"#/components/schemas/FunctionShellAction","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/LocalShellCallStatus","description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","action","status"],"title":"Function shell tool call","description":"A tool call that executes one or more shell commands in a managed environment."},"FunctionShellAction":{"properties":{"commands":{"items":{"type":"string","description":"A list of commands to run."},"type":"array"},"timeout_ms":{"type":"integer","description":"Optional timeout in milliseconds for the commands.","nullable":true},"max_output_length":{"type":"integer","description":"Optional maximum number of characters to return from each command.","nullable":true}},"type":"object","required":["commands","timeout_ms","max_output_length"],"title":"Shell exec action","description":"Execute a shell command."},"LocalShellCallStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionShellCallOutput":{"properties":{"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the shell call output. Always `shell_call_output`.","default":"shell_call_output"},"id":{"type":"string","description":"The unique ID of the shell call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContent"},"type":"array","description":"An array of shell call output contents"},"max_output_length":{"type":"integer","description":"The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.","nullable":true},"created_by":{"type":"string"}},"type":"object","required":["type","id","call_id","output","max_output_length"],"title":"Shell call output","description":"The output of a shell tool call."},"FunctionShellCallOutputContent":{"properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"outcome":{"title":"Function shell call outcome","description":"Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcome"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcome"}]},"created_by":{"type":"string"}},"type":"object","required":["stdout","stderr","outcome"],"title":"Shell call output content","description":"The content of a shell call output."},"FunctionShellCallOutputTimeoutOutcome":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcome":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"Exit code from the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCall":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatus","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations applied via apply_patch.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperation"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperation"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperation"}]},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call that applies file diffs by creating, deleting, or updating files."},"ApplyPatchCallStatus":{"type":"string","enum":["in_progress","completed"]},"ApplyPatchCreateFileOperation":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"Create a new file with the provided diff.","default":"create_file"},"path":{"type":"string","description":"Path of the file to create."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction describing how to create a file via the apply_patch tool."},"ApplyPatchDeleteFileOperation":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"Delete the specified file.","default":"delete_file"},"path":{"type":"string","description":"Path of the file to delete."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction describing how to delete a file via the apply_patch tool."},"ApplyPatchUpdateFileOperation":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"Update an existing file with the provided diff.","default":"update_file"},"path":{"type":"string","description":"Path of the file to update."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction describing how to update a file via the apply_patch tool."},"ApplyPatchToolCallOutput":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatus","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","description":"Optional textual output returned by the apply patch tool.","nullable":true},"created_by":{"type":"string","description":"The ID of the entity that created this tool call output."}},"type":"object","required":["type","id","call_id","status"],"title":"Apply patch tool call output","description":"The output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatus":{"type":"string","enum":["completed","failed"]},"MCPToolCall":{"type":"object","title":"MCP tool call","description":"An invocation of a tool on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_call"],"default":"mcp_call","description":"The type of the item. Always `mcp_call`.\n"},"id":{"type":"string","description":"The unique ID of the tool call.\n"},"server_label":{"type":"string","description":"The label of the MCP server running the tool.\n"},"name":{"type":"string","description":"The name of the tool that was run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool.\n"},"output":{"type":"string","description":"The output from the tool call.\n","nullable":true},"error":{"type":"string","description":"The error from the tool call, if any.\n","nullable":true},"status":{"$ref":"#/components/schemas/MCPToolCallStatus","description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"},"approval_request_id":{"type":"string","description":"Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n","nullable":true}},"required":["type","id","server_label","name","arguments"]},"MCPToolCallStatus":{"type":"string","enum":["in_progress","completed","incomplete","calling","failed"]},"MCPListTools":{"type":"object","title":"MCP list tools","description":"A list of tools available on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_list_tools"],"default":"mcp_list_tools","description":"The type of the item. Always `mcp_list_tools`.\n"},"id":{"type":"string","description":"The unique ID of the list.\n"},"server_label":{"type":"string","description":"The label of the MCP server.\n"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/MCPListToolsTool"},"description":"The tools available on the server.\n"},"error":{"type":"string","description":"Error message if the server could not list tools.\n","nullable":true}},"required":["type","id","server_label","tools"]},"MCPListToolsTool":{"type":"object","title":"MCP list tools tool","description":"A tool available on an MCP server.\n","properties":{"name":{"type":"string","description":"The name of the tool.\n"},"description":{"type":"string","description":"The description of the tool.\n","nullable":true},"input_schema":{"type":"object","description":"The JSON schema describing the tool's input.\n"},"annotations":{"type":"object","description":"Additional annotations about the tool.\n","nullable":true}},"required":["name","input_schema"]},"MCPApprovalRequest":{"type":"object","title":"MCP approval request","description":"A request for human approval of a tool invocation.\n","properties":{"type":{"type":"string","enum":["mcp_approval_request"],"default":"mcp_approval_request","description":"The type of the item. Always `mcp_approval_request`.\n"},"id":{"type":"string","description":"The unique ID of the approval request.\n"},"server_label":{"type":"string","description":"The label of the MCP server making the request.\n"},"name":{"type":"string","description":"The name of the tool to run.\n"},"arguments":{"type":"string","description":"A JSON string of arguments for the tool.\n"}},"required":["type","id","server_label","name","arguments"]},"CustomToolCall":{"type":"object","title":"Custom tool call","description":"A call to a custom tool created by the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call"],"default":"custom_tool_call","description":"The type of the custom tool call. Always `custom_tool_call`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call in the platform.\n"},"call_id":{"type":"string","description":"An identifier used to map this custom tool call to a tool call output.\n"},"name":{"type":"string","description":"The name of the custom tool being called.\n"},"input":{"type":"string","description":"The input for the custom tool call generated by the model.\n"}},"required":["type","call_id","name","input"]},"InputItem":{"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/EasyInputMessage"},{"$ref":"#/components/schemas/Item"},{"$ref":"#/components/schemas/ItemReferenceParam"}]},"EasyInputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n","properties":{"role":{"type":"string","description":"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n","enum":["user","assistant","system","developer"]},"content":{"description":"Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n","anyOf":[{"type":"string","title":"Text input","description":"A text input to the model.\n"},{"$ref":"#/components/schemas/InputMessageContentList"}]},"type":{"type":"string","description":"The type of the message input. Always `message`.\n","enum":["message"],"default":"message"}},"required":["role","content"]},"InputMessageContentList":{"type":"array","title":"Input item content list","description":"A list of one or many input items to the model, containing different content \ntypes.\n","items":{"$ref":"#/components/schemas/InputContent"}},"InputContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"Item":{"type":"object","description":"Content item used to generate a response.\n","discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/responses_InputMessage"},{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ComputerCallOutputItemParam"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/FunctionCallOutputItemParam"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/CompactionSummaryItemParam"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/LocalShellToolCallOutput"},{"$ref":"#/components/schemas/FunctionShellCallItemParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutputItemParam"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/MCPApprovalResponse"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/CustomToolCallOutput"},{"$ref":"#/components/schemas/CustomToolCall"}]},"responses_InputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n","properties":{"type":{"type":"string","description":"The type of the message input. Always set to `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the message input. One of `user`, `system`, or `developer`.\n","enum":["user","system","developer"]},"status":{"type":"string","description":"The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]},"content":{"$ref":"#/components/schemas/InputMessageContentList"}},"required":["role","content"]},"ComputerCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The ID of the computer tool call output.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The ID of the computer tool call that produced the output."},"type":{"type":"string","enum":["computer_call_output"],"description":"The type of the computer tool call output. Always `computer_call_output`.","default":"computer_call_output"},"output":{"$ref":"#/components/schemas/ComputerScreenshotImage"},"acknowledged_safety_checks":{"items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"type":"array","description":"The safety checks reported by the API that have been acknowledged by the developer.","nullable":true},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Computer tool call output","description":"The output of a computer tool call."},"ComputerScreenshotImage":{"type":"object","description":"A computer screenshot image used with the computer use tool.\n","properties":{"type":{"type":"string","enum":["computer_screenshot"],"default":"computer_screenshot","description":"Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n"},"image_url":{"type":"string","description":"The URL of the screenshot image."},"file_id":{"type":"string","description":"The identifier of an uploaded file that contains the screenshot."}},"required":["type"]},"FunctionCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function tool call generated by the model."},"type":{"type":"string","enum":["function_call_output"],"description":"The type of the function tool call output. Always `function_call_output`.","default":"function_call_output"},"output":{"description":"Text, image, or file output of the function tool call.","anyOf":[{"type":"string","maxLength":10485760,"description":"A JSON string of the output of the function tool call."},{"items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContentParam"},{"$ref":"#/components/schemas/InputImageContentParamAutoParam"},{"$ref":"#/components/schemas/InputFileContentParam"}]},"type":"array"}]},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function tool call output","description":"The output of a function tool call."},"InputTextContentParam":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","maxLength":10485760,"description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContentParamAutoParam":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","maxLength":20971520,"nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/DetailEnum","nullable":true,"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type"],"title":"Input image","description":"An image input to the model."},"DetailEnum":{"type":"string","enum":["low","high","auto"]},"InputFileContentParam":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","nullable":true,"description":"The name of the file to be sent to the model."},"file_data":{"type":"string","maxLength":33554432,"nullable":true,"description":"The base64-encoded data of the file to be sent to the model."},"file_url":{"type":"string","nullable":true,"description":"The URL of the file to be sent to the model."}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"CompactionSummaryItemParam":{"properties":{"id":{"type":"string","description":"The ID of the compaction item.","nullable":true},"type":{"type":"string","enum":["compaction"],"description":"The type of the item. Always `compaction`.","default":"compaction"},"encrypted_content":{"type":"string","maxLength":10485760}},"type":"object","required":["type","encrypted_content"],"title":"Compaction item","description":"A compaction item generated by the `v1/responses/compact` API."},"LocalShellToolCallOutput":{"type":"object","title":"Local shell call output","description":"The output of a local shell tool call.\n","properties":{"type":{"type":"string","enum":["local_shell_call_output"],"default":"local_shell_call_output","description":"The type of the local shell tool call output. Always `local_shell_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"output":{"type":"string","description":"A JSON string of the output of the local shell tool call.\n"},"status":{"ype":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n","nullable":true}},"required":["id","type","call_id","output"]},"FunctionShellCallItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `function_shell_call`.","default":"shell_call"},"action":{"$ref":"#/components/schemas/FunctionShellActionParam","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/FunctionShellCallItemStatus","nullable":true}},"type":"object","required":["call_id","type","action"],"title":"Function shell tool call","description":"A tool representing a request to execute one or more shell commands."},"FunctionShellActionParam":{"properties":{"commands":{"items":{"type":"string"},"type":"array","description":"Ordered shell commands for the execution environment to run."},"timeout_ms":{"type":"integer","description":"Maximum wall-clock time in milliseconds to allow the shell commands to run.","nullable":true},"max_output_length":{"type":"integer","description":"Maximum number of UTF-8 characters to capture from combined stdout and stderr output.","nullable":true}},"type":"object","required":["commands"],"title":"Function shell action","description":"Commands and limits describing how to run the function shell tool call."},"FunctionShellCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"],"title":"Function shell call status","description":"Status values reported for function shell tool calls."},"FunctionShellCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the item. Always `function_shell_call_output`.","default":"shell_call_output"},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContentParam"},"type":"array","description":"Captured chunks of stdout and stderr output, along with their associated outcomes."},"max_output_length":{"type":"integer","description":"The maximum number of UTF-8 characters captured for this shell call's combined output.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function shell tool call output","description":"The streamed output items emitted by a function shell tool call."},"FunctionShellCallOutputContentParam":{"properties":{"stdout":{"type":"string","maxLength":10485760,"description":"Captured stdout output for this chunk of the shell call."},"stderr":{"type":"string","maxLength":10485760,"description":"Captured stderr output for this chunk of the shell call."},"outcome":{"$ref":"#/components/schemas/FunctionShellCallOutputOutcomeParam","description":"The exit or timeout outcome associated with this chunk."}},"type":"object","required":["stdout","stderr","outcome"],"title":"Function shell output chunk","description":"Captured stdout and stderr for a portion of a function shell tool call output."},"FunctionShellCallOutputOutcomeParam":{"title":"Function shell call outcome","description":"The exit or timeout outcome associated with this chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcomeParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcomeParam"}]},"FunctionShellCallOutputTimeoutOutcomeParam":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcomeParam":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"The exit code returned by the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCallItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatusParam","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"$ref":"#/components/schemas/ApplyPatchOperationParam","description":"The specific create, delete, or update instruction for the apply_patch tool call."}},"type":"object","required":["type","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call representing a request to create, delete, or update files using diff patches."},"ApplyPatchCallStatusParam":{"type":"string","enum":["in_progress","completed"],"title":"Apply patch call status","description":"Status values reported for apply_patch tool calls."},"ApplyPatchOperationParam":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperationParam"}]},"ApplyPatchCreateFileOperationParam":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"The operation type. Always `create_file`.","default":"create_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to create relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply when creating the file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction for creating a new file via the apply_patch tool."},"ApplyPatchDeleteFileOperationParam":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"The operation type. Always `delete_file`.","default":"delete_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to delete relative to the workspace root."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction for deleting an existing file via the apply_patch tool."},"ApplyPatchUpdateFileOperationParam":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"The operation type. Always `update_file`.","default":"update_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to update relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply to the existing file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction for updating an existing file via the apply_patch tool."},"ApplyPatchToolCallOutputItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatusParam","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","maxLength":10485760,"description":"Optional human-readable log text from the apply patch tool (e.g., patch results or errors).","nullable":true}},"type":"object","required":["type","call_id","status"],"title":"Apply patch tool call output","description":"The streamed output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatusParam":{"type":"string","enum":["completed","failed"],"title":"Apply patch call output status","description":"Outcome values reported for apply_patch tool call outputs."},"MCPApprovalResponse":{"type":"object","title":"MCP approval response","description":"A response to an MCP approval request.\n","properties":{"type":{"type":"string","enum":["mcp_approval_response"],"default":"mcp_approval_response","description":"The type of the item. Always `mcp_approval_response`.\n"},"id":{"type":"string","description":"The unique ID of the approval response\n","nullable":true},"approval_request_id":{"type":"string","description":"The ID of the approval request being answered.\n"},"approve":{"type":"boolean","description":"Whether the request was approved.\n"},"reason":{"type":"string","description":"Optional reason for the decision.\n","nullable":true}},"required":["type","request_id","approve","approval_request_id"]},"CustomToolCallOutput":{"type":"object","title":"Custom tool call output","description":"The output of a custom tool call from your code, being sent back to the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call_output"],"default":"custom_tool_call_output","description":"The type of the custom tool call output. Always `custom_tool_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call output in the platform.\n"},"call_id":{"type":"string","description":"The call ID, used to map this custom tool call output to a custom tool call.\n"},"output":{"description":"The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n","anyOf":[{"type":"string","description":"A string of the output of the custom tool call.\n","title":"string output"},{"type":"array","items":{"$ref":"#/components/schemas/FunctionAndCustomToolCallOutput"},"title":"output content list","description":"Text, image, or file output of the custom tool call.\n"}]}},"required":["type","call_id","output"]},"FunctionAndCustomToolCallOutput":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"ItemReferenceParam":{"properties":{"type":{"type":"string","nullable":true,"enum":["item_reference"],"description":"The type of item to reference. Always `item_reference`.","default":"item_reference"},"id":{"type":"string","description":"The ID of the item to reference."}},"type":"object","required":["id"],"title":"Item reference","description":"An internal identifier for an item to reference."},"ResponseUsage":{"type":"object","description":"Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.\n","properties":{"input_tokens":{"type":"integer","description":"The number of input tokens."},"input_tokens_details":{"type":"object","description":"A detailed breakdown of the input tokens.","properties":{"cached_tokens":{"type":"integer","description":"The number of tokens retrieved from cache. See prompt caching for details.\n"},"cache_write_tokens":{"type":"integer","description":"The number of tokens written to cache. Nexos extension.\n"}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","description":"The number of output tokens."},"output_tokens_details":{"type":"object","description":"A detailed breakdown of the output tokens.","properties":{"reasoning_tokens":{"type":"integer","description":"The number of reasoning tokens."}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","description":"The total number of tokens used."},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]},"Conversation-2":{"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"type":"object","required":["id"],"title":"Conversation","description":"The conversation that this response belongs to. Input items and output items from this response are automatically added to this conversation."},"Error":{"type":"object","description":"Error details. Two shapes occur: gateway-generated errors carry a numeric nexos error `code` and a `message` (no `type`/`param`); errors passed through from an upstream provider follow the provider's own schema (for OpenAI: string `code`, `message`, `param`, `type`) and the response body additionally carries a top-level `provider` field identifying the provider.\n","properties":{"code":{"description":"Nexos numeric error code (gateway errors) or provider error code (passthrough errors).","oneOf":[{"type":"string","nullable":true},{"type":"integer"}]},"message":{"type":"string"},"param":{"type":"string","nullable":true,"description":"Present only on provider-passthrough errors."},"type":{"type":"string","description":"Present only on provider-passthrough errors."}},"required":["message"]}}},"paths":{"/v1/responses/{response_id}/cancel":{"post":{"operationId":"cancelResponse","tags":["Responses"],"summary":"Cancel a response","parameters":[{"in":"path","name":"response_id","required":true,"schema":{"type":"string"},"description":"The ID of the response to cancel."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Cancels a model response with the given ID. Only responses created with\nthe `background` parameter set to `true` can be cancelled.\n\n**Note:** background responses are temporarily disabled on the platform —\nrequests with `background: true` currently return error `100101`, so this\noperation cannot be used until background responses are re-enabled.\n"}}}}
````

## Compact a response

> Compact conversation

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Responses","description":"Create and manage model responses."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: nexos-...` for a user key or `X-Api-Key: nexos-team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"CompactResponseMethodPublicBody":{"properties":{"model":{"$ref":"#/components/schemas/ModelIdsCompaction"},"input":{"description":"Text, image, or file inputs to the model, used to generate a response","anyOf":[{"type":"string","maxLength":10485760,"description":"A text input to the model, equivalent to a text input with the `user` role."},{"items":{"$ref":"#/components/schemas/InputItem"},"type":"array"}],"nullable":true},"previous_response_id":{"type":"string","description":"The unique ID of the previous response to the model. Use this to create multi-turn conversations.","nullable":true},"instructions":{"type":"string","description":"A system (or developer) message inserted into the model's context.\nWhen used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.","nullable":true}},"type":"object","required":[]},"ModelIdsCompaction":{"type":"string","description":"Model ID used to generate the response, like `gpt-5` or `o3`."},"InputItem":{"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/EasyInputMessage"},{"$ref":"#/components/schemas/Item"},{"$ref":"#/components/schemas/ItemReferenceParam"}]},"EasyInputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n","properties":{"role":{"type":"string","description":"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n","enum":["user","assistant","system","developer"]},"content":{"description":"Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n","anyOf":[{"type":"string","title":"Text input","description":"A text input to the model.\n"},{"$ref":"#/components/schemas/InputMessageContentList"}]},"type":{"type":"string","description":"The type of the message input. Always `message`.\n","enum":["message"],"default":"message"}},"required":["role","content"]},"InputMessageContentList":{"type":"array","title":"Input item content list","description":"A list of one or many input items to the model, containing different content \ntypes.\n","items":{"$ref":"#/components/schemas/InputContent"}},"InputContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"InputTextContent":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContent":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/ImageDetail","description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type","detail"],"title":"Input image","description":"An image input to the model. See the vision guide for details."},"ImageDetail":{"type":"string","enum":["low","high","auto"]},"InputFileContent":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","description":"The name of the file to be sent to the model."},"file_url":{"type":"string","description":"The URL of the file to be sent to the model."},"file_data":{"type":"string","description":"The content of the file to be sent to the model.\n"}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"Item":{"type":"object","description":"Content item used to generate a response.\n","discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/responses_InputMessage"},{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ComputerCallOutputItemParam"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/FunctionCallOutputItemParam"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/CompactionSummaryItemParam"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/LocalShellToolCallOutput"},{"$ref":"#/components/schemas/FunctionShellCallItemParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutputItemParam"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/MCPApprovalResponse"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/CustomToolCallOutput"},{"$ref":"#/components/schemas/CustomToolCall"}]},"responses_InputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n","properties":{"type":{"type":"string","description":"The type of the message input. Always set to `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the message input. One of `user`, `system`, or `developer`.\n","enum":["user","system","developer"]},"status":{"type":"string","description":"The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]},"content":{"$ref":"#/components/schemas/InputMessageContentList"}},"required":["role","content"]},"OutputMessage":{"type":"object","title":"Output message","description":"An output message from the model.\n","properties":{"id":{"type":"string","description":"The unique ID of the output message.\n"},"type":{"type":"string","description":"The type of the output message. Always `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the output message. Always `assistant`.\n","enum":["assistant"]},"content":{"type":"array","description":"The content of the output message.\n","items":{"$ref":"#/components/schemas/OutputMessageContent"}},"status":{"type":"string","description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","type","role","content","status"]},"OutputMessageContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"}]},"OutputTextContent":{"properties":{"type":{"type":"string","enum":["output_text"],"description":"The type of the output text. Always `output_text`.","default":"output_text"},"text":{"type":"string","description":"The text output from the model."},"annotations":{"items":{"$ref":"#/components/schemas/responses_Annotation"},"type":"array","description":"The annotations of the text output."},"logprobs":{"items":{"$ref":"#/components/schemas/LogProb"},"type":"array"}},"type":"object","required":["type","text","annotations"],"title":"Output text","description":"A text output from the model."},"responses_Annotation":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FileCitationBody"},{"$ref":"#/components/schemas/UrlCitationBody"},{"$ref":"#/components/schemas/ContainerFileCitationBody"},{"$ref":"#/components/schemas/FilePath"}]},"FileCitationBody":{"properties":{"type":{"type":"string","enum":["file_citation"],"description":"The type of the file citation. Always `file_citation`.","default":"file_citation"},"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","description":"The index of the file in the list of files."},"filename":{"type":"string","description":"The filename of the file cited."}},"type":"object","required":["type","file_id","index","filename"],"title":"File citation","description":"A citation to a file."},"UrlCitationBody":{"properties":{"type":{"type":"string","enum":["url_citation"],"description":"The type of the URL citation. Always `url_citation`.","default":"url_citation"},"url":{"type":"string","description":"The URL of the web resource."},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message."},"title":{"type":"string","description":"The title of the web resource."}},"type":"object","required":["type","url","start_index","end_index","title"],"title":"URL citation","description":"A citation for a web resource used to generate a model response."},"ContainerFileCitationBody":{"properties":{"type":{"type":"string","enum":["container_file_citation"],"description":"The type of the container file citation. Always `container_file_citation`.","default":"container_file_citation"},"container_id":{"type":"string","description":"The ID of the container file."},"file_id":{"type":"string","description":"The ID of the file."},"start_index":{"type":"integer","description":"The index of the first character of the container file citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the container file citation in the message."},"filename":{"type":"string","description":"The filename of the container file cited."}},"type":"object","required":["type","container_id","file_id","start_index","end_index","filename"],"title":"Container file citation","description":"A citation for a container file used to generate a model response."},"FilePath":{"type":"object","title":"File path","description":"A path to a file.\n","properties":{"type":{"type":"string","description":"The type of the file path. Always `file_path`.\n","enum":["file_path"]},"file_id":{"type":"string","description":"The ID of the file.\n"},"index":{"type":"integer","description":"The index of the file in the list of files.\n"}},"required":["type","file_id","index"]},"LogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"},"top_logprobs":{"items":{"$ref":"#/components/schemas/TopLogProb"},"type":"array"}},"type":"object","required":["token","logprob","bytes","top_logprobs"],"title":"Log probability","description":"The log probability of a token."},"TopLogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"}},"type":"object","required":["token","logprob","bytes"],"title":"Top log probability","description":"The top log probability of a token."},"RefusalContent":{"properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the refusal. Always `refusal`.","default":"refusal"},"refusal":{"type":"string","description":"The refusal explanation from the model."}},"type":"object","required":["type","refusal"],"title":"Refusal","description":"A refusal from the model."},"FileSearchToolCall":{"type":"object","title":"File search tool call","description":"The results of a file search tool call. See the file search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the file search tool call.\n"},"type":{"type":"string","enum":["file_search_call"],"default":"file_search_call","description":"The type of the file search tool call. Always `file_search_call`.\n"},"status":{"type":"string","description":"The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n","enum":["in_progress","searching","completed","incomplete","failed"]},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files.\n"},"results":{"type":"array","description":"The results of the file search tool call.\n","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The unique ID of the file.\n"},"text":{"type":"string","description":"The text that was retrieved from the file.\n"},"filename":{"type":"string","description":"The name of the file.\n"},"attributes":{"$ref":"#/components/schemas/VectorStoreFileAttributes"},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1.\n"}}},"nullable":true}}},"VectorStoreFileAttributes":{"type":"object","nullable":true,"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n","maxProperties":16,"propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"ComputerToolCall":{"type":"object","title":"Computer tool call","description":"A tool call to a computer use tool. See the computer use guide for more information.\n","properties":{"type":{"type":"string","description":"The type of the computer call. Always `computer_call`.","enum":["computer_call"],"default":"computer_call"},"id":{"type":"string","description":"The unique ID of the computer call."},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output.\n"},"action":{"$ref":"#/components/schemas/ComputerAction"},"pending_safety_checks":{"type":"array","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","id","action","call_id","pending_safety_checks","status"]},"ComputerAction":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ClickParam"},{"$ref":"#/components/schemas/DoubleClickAction"},{"$ref":"#/components/schemas/Drag"},{"$ref":"#/components/schemas/KeyPressAction"},{"$ref":"#/components/schemas/Move"},{"$ref":"#/components/schemas/Screenshot"},{"$ref":"#/components/schemas/Scroll"},{"$ref":"#/components/schemas/Type"},{"$ref":"#/components/schemas/Wait"}]},"ClickParam":{"properties":{"type":{"type":"string","enum":["click"],"description":"Specifies the event type. For a click action, this property is always `click`.","default":"click"},"button":{"$ref":"#/components/schemas/ClickButtonType","description":"Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."},"x":{"type":"integer","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","description":"The y-coordinate where the click occurred."}},"type":"object","required":["type","button","x","y"],"title":"Click","description":"A click action."},"ClickButtonType":{"type":"string","enum":["left","right","wheel","back","forward"]},"DoubleClickAction":{"properties":{"type":{"type":"string","enum":["double_click"],"description":"Specifies the event type. For a double click action, this property is always set to `double_click`.","default":"double_click"},"x":{"type":"integer","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","description":"The y-coordinate where the double click occurred."}},"type":"object","required":["type","x","y"],"title":"DoubleClick","description":"A double click action."},"Drag":{"type":"object","title":"Drag","description":"A drag action.\n","properties":{"type":{"type":"string","enum":["drag"],"default":"drag","description":"Specifies the event type. For a drag action, this property is \nalways set to `drag`.\n"},"path":{"type":"array","description":"An array of coordinates representing the path of the drag action. Coordinates will appear as an array\nof objects, eg\n```\n[\n  { x: 100, y: 200 },\n  { x: 200, y: 300 }\n]\n```\n","items":{"$ref":"#/components/schemas/DragPoint"}}},"required":["type","path"]},"DragPoint":{"properties":{"x":{"type":"integer","description":"The x-coordinate."},"y":{"type":"integer","description":"The y-coordinate."}},"type":"object","required":["x","y"],"title":"Coordinate","description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."},"KeyPressAction":{"properties":{"type":{"type":"string","enum":["keypress"],"description":"Specifies the event type. For a keypress action, this property is always set to `keypress`.","default":"keypress"},"keys":{"items":{"type":"string","description":"One of the keys the model is requesting to be pressed."},"type":"array","description":"The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key."}},"type":"object","required":["type","keys"],"title":"KeyPress","description":"A collection of keypresses the model would like to perform."},"Move":{"type":"object","title":"Move","description":"A mouse move action.\n","properties":{"type":{"type":"string","enum":["move"],"default":"move","description":"Specifies the event type. For a move action, this property is \nalways set to `move`.\n"},"x":{"type":"integer","description":"The x-coordinate to move to.\n"},"y":{"type":"integer","description":"The y-coordinate to move to.\n"}},"required":["type","x","y"]},"Screenshot":{"type":"object","title":"Screenshot","description":"A screenshot action.\n","properties":{"type":{"type":"string","enum":["screenshot"],"default":"screenshot","description":"Specifies the event type. For a screenshot action, this property is \nalways set to `screenshot`.\n"}},"required":["type"]},"Scroll":{"type":"object","title":"Scroll","description":"A scroll action.\n","properties":{"type":{"type":"string","enum":["scroll"],"default":"scroll","description":"Specifies the event type. For a scroll action, this property is \nalways set to `scroll`.\n"},"x":{"type":"integer","description":"The x-coordinate where the scroll occurred.\n"},"y":{"type":"integer","description":"The y-coordinate where the scroll occurred.\n"},"scroll_x":{"type":"integer","description":"The horizontal scroll distance.\n"},"scroll_y":{"type":"integer","description":"The vertical scroll distance.\n"}},"required":["type","x","y","scroll_x","scroll_y"]},"Type":{"type":"object","title":"Type","description":"An action to type in text.\n","properties":{"type":{"type":"string","enum":["type"],"default":"type","description":"Specifies the event type. For a type action, this property is \nalways set to `type`.\n"},"text":{"type":"string","description":"The text to type.\n"}},"required":["type","text"]},"Wait":{"type":"object","title":"Wait","description":"A wait action.\n","properties":{"type":{"type":"string","enum":["wait"],"default":"wait","description":"Specifies the event type. For a wait action, this property is \nalways set to `wait`.\n"}},"required":["type"]},"ComputerCallSafetyCheckParam":{"properties":{"id":{"type":"string","description":"The ID of the pending safety check."},"code":{"type":"string","description":"The type of the pending safety check.","nullable":true},"message":{"type":"string","description":"Details about the pending safety check.","nullable":true}},"type":"object","required":["id"],"description":"A pending safety check for the computer call."},"ComputerCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The ID of the computer tool call output.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The ID of the computer tool call that produced the output."},"type":{"type":"string","enum":["computer_call_output"],"description":"The type of the computer tool call output. Always `computer_call_output`.","default":"computer_call_output"},"output":{"$ref":"#/components/schemas/ComputerScreenshotImage"},"acknowledged_safety_checks":{"items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"type":"array","description":"The safety checks reported by the API that have been acknowledged by the developer.","nullable":true},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Computer tool call output","description":"The output of a computer tool call."},"ComputerScreenshotImage":{"type":"object","description":"A computer screenshot image used with the computer use tool.\n","properties":{"type":{"type":"string","enum":["computer_screenshot"],"default":"computer_screenshot","description":"Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n"},"image_url":{"type":"string","description":"The URL of the screenshot image."},"file_id":{"type":"string","description":"The identifier of an uploaded file that contains the screenshot."}},"required":["type"]},"FunctionCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"WebSearchToolCall":{"type":"object","title":"Web search tool call","description":"The results of a web search tool call. See the web search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the web search tool call.\n"},"type":{"type":"string","enum":["web_search_call"],"default":"web_search_call","description":"The type of the web search tool call. Always `web_search_call`.\n"},"status":{"type":"string","description":"The status of the web search tool call.\n","enum":["in_progress","searching","completed","failed"]},"action":{"type":"object","description":"An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find).\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/WebSearchActionSearch"},{"$ref":"#/components/schemas/WebSearchActionOpenPage"},{"$ref":"#/components/schemas/WebSearchActionFind"}]}},"required":["id","type","status","action"]},"WebSearchActionSearch":{"type":"object","title":"Search action","description":"Action type \"search\" - Performs a web search query.\n","properties":{"type":{"type":"string","enum":["search"],"description":"The action type.\n"},"query":{"type":"string","description":"The search query.\n"},"sources":{"type":"array","title":"Web search sources","description":"The sources used in the search.\n","items":{"type":"object","title":"Web search source","description":"A source used in the search.\n","properties":{"type":{"type":"string","enum":["url"],"description":"The type of source. Always `url`.\n"},"url":{"type":"string","description":"The URL of the source.\n"}},"required":["type","url"]}}},"required":["type","query"]},"WebSearchActionOpenPage":{"type":"object","title":"Open page action","description":"Action type \"open_page\" - Opens a specific URL from search results.\n","properties":{"type":{"type":"string","enum":["open_page"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL opened by the model.\n"}},"required":["type","url"]},"WebSearchActionFind":{"type":"object","title":"Find action","description":"Action type \"find\": Searches for a pattern within a loaded page.\n","properties":{"type":{"type":"string","enum":["find"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL of the page searched for the pattern.\n"},"pattern":{"type":"string","description":"The pattern or text to search for within the page.\n"}},"required":["type","url","pattern"]},"FunctionToolCall":{"type":"object","title":"Function tool call","description":"A tool call to run a function. Used when the model requests your code to execute a function.\n","properties":{"id":{"type":"string","description":"The unique ID of the function tool call.\n"},"type":{"type":"string","enum":["function_call"],"default":"function_call","description":"The type of the function tool call. Always `function_call`.\n"},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model.\n"},"name":{"type":"string","description":"The name of the function to run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","name","arguments"]},"FunctionCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function tool call generated by the model."},"type":{"type":"string","enum":["function_call_output"],"description":"The type of the function tool call output. Always `function_call_output`.","default":"function_call_output"},"output":{"description":"Text, image, or file output of the function tool call.","anyOf":[{"type":"string","maxLength":10485760,"description":"A JSON string of the output of the function tool call."},{"items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContentParam"},{"$ref":"#/components/schemas/InputImageContentParamAutoParam"},{"$ref":"#/components/schemas/InputFileContentParam"}]},"type":"array"}]},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function tool call output","description":"The output of a function tool call."},"InputTextContentParam":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","maxLength":10485760,"description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContentParamAutoParam":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","maxLength":20971520,"nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/DetailEnum","nullable":true,"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type"],"title":"Input image","description":"An image input to the model."},"DetailEnum":{"type":"string","enum":["low","high","auto"]},"InputFileContentParam":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","nullable":true,"description":"The name of the file to be sent to the model."},"file_data":{"type":"string","maxLength":33554432,"nullable":true,"description":"The base64-encoded data of the file to be sent to the model."},"file_url":{"type":"string","nullable":true,"description":"The URL of the file to be sent to the model."}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"ReasoningItem":{"type":"object","description":"A description of the chain of thought used by a reasoning model while generating a response.\nInclude these items in your input for subsequent turns if you are manually managing context.\n","title":"Reasoning","properties":{"type":{"type":"string","description":"The type of the object. Always `reasoning`.\n","enum":["reasoning"],"default":"reasoning"},"id":{"type":"string","description":"The unique identifier of the reasoning content.\n"},"encrypted_content":{"type":"string","description":"The encrypted content of the reasoning item - populated when a response is\ngenerated with `reasoning.encrypted_content` in the `include` parameter.\n","nullable":true},"summary":{"type":"array","description":"Reasoning summary content.\n","items":{"$ref":"#/components/schemas/Summary"}},"content":{"type":"array","description":"Reasoning text content.\n","items":{"$ref":"#/components/schemas/ReasoningTextContent"}},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","summary","type"]},"Summary":{"properties":{"type":{"type":"string","enum":["summary_text"],"description":"The type of the object. Always `summary_text`.","default":"summary_text"},"text":{"type":"string","description":"A summary of the reasoning output from the model so far."}},"type":"object","required":["type","text"],"title":"Summary text","description":"A summary text from the model."},"ReasoningTextContent":{"properties":{"type":{"type":"string","enum":["reasoning_text"],"description":"The type of the reasoning text. Always `reasoning_text`.","default":"reasoning_text"},"text":{"type":"string","description":"The reasoning text from the model."}},"type":"object","required":["type","text"],"title":"ReasoningTextContent","description":"Reasoning text from the model."},"CompactionSummaryItemParam":{"properties":{"id":{"type":"string","description":"The ID of the compaction item.","nullable":true},"type":{"type":"string","enum":["compaction"],"description":"The type of the item. Always `compaction`.","default":"compaction"},"encrypted_content":{"type":"string","maxLength":10485760}},"type":"object","required":["type","encrypted_content"],"title":"Compaction item","description":"A compaction item generated by the `v1/responses/compact` API."},"ImageGenToolCall":{"type":"object","title":"Image generation call","description":"An image generation request made by the model.\n","properties":{"type":{"type":"string","enum":["image_generation_call"],"default":"image_generation_call","description":"The type of the image generation call. Always `image_generation_call`.\n"},"id":{"type":"string","description":"The unique ID of the image generation call.\n"},"status":{"type":"string","enum":["in_progress","completed","generating","failed"],"description":"The status of the image generation call.\n"},"result":{"type":"string","description":"The generated image encoded in base64.\n","nullable":true}},"required":["type","id","status","result"]},"CodeInterpreterToolCall":{"type":"object","title":"Code interpreter tool call","description":"A tool call to run code.\n","properties":{"type":{"type":"string","enum":["code_interpreter_call"],"default":"code_interpreter_call","description":"The type of the code interpreter tool call. Always `code_interpreter_call`.\n"},"id":{"type":"string","description":"The unique ID of the code interpreter tool call.\n"},"status":{"type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"description":"The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"},"container_id":{"type":"string","description":"The ID of the container used to run the code.\n"},"code":{"type":"string","description":"The code to run, or null if not available.\n","nullable":true},"outputs":{"type":"array","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CodeInterpreterOutputLogs"},{"$ref":"#/components/schemas/CodeInterpreterOutputImage"}]},"discriminator":{"propertyName":"type"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n","nullable":true}},"required":["type","id","status","container_id","code","outputs"]},"CodeInterpreterOutputLogs":{"properties":{"type":{"type":"string","enum":["logs"],"description":"The type of the output. Always `logs`.","default":"logs"},"logs":{"type":"string","description":"The logs output from the code interpreter."}},"type":"object","required":["type","logs"],"title":"Code interpreter output logs","description":"The logs output from the code interpreter."},"CodeInterpreterOutputImage":{"properties":{"type":{"type":"string","enum":["image"],"description":"The type of the output. Always `image`.","default":"image"},"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"type":"object","required":["type","url"],"title":"Code interpreter output image","description":"The image output from the code interpreter."},"LocalShellToolCall":{"type":"object","title":"Local shell call","description":"A tool call to run a command on the local shell.\n","properties":{"type":{"type":"string","enum":["local_shell_call"],"default":"local_shell_call","description":"The type of the local shell call. Always `local_shell_call`.\n"},"id":{"type":"string","description":"The unique ID of the local shell call.\n"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"action":{"$ref":"#/components/schemas/LocalShellExecAction"},"status":{"type":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the local shell call.\n"}},"required":["type","id","call_id","action","status"]},"LocalShellExecAction":{"properties":{"type":{"type":"string","enum":["exec"],"description":"The type of the local shell action. Always `exec`.","default":"exec"},"command":{"items":{"type":"string"},"type":"array","description":"The command to run."},"timeout_ms":{"type":"integer","nullable":true,"description":"Optional timeout in milliseconds for the command."},"working_directory":{"type":"string","nullable":true,"description":"Optional working directory to run the command in."},"env":{"additionalProperties":{"type":"string"},"type":"object","description":"Environment variables to set for the command."},"user":{"type":"string","nullable":true,"description":"Optional user to run the command as."}},"type":"object","required":["type","command","env"],"title":"Local shell exec action","description":"Execute a shell command on the server."},"LocalShellToolCallOutput":{"type":"object","title":"Local shell call output","description":"The output of a local shell tool call.\n","properties":{"type":{"type":"string","enum":["local_shell_call_output"],"default":"local_shell_call_output","description":"The type of the local shell tool call output. Always `local_shell_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"output":{"type":"string","description":"A JSON string of the output of the local shell tool call.\n"},"status":{"ype":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n","nullable":true}},"required":["id","type","call_id","output"]},"FunctionShellCallItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `function_shell_call`.","default":"shell_call"},"action":{"$ref":"#/components/schemas/FunctionShellActionParam","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/FunctionShellCallItemStatus","nullable":true}},"type":"object","required":["call_id","type","action"],"title":"Function shell tool call","description":"A tool representing a request to execute one or more shell commands."},"FunctionShellActionParam":{"properties":{"commands":{"items":{"type":"string"},"type":"array","description":"Ordered shell commands for the execution environment to run."},"timeout_ms":{"type":"integer","description":"Maximum wall-clock time in milliseconds to allow the shell commands to run.","nullable":true},"max_output_length":{"type":"integer","description":"Maximum number of UTF-8 characters to capture from combined stdout and stderr output.","nullable":true}},"type":"object","required":["commands"],"title":"Function shell action","description":"Commands and limits describing how to run the function shell tool call."},"FunctionShellCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"],"title":"Function shell call status","description":"Status values reported for function shell tool calls."},"FunctionShellCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the item. Always `function_shell_call_output`.","default":"shell_call_output"},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContentParam"},"type":"array","description":"Captured chunks of stdout and stderr output, along with their associated outcomes."},"max_output_length":{"type":"integer","description":"The maximum number of UTF-8 characters captured for this shell call's combined output.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function shell tool call output","description":"The streamed output items emitted by a function shell tool call."},"FunctionShellCallOutputContentParam":{"properties":{"stdout":{"type":"string","maxLength":10485760,"description":"Captured stdout output for this chunk of the shell call."},"stderr":{"type":"string","maxLength":10485760,"description":"Captured stderr output for this chunk of the shell call."},"outcome":{"$ref":"#/components/schemas/FunctionShellCallOutputOutcomeParam","description":"The exit or timeout outcome associated with this chunk."}},"type":"object","required":["stdout","stderr","outcome"],"title":"Function shell output chunk","description":"Captured stdout and stderr for a portion of a function shell tool call output."},"FunctionShellCallOutputOutcomeParam":{"title":"Function shell call outcome","description":"The exit or timeout outcome associated with this chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcomeParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcomeParam"}]},"FunctionShellCallOutputTimeoutOutcomeParam":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcomeParam":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"The exit code returned by the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCallItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatusParam","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"$ref":"#/components/schemas/ApplyPatchOperationParam","description":"The specific create, delete, or update instruction for the apply_patch tool call."}},"type":"object","required":["type","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call representing a request to create, delete, or update files using diff patches."},"ApplyPatchCallStatusParam":{"type":"string","enum":["in_progress","completed"],"title":"Apply patch call status","description":"Status values reported for apply_patch tool calls."},"ApplyPatchOperationParam":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperationParam"}]},"ApplyPatchCreateFileOperationParam":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"The operation type. Always `create_file`.","default":"create_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to create relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply when creating the file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction for creating a new file via the apply_patch tool."},"ApplyPatchDeleteFileOperationParam":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"The operation type. Always `delete_file`.","default":"delete_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to delete relative to the workspace root."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction for deleting an existing file via the apply_patch tool."},"ApplyPatchUpdateFileOperationParam":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"The operation type. Always `update_file`.","default":"update_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to update relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply to the existing file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction for updating an existing file via the apply_patch tool."},"ApplyPatchToolCallOutputItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatusParam","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","maxLength":10485760,"description":"Optional human-readable log text from the apply patch tool (e.g., patch results or errors).","nullable":true}},"type":"object","required":["type","call_id","status"],"title":"Apply patch tool call output","description":"The streamed output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatusParam":{"type":"string","enum":["completed","failed"],"title":"Apply patch call output status","description":"Outcome values reported for apply_patch tool call outputs."},"MCPListTools":{"type":"object","title":"MCP list tools","description":"A list of tools available on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_list_tools"],"default":"mcp_list_tools","description":"The type of the item. Always `mcp_list_tools`.\n"},"id":{"type":"string","description":"The unique ID of the list.\n"},"server_label":{"type":"string","description":"The label of the MCP server.\n"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/MCPListToolsTool"},"description":"The tools available on the server.\n"},"error":{"type":"string","description":"Error message if the server could not list tools.\n","nullable":true}},"required":["type","id","server_label","tools"]},"MCPListToolsTool":{"type":"object","title":"MCP list tools tool","description":"A tool available on an MCP server.\n","properties":{"name":{"type":"string","description":"The name of the tool.\n"},"description":{"type":"string","description":"The description of the tool.\n","nullable":true},"input_schema":{"type":"object","description":"The JSON schema describing the tool's input.\n"},"annotations":{"type":"object","description":"Additional annotations about the tool.\n","nullable":true}},"required":["name","input_schema"]},"MCPApprovalRequest":{"type":"object","title":"MCP approval request","description":"A request for human approval of a tool invocation.\n","properties":{"type":{"type":"string","enum":["mcp_approval_request"],"default":"mcp_approval_request","description":"The type of the item. Always `mcp_approval_request`.\n"},"id":{"type":"string","description":"The unique ID of the approval request.\n"},"server_label":{"type":"string","description":"The label of the MCP server making the request.\n"},"name":{"type":"string","description":"The name of the tool to run.\n"},"arguments":{"type":"string","description":"A JSON string of arguments for the tool.\n"}},"required":["type","id","server_label","name","arguments"]},"MCPApprovalResponse":{"type":"object","title":"MCP approval response","description":"A response to an MCP approval request.\n","properties":{"type":{"type":"string","enum":["mcp_approval_response"],"default":"mcp_approval_response","description":"The type of the item. Always `mcp_approval_response`.\n"},"id":{"type":"string","description":"The unique ID of the approval response\n","nullable":true},"approval_request_id":{"type":"string","description":"The ID of the approval request being answered.\n"},"approve":{"type":"boolean","description":"Whether the request was approved.\n"},"reason":{"type":"string","description":"Optional reason for the decision.\n","nullable":true}},"required":["type","request_id","approve","approval_request_id"]},"MCPToolCall":{"type":"object","title":"MCP tool call","description":"An invocation of a tool on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_call"],"default":"mcp_call","description":"The type of the item. Always `mcp_call`.\n"},"id":{"type":"string","description":"The unique ID of the tool call.\n"},"server_label":{"type":"string","description":"The label of the MCP server running the tool.\n"},"name":{"type":"string","description":"The name of the tool that was run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool.\n"},"output":{"type":"string","description":"The output from the tool call.\n","nullable":true},"error":{"type":"string","description":"The error from the tool call, if any.\n","nullable":true},"status":{"$ref":"#/components/schemas/MCPToolCallStatus","description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"},"approval_request_id":{"type":"string","description":"Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n","nullable":true}},"required":["type","id","server_label","name","arguments"]},"MCPToolCallStatus":{"type":"string","enum":["in_progress","completed","incomplete","calling","failed"]},"CustomToolCallOutput":{"type":"object","title":"Custom tool call output","description":"The output of a custom tool call from your code, being sent back to the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call_output"],"default":"custom_tool_call_output","description":"The type of the custom tool call output. Always `custom_tool_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call output in the platform.\n"},"call_id":{"type":"string","description":"The call ID, used to map this custom tool call output to a custom tool call.\n"},"output":{"description":"The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n","anyOf":[{"type":"string","description":"A string of the output of the custom tool call.\n","title":"string output"},{"type":"array","items":{"$ref":"#/components/schemas/FunctionAndCustomToolCallOutput"},"title":"output content list","description":"Text, image, or file output of the custom tool call.\n"}]}},"required":["type","call_id","output"]},"FunctionAndCustomToolCallOutput":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"CustomToolCall":{"type":"object","title":"Custom tool call","description":"A call to a custom tool created by the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call"],"default":"custom_tool_call","description":"The type of the custom tool call. Always `custom_tool_call`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call in the platform.\n"},"call_id":{"type":"string","description":"An identifier used to map this custom tool call to a tool call output.\n"},"name":{"type":"string","description":"The name of the custom tool being called.\n"},"input":{"type":"string","description":"The input for the custom tool call generated by the model.\n"}},"required":["type","call_id","name","input"]},"ItemReferenceParam":{"properties":{"type":{"type":"string","nullable":true,"enum":["item_reference"],"description":"The type of item to reference. Always `item_reference`.","default":"item_reference"},"id":{"type":"string","description":"The ID of the item to reference."}},"type":"object","required":["id"],"title":"Item reference","description":"An internal identifier for an item to reference."},"CompactResource":{"properties":{"id":{"type":"string","description":"The unique identifier for the compacted response."},"object":{"type":"string","enum":["response.compaction"],"description":"The object type. Always `response.compaction`.","default":"response.compaction"},"output":{"type":"array","description":"The compacted list of output items. This is a list of all user messages, followed by a single compaction item.","items":{"$ref":"#/components/schemas/OutputItem"}},"created_at":{"type":"integer","description":"Unix timestamp (in seconds) when the compacted conversation was created."},"usage":{"$ref":"#/components/schemas/ResponseUsage","description":"Token accounting for the compaction pass, including cached, reasoning, and total tokens."}},"type":"object","required":["id","object","output","created_at","usage"],"title":"The compacted response object"},"OutputItem":{"anyOf":[{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/FunctionShellCall"},{"$ref":"#/components/schemas/FunctionShellCallOutput"},{"$ref":"#/components/schemas/ApplyPatchToolCall"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutput"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/CustomToolCall"}],"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"]},"FunctionShellCall":{"properties":{"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `shell_call`.","default":"shell_call"},"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the function shell tool call generated by the model."},"action":{"$ref":"#/components/schemas/FunctionShellAction","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/LocalShellCallStatus","description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","action","status"],"title":"Function shell tool call","description":"A tool call that executes one or more shell commands in a managed environment."},"FunctionShellAction":{"properties":{"commands":{"items":{"type":"string","description":"A list of commands to run."},"type":"array"},"timeout_ms":{"type":"integer","description":"Optional timeout in milliseconds for the commands.","nullable":true},"max_output_length":{"type":"integer","description":"Optional maximum number of characters to return from each command.","nullable":true}},"type":"object","required":["commands","timeout_ms","max_output_length"],"title":"Shell exec action","description":"Execute a shell command."},"LocalShellCallStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionShellCallOutput":{"properties":{"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the shell call output. Always `shell_call_output`.","default":"shell_call_output"},"id":{"type":"string","description":"The unique ID of the shell call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContent"},"type":"array","description":"An array of shell call output contents"},"max_output_length":{"type":"integer","description":"The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.","nullable":true},"created_by":{"type":"string"}},"type":"object","required":["type","id","call_id","output","max_output_length"],"title":"Shell call output","description":"The output of a shell tool call."},"FunctionShellCallOutputContent":{"properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"outcome":{"title":"Function shell call outcome","description":"Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcome"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcome"}]},"created_by":{"type":"string"}},"type":"object","required":["stdout","stderr","outcome"],"title":"Shell call output content","description":"The content of a shell call output."},"FunctionShellCallOutputTimeoutOutcome":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcome":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"Exit code from the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCall":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatus","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations applied via apply_patch.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperation"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperation"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperation"}]},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call that applies file diffs by creating, deleting, or updating files."},"ApplyPatchCallStatus":{"type":"string","enum":["in_progress","completed"]},"ApplyPatchCreateFileOperation":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"Create a new file with the provided diff.","default":"create_file"},"path":{"type":"string","description":"Path of the file to create."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction describing how to create a file via the apply_patch tool."},"ApplyPatchDeleteFileOperation":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"Delete the specified file.","default":"delete_file"},"path":{"type":"string","description":"Path of the file to delete."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction describing how to delete a file via the apply_patch tool."},"ApplyPatchUpdateFileOperation":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"Update an existing file with the provided diff.","default":"update_file"},"path":{"type":"string","description":"Path of the file to update."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction describing how to update a file via the apply_patch tool."},"ApplyPatchToolCallOutput":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatus","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","description":"Optional textual output returned by the apply patch tool.","nullable":true},"created_by":{"type":"string","description":"The ID of the entity that created this tool call output."}},"type":"object","required":["type","id","call_id","status"],"title":"Apply patch tool call output","description":"The output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatus":{"type":"string","enum":["completed","failed"]},"ResponseUsage":{"type":"object","description":"Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.\n","properties":{"input_tokens":{"type":"integer","description":"The number of input tokens."},"input_tokens_details":{"type":"object","description":"A detailed breakdown of the input tokens.","properties":{"cached_tokens":{"type":"integer","description":"The number of tokens retrieved from cache. See prompt caching for details.\n"},"cache_write_tokens":{"type":"integer","description":"The number of tokens written to cache. Nexos extension.\n"}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","description":"The number of output tokens."},"output_tokens_details":{"type":"object","description":"A detailed breakdown of the output tokens.","properties":{"reasoning_tokens":{"type":"integer","description":"The number of reasoning tokens."}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","description":"The total number of tokens used."},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]}}},"paths":{"/v1/responses/compact":{"post":{"tags":["Responses"],"summary":"Compact a response","description":"Compact conversation","operationId":"CompactConversation","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompactResponseMethodPublicBody"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/CompactResponseMethodPublicBody"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompactResource"}}}}}}}}}
````

## Get input token counts

> Get input token counts.\
> \
> \*\*Note:\*\* this operation is currently rejected by the upstream providers of all\
> available models (it requires provider-side Responses API support that none of\
> the currently configured providers offer).<br>

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Responses","description":"Create and manage model responses."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: nexos-...` for a user key or `X-Api-Key: nexos-team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"TokenCountsBody":{"properties":{"model":{"type":"string","description":"Model ID used to generate the response, like `gpt-4o` or `o3`.","nullable":true},"input":{"description":"Text, image, or file inputs to the model, used to generate a response","anyOf":[{"type":"string","maxLength":10485760,"description":"A text input to the model, equivalent to a text input with the `user` role."},{"items":{"$ref":"#/components/schemas/InputItem"},"type":"array"}],"nullable":true},"previous_response_id":{"type":"string","description":"The unique ID of the previous response to the model. Use this to create multi-turn conversations.","nullable":true},"tools":{"items":{"$ref":"#/components/schemas/responses_Tool"},"type":"array","description":"An array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter.","nullable":true},"text":{"$ref":"#/components/schemas/ResponseTextParam","nullable":true},"reasoning":{"$ref":"#/components/schemas/Reasoning","description":"**gpt-5 and o-series models only**","nullable":true},"truncation":{"$ref":"#/components/schemas/TruncationEnum","description":"The truncation strategy to use for the model response. - `auto`: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. - `disabled` (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error."},"instructions":{"type":"string","description":"A system (or developer) message inserted into the model's context.\nWhen used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.","nullable":true},"conversation":{"$ref":"#/components/schemas/ConversationParam","nullable":true},"tool_choice":{"$ref":"#/components/schemas/ToolChoiceParam","nullable":true},"parallel_tool_calls":{"type":"boolean","description":"Whether to allow the model to run tool calls in parallel.","nullable":true}},"type":"object","required":[]},"InputItem":{"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/EasyInputMessage"},{"$ref":"#/components/schemas/Item"},{"$ref":"#/components/schemas/ItemReferenceParam"}]},"EasyInputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n","properties":{"role":{"type":"string","description":"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n","enum":["user","assistant","system","developer"]},"content":{"description":"Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n","anyOf":[{"type":"string","title":"Text input","description":"A text input to the model.\n"},{"$ref":"#/components/schemas/InputMessageContentList"}]},"type":{"type":"string","description":"The type of the message input. Always `message`.\n","enum":["message"],"default":"message"}},"required":["role","content"]},"InputMessageContentList":{"type":"array","title":"Input item content list","description":"A list of one or many input items to the model, containing different content \ntypes.\n","items":{"$ref":"#/components/schemas/InputContent"}},"InputContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"InputTextContent":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContent":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/ImageDetail","description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type","detail"],"title":"Input image","description":"An image input to the model. See the vision guide for details."},"ImageDetail":{"type":"string","enum":["low","high","auto"]},"InputFileContent":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","description":"The name of the file to be sent to the model."},"file_url":{"type":"string","description":"The URL of the file to be sent to the model."},"file_data":{"type":"string","description":"The content of the file to be sent to the model.\n"}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"Item":{"type":"object","description":"Content item used to generate a response.\n","discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/responses_InputMessage"},{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ComputerCallOutputItemParam"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/FunctionCallOutputItemParam"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/CompactionSummaryItemParam"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/LocalShellToolCallOutput"},{"$ref":"#/components/schemas/FunctionShellCallItemParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutputItemParam"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/MCPApprovalResponse"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/CustomToolCallOutput"},{"$ref":"#/components/schemas/CustomToolCall"}]},"responses_InputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n","properties":{"type":{"type":"string","description":"The type of the message input. Always set to `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the message input. One of `user`, `system`, or `developer`.\n","enum":["user","system","developer"]},"status":{"type":"string","description":"The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]},"content":{"$ref":"#/components/schemas/InputMessageContentList"}},"required":["role","content"]},"OutputMessage":{"type":"object","title":"Output message","description":"An output message from the model.\n","properties":{"id":{"type":"string","description":"The unique ID of the output message.\n"},"type":{"type":"string","description":"The type of the output message. Always `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the output message. Always `assistant`.\n","enum":["assistant"]},"content":{"type":"array","description":"The content of the output message.\n","items":{"$ref":"#/components/schemas/OutputMessageContent"}},"status":{"type":"string","description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","type","role","content","status"]},"OutputMessageContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"}]},"OutputTextContent":{"properties":{"type":{"type":"string","enum":["output_text"],"description":"The type of the output text. Always `output_text`.","default":"output_text"},"text":{"type":"string","description":"The text output from the model."},"annotations":{"items":{"$ref":"#/components/schemas/responses_Annotation"},"type":"array","description":"The annotations of the text output."},"logprobs":{"items":{"$ref":"#/components/schemas/LogProb"},"type":"array"}},"type":"object","required":["type","text","annotations"],"title":"Output text","description":"A text output from the model."},"responses_Annotation":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FileCitationBody"},{"$ref":"#/components/schemas/UrlCitationBody"},{"$ref":"#/components/schemas/ContainerFileCitationBody"},{"$ref":"#/components/schemas/FilePath"}]},"FileCitationBody":{"properties":{"type":{"type":"string","enum":["file_citation"],"description":"The type of the file citation. Always `file_citation`.","default":"file_citation"},"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","description":"The index of the file in the list of files."},"filename":{"type":"string","description":"The filename of the file cited."}},"type":"object","required":["type","file_id","index","filename"],"title":"File citation","description":"A citation to a file."},"UrlCitationBody":{"properties":{"type":{"type":"string","enum":["url_citation"],"description":"The type of the URL citation. Always `url_citation`.","default":"url_citation"},"url":{"type":"string","description":"The URL of the web resource."},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message."},"title":{"type":"string","description":"The title of the web resource."}},"type":"object","required":["type","url","start_index","end_index","title"],"title":"URL citation","description":"A citation for a web resource used to generate a model response."},"ContainerFileCitationBody":{"properties":{"type":{"type":"string","enum":["container_file_citation"],"description":"The type of the container file citation. Always `container_file_citation`.","default":"container_file_citation"},"container_id":{"type":"string","description":"The ID of the container file."},"file_id":{"type":"string","description":"The ID of the file."},"start_index":{"type":"integer","description":"The index of the first character of the container file citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the container file citation in the message."},"filename":{"type":"string","description":"The filename of the container file cited."}},"type":"object","required":["type","container_id","file_id","start_index","end_index","filename"],"title":"Container file citation","description":"A citation for a container file used to generate a model response."},"FilePath":{"type":"object","title":"File path","description":"A path to a file.\n","properties":{"type":{"type":"string","description":"The type of the file path. Always `file_path`.\n","enum":["file_path"]},"file_id":{"type":"string","description":"The ID of the file.\n"},"index":{"type":"integer","description":"The index of the file in the list of files.\n"}},"required":["type","file_id","index"]},"LogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"},"top_logprobs":{"items":{"$ref":"#/components/schemas/TopLogProb"},"type":"array"}},"type":"object","required":["token","logprob","bytes","top_logprobs"],"title":"Log probability","description":"The log probability of a token."},"TopLogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"}},"type":"object","required":["token","logprob","bytes"],"title":"Top log probability","description":"The top log probability of a token."},"RefusalContent":{"properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the refusal. Always `refusal`.","default":"refusal"},"refusal":{"type":"string","description":"The refusal explanation from the model."}},"type":"object","required":["type","refusal"],"title":"Refusal","description":"A refusal from the model."},"FileSearchToolCall":{"type":"object","title":"File search tool call","description":"The results of a file search tool call. See the file search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the file search tool call.\n"},"type":{"type":"string","enum":["file_search_call"],"default":"file_search_call","description":"The type of the file search tool call. Always `file_search_call`.\n"},"status":{"type":"string","description":"The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n","enum":["in_progress","searching","completed","incomplete","failed"]},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files.\n"},"results":{"type":"array","description":"The results of the file search tool call.\n","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The unique ID of the file.\n"},"text":{"type":"string","description":"The text that was retrieved from the file.\n"},"filename":{"type":"string","description":"The name of the file.\n"},"attributes":{"$ref":"#/components/schemas/VectorStoreFileAttributes"},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1.\n"}}},"nullable":true}}},"VectorStoreFileAttributes":{"type":"object","nullable":true,"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n","maxProperties":16,"propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"ComputerToolCall":{"type":"object","title":"Computer tool call","description":"A tool call to a computer use tool. See the computer use guide for more information.\n","properties":{"type":{"type":"string","description":"The type of the computer call. Always `computer_call`.","enum":["computer_call"],"default":"computer_call"},"id":{"type":"string","description":"The unique ID of the computer call."},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output.\n"},"action":{"$ref":"#/components/schemas/ComputerAction"},"pending_safety_checks":{"type":"array","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","id","action","call_id","pending_safety_checks","status"]},"ComputerAction":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ClickParam"},{"$ref":"#/components/schemas/DoubleClickAction"},{"$ref":"#/components/schemas/Drag"},{"$ref":"#/components/schemas/KeyPressAction"},{"$ref":"#/components/schemas/Move"},{"$ref":"#/components/schemas/Screenshot"},{"$ref":"#/components/schemas/Scroll"},{"$ref":"#/components/schemas/Type"},{"$ref":"#/components/schemas/Wait"}]},"ClickParam":{"properties":{"type":{"type":"string","enum":["click"],"description":"Specifies the event type. For a click action, this property is always `click`.","default":"click"},"button":{"$ref":"#/components/schemas/ClickButtonType","description":"Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."},"x":{"type":"integer","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","description":"The y-coordinate where the click occurred."}},"type":"object","required":["type","button","x","y"],"title":"Click","description":"A click action."},"ClickButtonType":{"type":"string","enum":["left","right","wheel","back","forward"]},"DoubleClickAction":{"properties":{"type":{"type":"string","enum":["double_click"],"description":"Specifies the event type. For a double click action, this property is always set to `double_click`.","default":"double_click"},"x":{"type":"integer","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","description":"The y-coordinate where the double click occurred."}},"type":"object","required":["type","x","y"],"title":"DoubleClick","description":"A double click action."},"Drag":{"type":"object","title":"Drag","description":"A drag action.\n","properties":{"type":{"type":"string","enum":["drag"],"default":"drag","description":"Specifies the event type. For a drag action, this property is \nalways set to `drag`.\n"},"path":{"type":"array","description":"An array of coordinates representing the path of the drag action. Coordinates will appear as an array\nof objects, eg\n```\n[\n  { x: 100, y: 200 },\n  { x: 200, y: 300 }\n]\n```\n","items":{"$ref":"#/components/schemas/DragPoint"}}},"required":["type","path"]},"DragPoint":{"properties":{"x":{"type":"integer","description":"The x-coordinate."},"y":{"type":"integer","description":"The y-coordinate."}},"type":"object","required":["x","y"],"title":"Coordinate","description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."},"KeyPressAction":{"properties":{"type":{"type":"string","enum":["keypress"],"description":"Specifies the event type. For a keypress action, this property is always set to `keypress`.","default":"keypress"},"keys":{"items":{"type":"string","description":"One of the keys the model is requesting to be pressed."},"type":"array","description":"The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key."}},"type":"object","required":["type","keys"],"title":"KeyPress","description":"A collection of keypresses the model would like to perform."},"Move":{"type":"object","title":"Move","description":"A mouse move action.\n","properties":{"type":{"type":"string","enum":["move"],"default":"move","description":"Specifies the event type. For a move action, this property is \nalways set to `move`.\n"},"x":{"type":"integer","description":"The x-coordinate to move to.\n"},"y":{"type":"integer","description":"The y-coordinate to move to.\n"}},"required":["type","x","y"]},"Screenshot":{"type":"object","title":"Screenshot","description":"A screenshot action.\n","properties":{"type":{"type":"string","enum":["screenshot"],"default":"screenshot","description":"Specifies the event type. For a screenshot action, this property is \nalways set to `screenshot`.\n"}},"required":["type"]},"Scroll":{"type":"object","title":"Scroll","description":"A scroll action.\n","properties":{"type":{"type":"string","enum":["scroll"],"default":"scroll","description":"Specifies the event type. For a scroll action, this property is \nalways set to `scroll`.\n"},"x":{"type":"integer","description":"The x-coordinate where the scroll occurred.\n"},"y":{"type":"integer","description":"The y-coordinate where the scroll occurred.\n"},"scroll_x":{"type":"integer","description":"The horizontal scroll distance.\n"},"scroll_y":{"type":"integer","description":"The vertical scroll distance.\n"}},"required":["type","x","y","scroll_x","scroll_y"]},"Type":{"type":"object","title":"Type","description":"An action to type in text.\n","properties":{"type":{"type":"string","enum":["type"],"default":"type","description":"Specifies the event type. For a type action, this property is \nalways set to `type`.\n"},"text":{"type":"string","description":"The text to type.\n"}},"required":["type","text"]},"Wait":{"type":"object","title":"Wait","description":"A wait action.\n","properties":{"type":{"type":"string","enum":["wait"],"default":"wait","description":"Specifies the event type. For a wait action, this property is \nalways set to `wait`.\n"}},"required":["type"]},"ComputerCallSafetyCheckParam":{"properties":{"id":{"type":"string","description":"The ID of the pending safety check."},"code":{"type":"string","description":"The type of the pending safety check.","nullable":true},"message":{"type":"string","description":"Details about the pending safety check.","nullable":true}},"type":"object","required":["id"],"description":"A pending safety check for the computer call."},"ComputerCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The ID of the computer tool call output.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The ID of the computer tool call that produced the output."},"type":{"type":"string","enum":["computer_call_output"],"description":"The type of the computer tool call output. Always `computer_call_output`.","default":"computer_call_output"},"output":{"$ref":"#/components/schemas/ComputerScreenshotImage"},"acknowledged_safety_checks":{"items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"type":"array","description":"The safety checks reported by the API that have been acknowledged by the developer.","nullable":true},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Computer tool call output","description":"The output of a computer tool call."},"ComputerScreenshotImage":{"type":"object","description":"A computer screenshot image used with the computer use tool.\n","properties":{"type":{"type":"string","enum":["computer_screenshot"],"default":"computer_screenshot","description":"Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n"},"image_url":{"type":"string","description":"The URL of the screenshot image."},"file_id":{"type":"string","description":"The identifier of an uploaded file that contains the screenshot."}},"required":["type"]},"FunctionCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"WebSearchToolCall":{"type":"object","title":"Web search tool call","description":"The results of a web search tool call. See the web search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the web search tool call.\n"},"type":{"type":"string","enum":["web_search_call"],"default":"web_search_call","description":"The type of the web search tool call. Always `web_search_call`.\n"},"status":{"type":"string","description":"The status of the web search tool call.\n","enum":["in_progress","searching","completed","failed"]},"action":{"type":"object","description":"An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find).\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/WebSearchActionSearch"},{"$ref":"#/components/schemas/WebSearchActionOpenPage"},{"$ref":"#/components/schemas/WebSearchActionFind"}]}},"required":["id","type","status","action"]},"WebSearchActionSearch":{"type":"object","title":"Search action","description":"Action type \"search\" - Performs a web search query.\n","properties":{"type":{"type":"string","enum":["search"],"description":"The action type.\n"},"query":{"type":"string","description":"The search query.\n"},"sources":{"type":"array","title":"Web search sources","description":"The sources used in the search.\n","items":{"type":"object","title":"Web search source","description":"A source used in the search.\n","properties":{"type":{"type":"string","enum":["url"],"description":"The type of source. Always `url`.\n"},"url":{"type":"string","description":"The URL of the source.\n"}},"required":["type","url"]}}},"required":["type","query"]},"WebSearchActionOpenPage":{"type":"object","title":"Open page action","description":"Action type \"open_page\" - Opens a specific URL from search results.\n","properties":{"type":{"type":"string","enum":["open_page"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL opened by the model.\n"}},"required":["type","url"]},"WebSearchActionFind":{"type":"object","title":"Find action","description":"Action type \"find\": Searches for a pattern within a loaded page.\n","properties":{"type":{"type":"string","enum":["find"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL of the page searched for the pattern.\n"},"pattern":{"type":"string","description":"The pattern or text to search for within the page.\n"}},"required":["type","url","pattern"]},"FunctionToolCall":{"type":"object","title":"Function tool call","description":"A tool call to run a function. Used when the model requests your code to execute a function.\n","properties":{"id":{"type":"string","description":"The unique ID of the function tool call.\n"},"type":{"type":"string","enum":["function_call"],"default":"function_call","description":"The type of the function tool call. Always `function_call`.\n"},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model.\n"},"name":{"type":"string","description":"The name of the function to run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","name","arguments"]},"FunctionCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function tool call generated by the model."},"type":{"type":"string","enum":["function_call_output"],"description":"The type of the function tool call output. Always `function_call_output`.","default":"function_call_output"},"output":{"description":"Text, image, or file output of the function tool call.","anyOf":[{"type":"string","maxLength":10485760,"description":"A JSON string of the output of the function tool call."},{"items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContentParam"},{"$ref":"#/components/schemas/InputImageContentParamAutoParam"},{"$ref":"#/components/schemas/InputFileContentParam"}]},"type":"array"}]},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function tool call output","description":"The output of a function tool call."},"InputTextContentParam":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","maxLength":10485760,"description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContentParamAutoParam":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","maxLength":20971520,"nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/DetailEnum","nullable":true,"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type"],"title":"Input image","description":"An image input to the model."},"DetailEnum":{"type":"string","enum":["low","high","auto"]},"InputFileContentParam":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","nullable":true,"description":"The name of the file to be sent to the model."},"file_data":{"type":"string","maxLength":33554432,"nullable":true,"description":"The base64-encoded data of the file to be sent to the model."},"file_url":{"type":"string","nullable":true,"description":"The URL of the file to be sent to the model."}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"ReasoningItem":{"type":"object","description":"A description of the chain of thought used by a reasoning model while generating a response.\nInclude these items in your input for subsequent turns if you are manually managing context.\n","title":"Reasoning","properties":{"type":{"type":"string","description":"The type of the object. Always `reasoning`.\n","enum":["reasoning"],"default":"reasoning"},"id":{"type":"string","description":"The unique identifier of the reasoning content.\n"},"encrypted_content":{"type":"string","description":"The encrypted content of the reasoning item - populated when a response is\ngenerated with `reasoning.encrypted_content` in the `include` parameter.\n","nullable":true},"summary":{"type":"array","description":"Reasoning summary content.\n","items":{"$ref":"#/components/schemas/Summary"}},"content":{"type":"array","description":"Reasoning text content.\n","items":{"$ref":"#/components/schemas/ReasoningTextContent"}},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","summary","type"]},"Summary":{"properties":{"type":{"type":"string","enum":["summary_text"],"description":"The type of the object. Always `summary_text`.","default":"summary_text"},"text":{"type":"string","description":"A summary of the reasoning output from the model so far."}},"type":"object","required":["type","text"],"title":"Summary text","description":"A summary text from the model."},"ReasoningTextContent":{"properties":{"type":{"type":"string","enum":["reasoning_text"],"description":"The type of the reasoning text. Always `reasoning_text`.","default":"reasoning_text"},"text":{"type":"string","description":"The reasoning text from the model."}},"type":"object","required":["type","text"],"title":"ReasoningTextContent","description":"Reasoning text from the model."},"CompactionSummaryItemParam":{"properties":{"id":{"type":"string","description":"The ID of the compaction item.","nullable":true},"type":{"type":"string","enum":["compaction"],"description":"The type of the item. Always `compaction`.","default":"compaction"},"encrypted_content":{"type":"string","maxLength":10485760}},"type":"object","required":["type","encrypted_content"],"title":"Compaction item","description":"A compaction item generated by the `v1/responses/compact` API."},"ImageGenToolCall":{"type":"object","title":"Image generation call","description":"An image generation request made by the model.\n","properties":{"type":{"type":"string","enum":["image_generation_call"],"default":"image_generation_call","description":"The type of the image generation call. Always `image_generation_call`.\n"},"id":{"type":"string","description":"The unique ID of the image generation call.\n"},"status":{"type":"string","enum":["in_progress","completed","generating","failed"],"description":"The status of the image generation call.\n"},"result":{"type":"string","description":"The generated image encoded in base64.\n","nullable":true}},"required":["type","id","status","result"]},"CodeInterpreterToolCall":{"type":"object","title":"Code interpreter tool call","description":"A tool call to run code.\n","properties":{"type":{"type":"string","enum":["code_interpreter_call"],"default":"code_interpreter_call","description":"The type of the code interpreter tool call. Always `code_interpreter_call`.\n"},"id":{"type":"string","description":"The unique ID of the code interpreter tool call.\n"},"status":{"type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"description":"The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"},"container_id":{"type":"string","description":"The ID of the container used to run the code.\n"},"code":{"type":"string","description":"The code to run, or null if not available.\n","nullable":true},"outputs":{"type":"array","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CodeInterpreterOutputLogs"},{"$ref":"#/components/schemas/CodeInterpreterOutputImage"}]},"discriminator":{"propertyName":"type"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n","nullable":true}},"required":["type","id","status","container_id","code","outputs"]},"CodeInterpreterOutputLogs":{"properties":{"type":{"type":"string","enum":["logs"],"description":"The type of the output. Always `logs`.","default":"logs"},"logs":{"type":"string","description":"The logs output from the code interpreter."}},"type":"object","required":["type","logs"],"title":"Code interpreter output logs","description":"The logs output from the code interpreter."},"CodeInterpreterOutputImage":{"properties":{"type":{"type":"string","enum":["image"],"description":"The type of the output. Always `image`.","default":"image"},"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"type":"object","required":["type","url"],"title":"Code interpreter output image","description":"The image output from the code interpreter."},"LocalShellToolCall":{"type":"object","title":"Local shell call","description":"A tool call to run a command on the local shell.\n","properties":{"type":{"type":"string","enum":["local_shell_call"],"default":"local_shell_call","description":"The type of the local shell call. Always `local_shell_call`.\n"},"id":{"type":"string","description":"The unique ID of the local shell call.\n"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"action":{"$ref":"#/components/schemas/LocalShellExecAction"},"status":{"type":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the local shell call.\n"}},"required":["type","id","call_id","action","status"]},"LocalShellExecAction":{"properties":{"type":{"type":"string","enum":["exec"],"description":"The type of the local shell action. Always `exec`.","default":"exec"},"command":{"items":{"type":"string"},"type":"array","description":"The command to run."},"timeout_ms":{"type":"integer","nullable":true,"description":"Optional timeout in milliseconds for the command."},"working_directory":{"type":"string","nullable":true,"description":"Optional working directory to run the command in."},"env":{"additionalProperties":{"type":"string"},"type":"object","description":"Environment variables to set for the command."},"user":{"type":"string","nullable":true,"description":"Optional user to run the command as."}},"type":"object","required":["type","command","env"],"title":"Local shell exec action","description":"Execute a shell command on the server."},"LocalShellToolCallOutput":{"type":"object","title":"Local shell call output","description":"The output of a local shell tool call.\n","properties":{"type":{"type":"string","enum":["local_shell_call_output"],"default":"local_shell_call_output","description":"The type of the local shell tool call output. Always `local_shell_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"output":{"type":"string","description":"A JSON string of the output of the local shell tool call.\n"},"status":{"ype":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n","nullable":true}},"required":["id","type","call_id","output"]},"FunctionShellCallItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `function_shell_call`.","default":"shell_call"},"action":{"$ref":"#/components/schemas/FunctionShellActionParam","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/FunctionShellCallItemStatus","nullable":true}},"type":"object","required":["call_id","type","action"],"title":"Function shell tool call","description":"A tool representing a request to execute one or more shell commands."},"FunctionShellActionParam":{"properties":{"commands":{"items":{"type":"string"},"type":"array","description":"Ordered shell commands for the execution environment to run."},"timeout_ms":{"type":"integer","description":"Maximum wall-clock time in milliseconds to allow the shell commands to run.","nullable":true},"max_output_length":{"type":"integer","description":"Maximum number of UTF-8 characters to capture from combined stdout and stderr output.","nullable":true}},"type":"object","required":["commands"],"title":"Function shell action","description":"Commands and limits describing how to run the function shell tool call."},"FunctionShellCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"],"title":"Function shell call status","description":"Status values reported for function shell tool calls."},"FunctionShellCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the item. Always `function_shell_call_output`.","default":"shell_call_output"},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContentParam"},"type":"array","description":"Captured chunks of stdout and stderr output, along with their associated outcomes."},"max_output_length":{"type":"integer","description":"The maximum number of UTF-8 characters captured for this shell call's combined output.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function shell tool call output","description":"The streamed output items emitted by a function shell tool call."},"FunctionShellCallOutputContentParam":{"properties":{"stdout":{"type":"string","maxLength":10485760,"description":"Captured stdout output for this chunk of the shell call."},"stderr":{"type":"string","maxLength":10485760,"description":"Captured stderr output for this chunk of the shell call."},"outcome":{"$ref":"#/components/schemas/FunctionShellCallOutputOutcomeParam","description":"The exit or timeout outcome associated with this chunk."}},"type":"object","required":["stdout","stderr","outcome"],"title":"Function shell output chunk","description":"Captured stdout and stderr for a portion of a function shell tool call output."},"FunctionShellCallOutputOutcomeParam":{"title":"Function shell call outcome","description":"The exit or timeout outcome associated with this chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcomeParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcomeParam"}]},"FunctionShellCallOutputTimeoutOutcomeParam":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcomeParam":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"The exit code returned by the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCallItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatusParam","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"$ref":"#/components/schemas/ApplyPatchOperationParam","description":"The specific create, delete, or update instruction for the apply_patch tool call."}},"type":"object","required":["type","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call representing a request to create, delete, or update files using diff patches."},"ApplyPatchCallStatusParam":{"type":"string","enum":["in_progress","completed"],"title":"Apply patch call status","description":"Status values reported for apply_patch tool calls."},"ApplyPatchOperationParam":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperationParam"}]},"ApplyPatchCreateFileOperationParam":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"The operation type. Always `create_file`.","default":"create_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to create relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply when creating the file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction for creating a new file via the apply_patch tool."},"ApplyPatchDeleteFileOperationParam":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"The operation type. Always `delete_file`.","default":"delete_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to delete relative to the workspace root."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction for deleting an existing file via the apply_patch tool."},"ApplyPatchUpdateFileOperationParam":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"The operation type. Always `update_file`.","default":"update_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to update relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply to the existing file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction for updating an existing file via the apply_patch tool."},"ApplyPatchToolCallOutputItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatusParam","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","maxLength":10485760,"description":"Optional human-readable log text from the apply patch tool (e.g., patch results or errors).","nullable":true}},"type":"object","required":["type","call_id","status"],"title":"Apply patch tool call output","description":"The streamed output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatusParam":{"type":"string","enum":["completed","failed"],"title":"Apply patch call output status","description":"Outcome values reported for apply_patch tool call outputs."},"MCPListTools":{"type":"object","title":"MCP list tools","description":"A list of tools available on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_list_tools"],"default":"mcp_list_tools","description":"The type of the item. Always `mcp_list_tools`.\n"},"id":{"type":"string","description":"The unique ID of the list.\n"},"server_label":{"type":"string","description":"The label of the MCP server.\n"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/MCPListToolsTool"},"description":"The tools available on the server.\n"},"error":{"type":"string","description":"Error message if the server could not list tools.\n","nullable":true}},"required":["type","id","server_label","tools"]},"MCPListToolsTool":{"type":"object","title":"MCP list tools tool","description":"A tool available on an MCP server.\n","properties":{"name":{"type":"string","description":"The name of the tool.\n"},"description":{"type":"string","description":"The description of the tool.\n","nullable":true},"input_schema":{"type":"object","description":"The JSON schema describing the tool's input.\n"},"annotations":{"type":"object","description":"Additional annotations about the tool.\n","nullable":true}},"required":["name","input_schema"]},"MCPApprovalRequest":{"type":"object","title":"MCP approval request","description":"A request for human approval of a tool invocation.\n","properties":{"type":{"type":"string","enum":["mcp_approval_request"],"default":"mcp_approval_request","description":"The type of the item. Always `mcp_approval_request`.\n"},"id":{"type":"string","description":"The unique ID of the approval request.\n"},"server_label":{"type":"string","description":"The label of the MCP server making the request.\n"},"name":{"type":"string","description":"The name of the tool to run.\n"},"arguments":{"type":"string","description":"A JSON string of arguments for the tool.\n"}},"required":["type","id","server_label","name","arguments"]},"MCPApprovalResponse":{"type":"object","title":"MCP approval response","description":"A response to an MCP approval request.\n","properties":{"type":{"type":"string","enum":["mcp_approval_response"],"default":"mcp_approval_response","description":"The type of the item. Always `mcp_approval_response`.\n"},"id":{"type":"string","description":"The unique ID of the approval response\n","nullable":true},"approval_request_id":{"type":"string","description":"The ID of the approval request being answered.\n"},"approve":{"type":"boolean","description":"Whether the request was approved.\n"},"reason":{"type":"string","description":"Optional reason for the decision.\n","nullable":true}},"required":["type","request_id","approve","approval_request_id"]},"MCPToolCall":{"type":"object","title":"MCP tool call","description":"An invocation of a tool on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_call"],"default":"mcp_call","description":"The type of the item. Always `mcp_call`.\n"},"id":{"type":"string","description":"The unique ID of the tool call.\n"},"server_label":{"type":"string","description":"The label of the MCP server running the tool.\n"},"name":{"type":"string","description":"The name of the tool that was run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool.\n"},"output":{"type":"string","description":"The output from the tool call.\n","nullable":true},"error":{"type":"string","description":"The error from the tool call, if any.\n","nullable":true},"status":{"$ref":"#/components/schemas/MCPToolCallStatus","description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"},"approval_request_id":{"type":"string","description":"Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n","nullable":true}},"required":["type","id","server_label","name","arguments"]},"MCPToolCallStatus":{"type":"string","enum":["in_progress","completed","incomplete","calling","failed"]},"CustomToolCallOutput":{"type":"object","title":"Custom tool call output","description":"The output of a custom tool call from your code, being sent back to the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call_output"],"default":"custom_tool_call_output","description":"The type of the custom tool call output. Always `custom_tool_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call output in the platform.\n"},"call_id":{"type":"string","description":"The call ID, used to map this custom tool call output to a custom tool call.\n"},"output":{"description":"The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n","anyOf":[{"type":"string","description":"A string of the output of the custom tool call.\n","title":"string output"},{"type":"array","items":{"$ref":"#/components/schemas/FunctionAndCustomToolCallOutput"},"title":"output content list","description":"Text, image, or file output of the custom tool call.\n"}]}},"required":["type","call_id","output"]},"FunctionAndCustomToolCallOutput":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"CustomToolCall":{"type":"object","title":"Custom tool call","description":"A call to a custom tool created by the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call"],"default":"custom_tool_call","description":"The type of the custom tool call. Always `custom_tool_call`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call in the platform.\n"},"call_id":{"type":"string","description":"An identifier used to map this custom tool call to a tool call output.\n"},"name":{"type":"string","description":"The name of the custom tool being called.\n"},"input":{"type":"string","description":"The input for the custom tool call generated by the model.\n"}},"required":["type","call_id","name","input"]},"ItemReferenceParam":{"properties":{"type":{"type":"string","nullable":true,"enum":["item_reference"],"description":"The type of item to reference. Always `item_reference`.","default":"item_reference"},"id":{"type":"string","description":"The ID of the item to reference."}},"type":"object","required":["id"],"title":"Item reference","description":"An internal identifier for an item to reference."},"responses_Tool":{"description":"A tool that can be used to generate a response.\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionTool"},{"$ref":"#/components/schemas/FileSearchTool"},{"$ref":"#/components/schemas/ComputerUsePreviewTool"},{"$ref":"#/components/schemas/WebSearchTool"},{"$ref":"#/components/schemas/MCPTool"},{"$ref":"#/components/schemas/CodeInterpreterTool"},{"$ref":"#/components/schemas/ImageGenTool"},{"$ref":"#/components/schemas/LocalShellToolParam"},{"$ref":"#/components/schemas/FunctionShellToolParam"},{"$ref":"#/components/schemas/CustomToolParam"},{"$ref":"#/components/schemas/WebSearchPreviewTool"},{"$ref":"#/components/schemas/ApplyPatchToolParam"}]},"FunctionTool":{"properties":{"type":{"type":"string","enum":["function"],"description":"The type of the function tool. Always `function`.","default":"function"},"name":{"type":"string","description":"The name of the function to call."},"description":{"type":"string","nullable":true,"description":"A description of the function. Used by the model to determine whether or not to call the function."},"parameters":{"type":"object","nullable":true,"additionalProperties":{},"description":"A JSON schema object describing the parameters of the function."},"strict":{"type":"boolean","nullable":true,"description":"Whether to enforce strict parameter validation. Default `true`."}},"type":"object","required":["type","name","strict","parameters"],"title":"Function","description":"Defines a function in your code that the model can call."},"FileSearchTool":{"properties":{"type":{"type":"string","enum":["file_search"],"description":"The type of the file search tool. Always `file_search`.","default":"file_search"},"vector_store_ids":{"items":{"type":"string"},"type":"array","description":"The IDs of the vector stores to search."},"max_num_results":{"type":"integer","description":"The maximum number of results to return. This number should be between 1 and 50 inclusive."},"ranking_options":{"$ref":"#/components/schemas/RankingOptions","description":"Ranking options for search."},"filters":{"$ref":"#/components/schemas/Filters","description":"A filter to apply.","nullable":true}},"type":"object","required":["type","vector_store_ids"],"title":"File search","description":"Searches uploaded files for relevant content. See the file search guide."},"RankingOptions":{"properties":{"ranker":{"$ref":"#/components/schemas/RankerVersionType","description":"The ranker to use for the file search."},"score_threshold":{"type":"number","description":"The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results."},"hybrid_search":{"$ref":"#/components/schemas/HybridSearchOptions","description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled."}},"type":"object","required":[]},"RankerVersionType":{"type":"string","enum":["auto","default-2024-11-15"]},"HybridSearchOptions":{"properties":{"embedding_weight":{"type":"number","description":"The weight of the embedding in the reciprocal ranking fusion."},"text_weight":{"type":"number","description":"The weight of the text in the reciprocal ranking fusion."}},"type":"object","required":["embedding_weight","text_weight"]},"Filters":{"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]},"ComparisonFilter":{"type":"object","additionalProperties":false,"title":"Comparison Filter","description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.\n","properties":{"type":{"type":"string","default":"eq","enum":["eq","ne","gt","gte","lt","lte"],"description":"Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.\n- `eq`: equals\n- `ne`: not equal\n- `gt`: greater than\n- `gte`: greater than or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `in`: in\n- `nin`: not in\n"},"key":{"type":"string","description":"The key to compare against the value."},"value":{"description":"The value to compare against the attribute key; supports string, number, or boolean types.","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"$ref":"#/components/schemas/ComparisonFilterValueItems"}}]}},"required":["type","key","value"]},"ComparisonFilterValueItems":{"anyOf":[{"type":"string"},{"type":"number"}]},"CompoundFilter":{"type":"object","additionalProperties":false,"title":"Compound Filter","description":"Combine multiple filters using `and` or `or`.","properties":{"type":{"type":"string","description":"Type of operation: `and` or `or`.","enum":["and","or"]},"filters":{"type":"array","description":"Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]}}},"required":["type","filters"]},"ComputerUsePreviewTool":{"properties":{"type":{"type":"string","enum":["computer_use_preview"],"description":"The type of the computer use tool. Always `computer_use_preview`.","default":"computer_use_preview"},"environment":{"$ref":"#/components/schemas/ComputerEnvironment","description":"The type of computer environment to control."},"display_width":{"type":"integer","description":"The width of the computer display."},"display_height":{"type":"integer","description":"The height of the computer display."}},"type":"object","required":["type","environment","display_width","display_height"],"title":"Computer use preview","description":"A tool that controls a virtual computer. Learn more in the computer tool guide."},"ComputerEnvironment":{"type":"string","enum":["windows","mac","linux","ubuntu","browser"]},"WebSearchTool":{"type":"object","title":"Web search","description":"Search the internet for sources related to the prompt. Learn more in the web search tool guide.\n","properties":{"type":{"type":"string","enum":["web_search","web_search_2025_08_26"],"description":"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.","default":"web_search"},"filters":{"type":"object","description":"Filters for the search.\n","properties":{"allowed_domains":{"type":"array","title":"Allowed domains for the search.","description":"Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well.\n\nExample: `[\"pubmed.ncbi.nlm.nih.gov\"]`\n","items":{"type":"string","description":"Allowed domain for the search."},"default":[],"nullable":true}},"nullable":true},"user_location":{"$ref":"#/components/schemas/WebSearchApproximateLocation"},"search_context_size":{"type":"string","enum":["low","medium","high"],"default":"medium","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"required":["type"]},"WebSearchApproximateLocation":{"type":"object","nullable":true,"title":"Web search approximate location","description":"The approximate location of the user.\n","properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","nullable":true,"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`."},"region":{"type":"string","nullable":true,"description":"Free text input for the region of the user, e.g. `California`."},"city":{"type":"string","nullable":true,"description":"Free text input for the city of the user, e.g. `San Francisco`."},"timezone":{"type":"string","nullable":true,"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`."}}},"MCPTool":{"type":"object","title":"MCP tool","description":"Give the model access to tools via remote Model Context Protocol (MCP) servers. Learn more in the MCP guide.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"The type of the MCP tool. Always `mcp`."},"server_label":{"type":"string","description":"A label for this MCP server, used to identify it in tool calls.\n"},"server_url":{"type":"string","description":"The URL for the MCP server. One of `server_url` or `connector_id` must be\nprovided.\n"},"connector_id":{"type":"string","enum":["connector_dropbox","connector_gmail","connector_googlecalendar","connector_googledrive","connector_microsoftteams","connector_outlookcalendar","connector_outlookemail","connector_sharepoint"],"description":"Identifier for service connectors, like those available in ChatGPT. One of\n`server_url` or `connector_id` must be provided.\n\nCurrently supported `connector_id` values are:\n\n- Dropbox: `connector_dropbox`\n- Gmail: `connector_gmail`\n- Google Calendar: `connector_googlecalendar`\n- Google Drive: `connector_googledrive`\n- Microsoft Teams: `connector_microsoftteams`\n- Outlook Calendar: `connector_outlookcalendar`\n- Outlook Email: `connector_outlookemail`\n- SharePoint: `connector_sharepoint`\n"},"authorization":{"type":"string","description":"An OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.\n"},"server_description":{"type":"string","description":"Optional description of the MCP server, used to provide more context.\n"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.\n","nullable":true},"allowed_tools":{"description":"List of allowed tool names or a filter object.\n","anyOf":[{"type":"array","title":"MCP allowed tools","description":"A string array of allowed tool names","items":{"type":"string"}},{"$ref":"#/components/schemas/MCPToolFilter"}],"nullable":true},"require_approval":{"description":"Specify which of the MCP server's tools require approval.","default":"always","anyOf":[{"type":"object","title":"MCP tool approval filter","description":"Specify which of the MCP server's tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.\n","properties":{"always":{"$ref":"#/components/schemas/MCPToolFilter"},"never":{"$ref":"#/components/schemas/MCPToolFilter"}},"additionalProperties":false},{"type":"string","title":"MCP tool approval setting","description":"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.\n","enum":["always","never"]}],"nullable":true}},"required":["type","server_label"]},"MCPToolFilter":{"type":"object","title":"MCP tool filter","description":"A filter object to specify which tools are allowed.\n","properties":{"tool_names":{"type":"array","title":"MCP allowed tools","items":{"type":"string"},"description":"List of allowed tool names."},"read_only":{"type":"boolean","description":"Indicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.\n"}},"required":[],"additionalProperties":false},"CodeInterpreterTool":{"type":"object","title":"Code interpreter","description":"A tool that runs Python code to help generate a response to a prompt.\n","properties":{"type":{"type":"string","enum":["code_interpreter"],"description":"The type of the code interpreter tool. Always `code_interpreter`.\n"},"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.\n","anyOf":[{"type":"string","description":"The container ID."},{"$ref":"#/components/schemas/CodeInterpreterContainerAuto"}]}},"required":["type","container"]},"CodeInterpreterContainerAuto":{"properties":{"type":{"type":"string","enum":["auto"],"description":"Always `auto`.","default":"auto"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"description":"An optional list of uploaded files to make available to your code."},"memory_limit":{"$ref":"#/components/schemas/ContainerMemoryLimit","nullable":true}},"type":"object","required":["type"],"title":"CodeInterpreterToolAuto","description":"Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on."},"ContainerMemoryLimit":{"type":"string","enum":["1g","4g","16g","64g"]},"ImageGenTool":{"type":"object","title":"Image generation tool","description":"A tool that generates images using a model like `gpt-image-1`.\n","properties":{"type":{"type":"string","enum":["image_generation"],"description":"The type of the image generation tool. Always `image_generation`.\n"},"model":{"type":"string","enum":["gpt-image-1","gpt-image-1-mini"],"description":"The image generation model to use. Default: `gpt-image-1`.\n","default":"gpt-image-1"},"quality":{"type":"string","enum":["low","medium","high","auto"],"description":"The quality of the generated image. One of `low`, `medium`, `high`,\nor `auto`. Default: `auto`.\n","default":"auto"},"size":{"type":"string","enum":["1024x1024","1024x1536","1536x1024","auto"],"description":"The size of the generated image. One of `1024x1024`, `1024x1536`,\n`1536x1024`, or `auto`. Default: `auto`.\n","default":"auto"},"output_format":{"type":"string","enum":["png","webp","jpeg"],"description":"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.\n","default":"png"},"output_compression":{"type":"integer","minimum":0,"maximum":100,"description":"Compression level for the output image. Default: 100.\n","default":100},"moderation":{"type":"string","enum":["auto","low"],"description":"Moderation level for the generated image. Default: `auto`.\n","default":"auto"},"background":{"type":"string","enum":["transparent","opaque","auto"],"description":"Background type for the generated image. One of `transparent`,\n`opaque`, or `auto`. Default: `auto`.\n","default":"auto"},"input_fidelity":{"$ref":"#/components/schemas/InputFidelity","nullable":true},"input_image_mask":{"type":"object","description":"Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).\n","properties":{"image_url":{"type":"string","description":"Base64-encoded mask image.\n"},"file_id":{"type":"string","description":"File ID for the mask image.\n"}},"required":[],"additionalProperties":false},"partial_images":{"type":"integer","minimum":0,"maximum":3,"description":"Number of partial images to generate in streaming mode, from 0 (default value) to 3.\n","default":0}},"required":["type"]},"InputFidelity":{"type":"string","enum":["high","low"],"description":"Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`."},"LocalShellToolParam":{"properties":{"type":{"type":"string","enum":["local_shell"],"description":"The type of the local shell tool. Always `local_shell`.","default":"local_shell"}},"type":"object","required":["type"],"title":"Local shell tool","description":"A tool that allows the model to execute shell commands in a local environment."},"FunctionShellToolParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The type of the shell tool. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Shell tool","description":"A tool that allows the model to execute shell commands."},"CustomToolParam":{"properties":{"type":{"type":"string","enum":["custom"],"description":"The type of the custom tool. Always `custom`.","default":"custom"},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls."},"description":{"type":"string","description":"Optional description of the custom tool, used to provide more context."},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CustomTextFormatParam"},{"$ref":"#/components/schemas/CustomGrammarFormatParam"}]}},"type":"object","required":["type","name"],"title":"Custom tool","description":"A custom tool that processes input using a specified format."},"CustomTextFormatParam":{"properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`.","default":"text"}},"type":"object","required":["type"],"title":"Text format","description":"Unconstrained free-form text."},"CustomGrammarFormatParam":{"properties":{"type":{"type":"string","enum":["grammar"],"description":"Grammar format. Always `grammar`.","default":"grammar"},"syntax":{"$ref":"#/components/schemas/GrammarSyntax1","description":"The syntax of the grammar definition. One of `lark` or `regex`."},"definition":{"type":"string","description":"The grammar definition."}},"type":"object","required":["type","syntax","definition"],"title":"Grammar format","description":"A grammar defined by the user."},"GrammarSyntax1":{"type":"string","enum":["lark","regex"]},"WebSearchPreviewTool":{"properties":{"type":{"type":"string","enum":["web_search_preview","web_search_preview_2025_03_11"],"description":"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.","default":"web_search_preview"},"user_location":{"$ref":"#/components/schemas/ApproximateLocation","description":"The user's location.","nullable":true},"search_context_size":{"$ref":"#/components/schemas/SearchContextSize","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"type":"object","required":["type"],"title":"Web search preview","description":"Searches the web for relevant results to use in a response. Learn more in the web search tool guide."},"ApproximateLocation":{"properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.","nullable":true},"region":{"type":"string","description":"Free text input for the region of the user, e.g. `California`.","nullable":true},"city":{"type":"string","description":"Free text input for the city of the user, e.g. `San Francisco`.","nullable":true},"timezone":{"type":"string","description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.","nullable":true}},"type":"object","required":["type"]},"SearchContextSize":{"type":"string","enum":["low","medium","high"]},"ApplyPatchToolParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The type of the tool. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Apply patch tool","description":"Allows the assistant to create, delete, or update files using unified diffs."},"ResponseTextParam":{"type":"object","description":"Configuration options for a text response. Supports plain text or structured JSON.\n","properties":{"format":{"$ref":"#/components/schemas/TextResponseFormatConfiguration"},"verbosity":{"$ref":"#/components/schemas/Verbosity"}}},"TextResponseFormatConfiguration":{"description":"Specifies the required output format. Use `type: json_schema` to enforce a schema; `type: text` is the default.\n","anyOf":[{"$ref":"#/components/schemas/responses_ResponseFormatText"},{"$ref":"#/components/schemas/TextResponseFormatJsonSchema"},{"$ref":"#/components/schemas/responses_ResponseFormatJsonObject"}],"discriminator":{"propertyName":"type"}},"responses_ResponseFormatText":{"type":"object","title":"Text","description":"Default response format. Used to generate text responses.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `text`.","enum":["text"]}},"required":["type"]},"TextResponseFormatJsonSchema":{"type":"object","title":"JSON schema","description":"JSON Schema response format used to generate structured JSON responses.\nLearn more in the Structured Outputs guide.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_schema`.","enum":["json_schema"]},"description":{"type":"string","description":"A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n"},"name":{"type":"string","description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n"},"schema":{"$ref":"#/components/schemas/responses_ResponseFormatJsonSchemaSchema"},"strict":{"type":"boolean","nullable":true,"default":false,"description":"Whether to enable strict schema adherence when generating the output.\nIf true, the model will follow the exact schema; only a subset of JSON Schema is supported.\n"}},"required":["type","schema","name"]},"responses_ResponseFormatJsonSchemaSchema":{"type":"object","title":"JSON schema","description":"The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n","additionalProperties":true},"responses_ResponseFormatJsonObject":{"type":"object","title":"JSON object","description":"JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_object`.","enum":["json_object"]}},"required":["type"]},"Verbosity":{"type":"string","nullable":true,"enum":["low","medium","high"],"default":"medium","description":"Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n"},"Reasoning":{"type":"object","description":"Configuration options for reasoning models. Applicable to gpt-5 and o-series models only.\n","title":"Reasoning","properties":{"effort":{"$ref":"#/components/schemas/ReasoningEffort"},"mode":{"type":"string","description":"Reasoning mode for models that support it. One of `standard` or `pro`.\n","enum":["standard","pro"]},"summary":{"type":"string","nullable":true,"description":"A summary of the model's reasoning.\nOne of `auto`, `concise`, or `detailed` (only `concise` is supported for `computer-use-preview`).\n","enum":["auto","concise","detailed"]},"generate_summary":{"type":"string","nullable":true,"deprecated":true,"description":"Deprecated: use `summary` instead.\nA summary of the model's reasoning. One of `auto`, `concise`, or `detailed`.\n","enum":["auto","concise","detailed"]}}},"ReasoningEffort":{"type":"string","nullable":true,"enum":["none","minimal","low","medium","high"],"default":"medium","description":"Controls how much reasoning effort the model uses. Lower settings are faster and use fewer tokens; higher settings provide more detailed reasoning.\n"},"TruncationEnum":{"type":"string","enum":["auto","disabled"]},"ConversationParam":{"description":"The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.\nInput items and output items from this response are automatically added to this conversation after this response completes.\n","anyOf":[{"type":"string","title":"Conversation ID","description":"The unique ID of the conversation.\n"},{"$ref":"#/components/schemas/ConversationParam-2"}]},"ConversationParam-2":{"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"type":"object","required":["id"],"title":"Conversation object","description":"The conversation that this response belongs to."},"ToolChoiceParam":{"description":"How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call.\n","anyOf":[{"$ref":"#/components/schemas/ToolChoiceOptions"},{"$ref":"#/components/schemas/ToolChoiceAllowed"},{"$ref":"#/components/schemas/ToolChoiceTypes"},{"$ref":"#/components/schemas/ToolChoiceFunction"},{"$ref":"#/components/schemas/ToolChoiceMCP"},{"$ref":"#/components/schemas/ToolChoiceCustom"},{"$ref":"#/components/schemas/SpecificApplyPatchParam"},{"$ref":"#/components/schemas/SpecificFunctionShellParam"}]},"ToolChoiceOptions":{"type":"string","title":"Tool choice mode","description":"Controls which (if any) tool is called by the model.\n\n`none` means the model will not call any tool and instead generates a message.\n\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n\n`required` means the model must call one or more tools.\n","enum":["none","auto","required"]},"ToolChoiceAllowed":{"type":"object","title":"Allowed tools","description":"Constrains the tools available to the model to a pre-defined set.\n","properties":{"type":{"type":"string","enum":["allowed_tools"],"description":"Allowed tool configuration type. Always `allowed_tools`."},"mode":{"type":"string","enum":["auto","required"],"description":"Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n"},"tools":{"type":"array","description":"A list of tool definitions that the model should be allowed to call.\n\nFor the Responses API, the list of tool definitions might look like:\n```json\n[\n  { \"type\": \"function\", \"name\": \"get_weather\" },\n  { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n  { \"type\": \"image_generation\" }\n]\n```\n","items":{"type":"object","description":"A tool definition that the model should be allowed to call.\n","additionalProperties":true}}},"required":["type","mode","tools"]},"ToolChoiceTypes":{"type":"object","title":"Hosted tool","description":"Indicates that the model should use a built-in tool to generate a response.\nUse this to select a specific hosted capability.\n","properties":{"type":{"type":"string","description":"The type of hosted tool the model should to use. \n\nAllowed values are:\n- `file_search`\n- `web_search_preview`\n- `computer_use_preview`\n- `code_interpreter`\n- `image_generation`\n","enum":["file_search","web_search_preview","computer_use_preview","web_search_preview_2025_03_11","image_generation","code_interpreter"]}},"required":["type"]},"ToolChoiceFunction":{"type":"object","title":"Function tool","description":"Use this option to force the model to call a specific function.\n","properties":{"type":{"type":"string","enum":["function"],"description":"For function calling, the type is always `function`."},"name":{"type":"string","description":"The name of the function to call."}},"required":["type","name"]},"ToolChoiceMCP":{"type":"object","title":"MCP tool","description":"Use this option to force the model to call a specific tool on a remote MCP server.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"For MCP tools, the type is always `mcp`."},"server_label":{"type":"string","description":"The label of the MCP server to use.\n"},"name":{"type":"string","description":"The name of the tool to call on the server.\n","nullable":true}},"required":["type","server_label"]},"ToolChoiceCustom":{"type":"object","title":"Custom tool","description":"Use this option to force the model to call a specific custom tool.\n","properties":{"type":{"type":"string","enum":["custom"],"description":"For custom tool calling, the type is always `custom`."},"name":{"type":"string","description":"The name of the custom tool to call."}},"required":["type","name"]},"SpecificApplyPatchParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The tool to call. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Specific apply patch tool choice","description":"Forces the model to call the apply_patch tool when executing a tool call."},"SpecificFunctionShellParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The tool to call. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Specific shell tool choice","description":"Forces the model to call the function shell tool when a tool call is required."},"TokenCountsResource":{"properties":{"object":{"type":"string","enum":["response.input_tokens"],"default":"response.input_tokens"},"input_tokens":{"type":"integer"}},"type":"object","required":["object","input_tokens"],"title":"Token counts"}}},"paths":{"/v1/responses/input_tokens":{"post":{"tags":["Responses"],"summary":"Get input token counts","description":"Get input token counts.\n\n**Note:** this operation is currently rejected by the upstream providers of all\navailable models (it requires provider-side Responses API support that none of\nthe currently configured providers offer).\n","operationId":"GetInputTokenCounts","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCountsBody"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TokenCountsBody"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCountsResource"}}}}}}}}}
````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nexos.ai/gateway-api/responses.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
