# Gateway API

### Get an API Key

<details>

<summary>Team API Key</summary>

Within workspace, navigate to:

Settings → Teams tab → Select team → API Keys → Generate API Key&#x20;

Make sure you save this API Key - you won't be able to access it again after closing the dialog.

{% hint style="info" %}
Each team can have its API Key with custom settings: models enabled, fallbacks, etc.&#x20;
{% endhint %}

If needed, you can rotate the API Key within API keys tab settings. This will rotate the API Key so the old one is deprecated, and you can change it to a new one.&#x20;

</details>

<details>

<summary>User API Key</summary>

Within workspace, navigate to: \
Left side bar Settings → API Keys → Generate API Key&#x20;

Make sure you save this API Key - you won't be able to access it again after closing the dialog.

{% hint style="info" %}
Your API Key is set with custom settings: models enabled, fallbacks, etc. based on the team settings (made by org owner).
{% endhint %}

If needed, you can rotate the API Key within API keys tab settings. This will rotate the API Key so the old one is deprecated, and you can change it to a new one.&#x20;

</details>

## Chat

## Chat Completion

> Generate a response from conversation messages.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Chat","description":"Generate a response from conversation messages."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]},{"apiKey":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}},"apiKey":{"type":"http","scheme":"bearer"}},"schemas":{"ChatCompletionsRequest":{"type":"object","properties":{"messages":{"description":"A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, images, and audio.\n","type":"array","minItems":1,"items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessage"}},"model":{"type":"string","description":"Model name, UUID, or agent UUID."},"store":{"type":"boolean","description":"Whether or not to store the output of this chat completion request\n"},"metadata":{"type":"object","description":"Developer-defined tags and values used for filtering completions\nin the dashboard.\n","additionalProperties":{"type":"string"}},"frequency_penalty":{"type":"number","default":0,"minimum":-2,"maximum":2,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n"},"logit_bias":{"type":"object","additionalProperties":{"type":"integer"},"description":"Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n"},"logprobs":{"description":"Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.","type":"boolean"},"top_logprobs":{"description":"An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.","type":"integer","minimum":0,"maximum":20},"max_tokens":{"description":"The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is not compatible with o1 series models.\n","type":"integer","nullable":true,"deprecated":true},"max_completion_tokens":{"description":"An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.\n","type":"integer","nullable":true},"n":{"type":"integer","minimum":1,"maximum":128,"default":1,"description":"How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs."},"modalities":{"$ref":"#/components/schemas/ChatCompletionModalities"},"prediction":{"description":"Configuration for a Predicted Output,\nwhich can greatly improve response times when large parts of the model\nresponse are known ahead of time. This is most common when you are\nregenerating a file with only minor changes to most of the content.\n","oneOf":[{"$ref":"#/components/schemas/PredictionContent"}]},"audio":{"type":"object","description":"Parameters for audio output. Required when audio output is requested with\n`modalities: [\"audio\"]`.\n","required":["voice","format"],"properties":{"voice":{"type":"string","enum":["alloy","ash","ballad","coral","echo","sage","shimmer","verse"],"description":"The voice the model uses to respond. Supported voices are `alloy`,\n`ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.\n"},"format":{"type":"string","enum":["wav","mp3","flac","opus","pcm16"],"description":"Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n`opus`, or `pcm16`.\n"}}},"presence_penalty":{"type":"number","default":0,"minimum":-2,"maximum":2,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n"},"response_format":{"description":"An object specifying the format that the model must output. Compatible with GPT-4o, GPT-4o mini, GPT-4 Turbo and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema.\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.\n","oneOf":[{"$ref":"#/components/schemas/ResponseFormatText"},{"$ref":"#/components/schemas/ResponseFormatJsonObject"},{"$ref":"#/components/schemas/ResponseFormatJsonSchema"}]},"seed":{"type":"integer","minimum":-9223372036854776000,"maximum":9223372036854776000,"description":"This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n"},"service_tier":{"description":"Specifies the processing type used for serving the request.\nIf set to 'default' or 'auto', then the request will be processed with the standard pricing and performance for the selected model.\nIf set to 'flex' or 'priority', then the request will be processed with the corresponding service tier.\nWhen not set, the default behavior is 'auto'.\nWhen the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n","type":"string","enum":["auto","default","flex","scale","priority"],"default":"auto"},"stop":{"description":"Up to 4 sequences where the API will stop generating further tokens.\n","oneOf":[{"type":"string"},{"type":"array","minItems":1,"maxItems":4,"items":{"type":"string"}}]},"stream":{"description":"If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message.\n","type":"boolean"},"stream_options":{"$ref":"#/components/schemas/ChatCompletionStreamOptions"},"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.\n\nWe generally recommend altering this or `top_p` but not both.\n"},"top_p":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.\n"},"tools":{"type":"array","description":"A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.\n","items":{"$ref":"#/components/schemas/ChatCompletionTool"}},"tool_choice":{"$ref":"#/components/schemas/ChatCompletionToolChoiceOption"},"parallel_tool_calls":{"$ref":"#/components/schemas/ParallelToolCalls"},"function_call":{"deprecated":true,"description":"Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.\n","oneOf":[{"type":"string","description":"`none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.\n","enum":["none","auto"]},{"$ref":"#/components/schemas/ChatCompletionFunctionCallOption"}]},"functions":{"deprecated":true,"description":"Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.\n","type":"array","minItems":1,"maxItems":128,"items":{"$ref":"#/components/schemas/ChatCompletionFunctions"}},"thinking":{"type":"object","properties":{"type":{"type":"string","description":"The type of thinking configuration"},"budget_tokens":{"type":"integer","description":"The token budget allocation for thinking operations"}}},"reasoning_effort":{"type":"string","description":"Reasoning effort for models that support reasoning.","enum":["none","minimal","low","medium","high","xhigh"]},"verbosity":{"type":"string","description":"Constrains the verbosity of the model's response.","enum":["low","medium","high"]}},"required":["model","messages"]},"chat_completions_messages_ChatCompletionRequestMessage":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionRequestDeveloperMessage"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestSystemMessage"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestUserMessage"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestAssistantMessage"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestToolMessage"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestFunctionMessage"}]},"ChatCompletionRequestDeveloperMessage":{"type":"object","title":"Developer message","description":"Developer-provided instructions that the model should follow, regardless of\nmessages sent by the user. With o1 models and newer, `developer` messages\nreplace the previous `system` messages.\n","properties":{"content":{"description":"The contents of the developer message.","oneOf":[{"type":"string","description":"The contents of the developer message.","title":"Text content"},{"type":"array","description":"An array of content parts with a defined type. For developer messages, only type `text` is supported.","title":"Array of content parts","items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartText"},"minItems":1}]},"role":{"type":"string","enum":["developer"],"description":"The role of the messages author, in this case `developer`."},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role."}},"required":["content","role"]},"chat_completions_messages_ChatCompletionRequestMessageContentPartText":{"type":"object","title":"Text content part","description":"Learn about [text inputs](/docs/guides/text-generation).\n","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part."},"text":{"type":"string","description":"The text content."}},"required":["type","text"]},"chat_completions_messages_ChatCompletionRequestSystemMessage":{"type":"object","title":"System message","description":"Developer-provided instructions that the model should follow, regardless of\nmessages sent by the user. With o1 models and newer, use `developer` messages\nfor this purpose instead.\n","properties":{"content":{"description":"The contents of the system message.","oneOf":[{"type":"string","description":"The contents of the system message.","title":"Text content"},{"type":"array","description":"An array of content parts with a defined type. For system messages, only type `text` is supported.","title":"Array of content parts","items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestSystemMessageContentPart"},"minItems":1}]},"role":{"type":"string","enum":["system"],"description":"The role of the messages author, in this case `system`."},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role."}},"required":["content","role"]},"chat_completions_messages_ChatCompletionRequestSystemMessageContentPart":{"oneOf":[{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartText"}]},"chat_completions_messages_ChatCompletionRequestUserMessage":{"type":"object","title":"User message","description":"Messages sent by an end user, containing prompts or additional context\ninformation.\n","properties":{"content":{"description":"The contents of the user message.\n","oneOf":[{"type":"string","description":"The text contents of the message.","title":"Text content"},{"type":"array","description":"An array of content parts with a defined type. Supported options differ based on the [model](/docs/models) being used to generate the response. Can contain text, image, or audio inputs.","title":"Array of content parts","items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestUserMessageContentPart"},"minItems":1}]},"role":{"type":"string","enum":["user"],"description":"The role of the messages author, in this case `user`."},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role."}},"required":["content","role"]},"chat_completions_messages_ChatCompletionRequestUserMessageContentPart":{"oneOf":[{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartText"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartImage"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartAudio"}]},"chat_completions_messages_ChatCompletionRequestMessageContentPartImage":{"type":"object","title":"Image content part","description":"Learn about [image inputs](/docs/guides/vision).\n","properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data.","format":"uri"},"detail":{"type":"string","description":"Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision#low-or-high-fidelity-image-understanding).","enum":["auto","low","high"],"default":"auto"}},"required":["url"]}},"required":["type","image_url"]},"chat_completions_messages_ChatCompletionRequestMessageContentPartAudio":{"type":"object","title":"Audio content part","description":"Learn about [audio inputs](/docs/guides/audio).\n","properties":{"type":{"type":"string","enum":["input_audio"],"description":"The type of the content part. Always `input_audio`."},"input_audio":{"type":"object","properties":{"data":{"type":"string","description":"Base64 encoded audio data."},"format":{"type":"string","enum":["wav","mp3"],"description":"The format of the encoded audio data. Currently supports \"wav\" and \"mp3\".\n"}},"required":["data","format"]}},"required":["type","input_audio"]},"chat_completions_messages_ChatCompletionRequestAssistantMessage":{"type":"object","title":"Assistant message","description":"Messages sent by the model in response to user messages.\n","properties":{"content":{"nullable":true,"oneOf":[{"type":"string","description":"The contents of the assistant message.","title":"Text content"},{"type":"array","description":"An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.","title":"Array of content parts","items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestAssistantMessageContentPart"},"minItems":1}],"description":"The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n"},"refusal":{"nullable":true,"type":"string","description":"The refusal message by the assistant."},"role":{"type":"string","enum":["assistant"],"description":"The role of the messages author, in this case `assistant`."},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role."},"audio":{"type":"object","nullable":true,"description":"Data about a previous audio response from the model. \n[Learn more](/docs/guides/audio).\n","required":["id"],"properties":{"id":{"type":"string","description":"Unique identifier for a previous audio response from the model.\n"}}},"tool_calls":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionMessageToolCalls"},"function_call":{"type":"object","deprecated":true,"description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","nullable":true,"properties":{"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."},"name":{"type":"string","description":"The name of the function to call."}},"required":["arguments","name"]}},"required":["role"]},"chat_completions_messages_ChatCompletionRequestAssistantMessageContentPart":{"oneOf":[{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartText"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartRefusal"}]},"chat_completions_messages_ChatCompletionRequestMessageContentPartRefusal":{"type":"object","title":"Refusal content part","properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the content part."},"refusal":{"type":"string","description":"The refusal message generated by the model."}},"required":["type","refusal"]},"chat_completions_messages_ChatCompletionMessageToolCalls":{"type":"array","description":"The tool calls generated by the model, such as function calls.","items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionMessageToolCall"}},"chat_completions_messages_ChatCompletionMessageToolCall":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool call."},"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"type":"object","description":"The function that the model called.","properties":{"name":{"type":"string","description":"The name of the function to call."},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."}},"required":["name","arguments"]}},"required":["id","type","function"]},"chat_completions_messages_ChatCompletionRequestToolMessage":{"type":"object","title":"Tool message","properties":{"role":{"type":"string","enum":["tool"],"description":"The role of the messages author, in this case `tool`."},"content":{"oneOf":[{"type":"string","description":"The contents of the tool message.","title":"Text content"},{"type":"array","description":"An array of content parts with a defined type. For tool messages, only type `text` is supported.","title":"Array of content parts","items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestToolMessageContentPart"},"minItems":1}],"description":"The contents of the tool message."},"tool_call_id":{"type":"string","description":"Tool call that this message is responding to."}},"required":["role","content","tool_call_id"]},"chat_completions_messages_ChatCompletionRequestToolMessageContentPart":{"oneOf":[{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartText"}]},"chat_completions_messages_ChatCompletionRequestFunctionMessage":{"type":"object","title":"Function message","deprecated":true,"properties":{"role":{"type":"string","enum":["function"],"description":"The role of the messages author, in this case `function`."},"content":{"nullable":true,"type":"string","description":"The contents of the function message."},"name":{"type":"string","description":"The name of the function to call."}},"required":["role","content","name"]},"ChatCompletionModalities":{"type":"array","description":"Output types that you would like the model to generate for this request.\nMost models are capable of generating text, which is the default:\n\n`[\"text\"]`\n\nTo request that this model generate both text and audio responses, you can use:\n\n`[\"text\", \"audio\"]`\n","items":{"type":"string","enum":["text","audio"]}},"PredictionContent":{"type":"object","title":"Static Content","description":"Static predicted output content, such as the content of a text file that is being regenerated.\n","required":["type","content"],"properties":{"type":{"type":"string","enum":["content"],"description":"The type of the predicted content you want to provide. This type is\ncurrently always `content`.\n"},"content":{"description":"The content that should be matched when generating a model response.\nIf generated tokens would match this content, the entire model response\ncan be returned much more quickly.\n","oneOf":[{"type":"string","title":"Text content","description":"The content used for a Predicted Output. This is often the\ntext of a file you are regenerating with minor changes.\n"},{"type":"array","description":"An array of content parts with a defined type. Supported options differ based on the [model](/docs/models) being used to generate the response. Can contain text inputs.","title":"Array of content parts","items":{"$ref":"#/components/schemas/ChatCompletionRequestMessageContentPartText"},"minItems":1}]}}},"ChatCompletionRequestMessageContentPartText":{"type":"object","title":"Text content part","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part."},"text":{"type":"string","description":"The text content."}},"required":["type","text"]},"ResponseFormatText":{"type":"object","properties":{"type":{"type":"string","description":"The type of response format being defined: `text`","enum":["text"]}},"required":["type"]},"ResponseFormatJsonObject":{"type":"object","properties":{"type":{"type":"string","description":"The type of response format being defined: `json_object`","enum":["json_object"]}},"required":["type"]},"ResponseFormatJsonSchema":{"type":"object","properties":{"type":{"type":"string","description":"The type of response format being defined: `json_schema`","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"description":{"type":"string","description":"A description of what the response format is for, used by the model to determine how to respond in the format."},"name":{"type":"string","description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."},"schema":{"$ref":"#/components/schemas/ResponseFormatJsonSchemaSchema"},"strict":{"type":"boolean","nullable":true,"default":false,"description":"Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs)."}},"required":["type","name"]}},"required":["type","json_schema"]},"ResponseFormatJsonSchemaSchema":{"type":"object","description":"The schema for the response format, described as a JSON Schema object.","additionalProperties":true},"ChatCompletionStreamOptions":{"description":"Options for streaming response. Only set this when you set `stream: true`.\n","type":"object","properties":{"include_usage":{"type":"boolean","description":"If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value\n"}}},"ChatCompletionTool":{"type":"object","properties":{"type":{"type":"string","enum":["function","web_search","rag","tika_ocr"],"description":"The type of the tool. Supports `function`, `web_search`, `rag` and `tika_ocr`."},"function":{"$ref":"#/components/schemas/FunctionObject"},"web_search":{"$ref":"#/components/schemas/ChatCompletionWebSearch"},"rag":{"$ref":"#/components/schemas/ChatCompletionRAG"},"tika_ocr":{"$ref":"#/components/schemas/ChatCompletionTikaOCR"}},"required":["type"]},"FunctionObject":{"type":"object","properties":{"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function."},"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."},"parameters":{"$ref":"#/components/schemas/FunctionParameters"},"strict":{"type":"boolean","nullable":true,"default":false,"description":"Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`."}},"required":["name"]},"FunctionParameters":{"type":"object","description":"The parameters the functions accepts, described as a JSON Schema object.\nOmitting `parameters` defines a function with an empty parameter list.","additionalProperties":true},"ChatCompletionWebSearch":{"type":"object","description":"The web search that the model called.","properties":{"search_context_size":{"type":"string","description":"High level guidance for the amount of context window space to use for the search.","enum":["low","medium","high"]},"user_location":{"$ref":"#/components/schemas/UserLocation"},"mcp":{"$ref":"#/components/schemas/WebSearchMCP"}}},"UserLocation":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of location approximation.","enum":["approximate"]},"city":{"type":"string","description":"The city to use for the location approximation."},"country":{"type":"string","description":"The two-letter ISO country code of the user."},"region":{"type":"string","description":"Free text input for the region of the user."},"timezone":{"type":"string","description":"The IANA timezone of the user."}}},"WebSearchMCP":{"type":"object","description":"Custom MCP web_search","required":["type","options`"],"properties":{"type":{"type":"string","description":"The type of the web search.","enum":["url","query"]},"options":{"oneOf":[{"$ref":"#/components/schemas/QuerySearch"},{"$ref":"#/components/schemas/URLSearch"}]}}},"QuerySearch":{"type":"object","required":["tool","query"],"properties":{"tool":{"type":"string","description":"The type of tool used for web search.","enum":["google_search","bing_search","amazon_search"]},"query":{"type":"string","description":"The query to search for."},"geo_location":{"type":"string","description":"The geographic location to use for the search."},"parse":{"type":"boolean","description":"Whether to parse the search results.","default":false}}},"URLSearch":{"type":"object","required":["tool","url"],"properties":{"tool":{"type":"string","description":"The type of the web search.","enum":["universal"]},"url":{"type":"string","description":"The URL to search for."},"geo_location":{"type":"string","description":"The geographic location to use for the search."},"parse":{"type":"boolean","description":"Whether to parse the search results.","default":false}}},"ChatCompletionRAG":{"type":"object","description":"RAG tool call","properties":{"mcp":{"$ref":"#/components/schemas/RagMCP"}}},"RagMCP":{"type":"object","description":"RAG MCP tool call","required":["collection_uuid"],"properties":{"collection_uuid":{"type":"string","description":"The UUID of the collection to search."},"query":{"type":"string","description":"The query to search for."},"threshold":{"type":"number","format":"float","description":"The threshold for the search results."},"top_n":{"type":"integer","description":"The number of top results to return."},"model_uuid":{"type":"string","description":"The UUID of the model to use for the search."}}},"ChatCompletionTikaOCR":{"type":"object","description":"Tika OCR that the model called.","properties":{"file_id":{"type":"string"}},"required":["file_id"]},"ChatCompletionToolChoiceOption":{"description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools.\nSpecifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n\n`none` is the default when no tools are present. `auto` is the default if tools are present.\n","oneOf":[{"type":"string","description":"`none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools.\n","enum":["none","auto","required"]},{"$ref":"#/components/schemas/ChatCompletionNamedToolChoice"}]},"ChatCompletionNamedToolChoice":{"type":"object","description":"Specifies a tool the model should use. Use to force the model to call a specific function.","properties":{"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to call."}},"required":["name"]}},"required":["type","function"]},"ParallelToolCalls":{"description":"Whether to enable parallel function calling during tool use.","type":"boolean","default":true},"ChatCompletionFunctionCallOption":{"type":"object","description":"Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n","properties":{"name":{"type":"string","description":"The name of the function to call."}},"required":["name"]},"ChatCompletionFunctions":{"type":"object","properties":{"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function."},"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."},"parameters":{"$ref":"#/components/schemas/FunctionParameters"}},"required":["name"]},"ChatCompletionFinishReason":{"type":"string","description":"The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n","enum":["stop","length","tool_calls","content_filter","function_call"]},"ChatCompletionResponseMessage":{"type":"object","description":"A chat completion message generated by the model.","properties":{"content":{"type":"string","description":"The contents of the message.","nullable":true},"refusal":{"type":"string","description":"The refusal message generated by the model.","nullable":true},"tool_calls":{"$ref":"#/components/schemas/ChatCompletionMessageToolCalls"},"role":{"type":"string","enum":["assistant"],"description":"The role of the author of this message."},"function_call":{"type":"object","deprecated":true,"description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","properties":{"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."},"name":{"type":"string","description":"The name of the function to call."}},"required":["name","arguments"]},"audio":{"type":"object","nullable":true,"description":"If the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](/docs/guides/audio).\n","required":["id","expires_at","data","transcript"],"properties":{"id":{"type":"string","description":"Unique identifier for this audio response."},"expires_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.\n"},"data":{"type":"string","description":"Base64 encoded audio bytes generated by the model, in the format\nspecified in the request.\n"},"transcript":{"type":"string","description":"Transcript of the audio generated by the model."}}},"annotations":{"type":"array","description":"Annotations for the message, when applicable, as when using the web search tool.","items":{"$ref":"#/components/schemas/Annotation"}}},"required":["role","content","refusal"]},"ChatCompletionMessageToolCalls":{"type":"array","description":"The tool calls generated by the model, such as function calls.","items":{"$ref":"#/components/schemas/ChatCompletionMessageToolCall"}},"ChatCompletionMessageToolCall":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool call."},"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"type":"object","description":"The function that the model called.","properties":{"name":{"type":"string","description":"The name of the function to call."},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."}},"required":["name","arguments"]}},"required":["id","type","function"]},"Annotation":{"type":"object","properties":{"type":{"type":"string","description":"The type of the URL citation. Always url_citation."},"url_citation":{"$ref":"#/components/schemas/URLCitation"}}},"URLCitation":{"type":"object","description":"A URL citation when using web search.","properties":{"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message."},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message."},"title":{"type":"string","description":"The title of the web resource."},"url":{"type":"string","description":"The URL of the web resource."}}},"ChatCompletionTokenLogprob":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.\n","type":"number"},"bytes":{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.\n","type":"array","items":{"type":"integer"},"nullable":true},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.\n","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.\n","type":"number"},"bytes":{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.\n","type":"array","items":{"type":"integer"},"nullable":true}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]},"ChatCompletionServiceTier":{"description":"The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request. The value may differ from the `service_tier` parameter sent in the request. For example, if 'auto' is specified, the response will return 'default' as they are equivalent.\n","type":"string","enum":["auto","default","flex","scale","priority"],"nullable":true},"ChatCompletionObject":{"type":"string","description":"The object type, which is always `chat.completion`.","enum":["chat.completion"]},"CompletionUsage":{"type":"object","description":"Usage statistics for the completion request.","properties":{"completion_tokens":{"type":"integer","description":"Number of tokens in the generated completion."},"prompt_tokens":{"type":"integer","description":"Number of tokens in the prompt."},"total_tokens":{"type":"integer","description":"Total number of tokens used in the request (prompt + completion)."},"completion_tokens_details":{"type":"object","description":"Breakdown of tokens used in a completion.","properties":{"accepted_prediction_tokens":{"type":"integer","description":"When using Predicted Outputs, the number of tokens in the\nprediction that appeared in the completion.\n"},"audio_tokens":{"type":"integer","description":"Audio input tokens generated by the model."},"reasoning_tokens":{"type":"integer","description":"Tokens generated by the model for reasoning."},"rejected_prediction_tokens":{"type":"integer","description":"When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, and context window limits.\n"}}},"prompt_tokens_details":{"type":"object","description":"Breakdown of tokens used in the prompt.","properties":{"audio_tokens":{"type":"integer","description":"Audio input tokens present in the prompt."},"cached_tokens":{"type":"integer","description":"Cached tokens present in the prompt."}}}},"required":["prompt_tokens","completion_tokens","total_tokens"]}},"responses":{"ChatCompletionsResponse":{"description":"Represents a chat completion response returned by model, based on the provided input.\n","headers":{"X-Nexos-Completion-Time-Ms":{"schema":{"type":"integer"},"description":"Time in milliseconds that server took for completion"},"X-Nexos-Model-Id":{"schema":{"type":"string"},"description":"Model ID that was user to perform the completion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the chat completion."},"choices":{"type":"array","description":"A list of chat completion choices. Can be more than one if `n` is greater than 1.\n","items":{"type":"object","required":["finish_reason","index","message","logprobs"],"properties":{"finish_reason":{"$ref":"#/components/schemas/ChatCompletionFinishReason"},"index":{"type":"integer","description":"The index of the choice in the list of choices."},"message":{"$ref":"#/components/schemas/ChatCompletionResponseMessage"},"logprobs":{"description":"Log probability information for the choice.","type":"object","properties":{"content":{"description":"A list of message content tokens with log probability information.","type":"array","items":{"$ref":"#/components/schemas/ChatCompletionTokenLogprob"},"nullable":true},"refusal":{"description":"A list of message refusal tokens with log probability information.","type":"array","items":{"$ref":"#/components/schemas/ChatCompletionTokenLogprob"},"nullable":true}},"required":["content","refusal"]}}}},"created":{"type":"integer","description":"The Unix timestamp (in seconds) of when the chat completion was created."},"model":{"type":"string","description":"The model used for the chat completion."},"service_tier":{"$ref":"#/components/schemas/ChatCompletionServiceTier"},"system_fingerprint":{"type":"string","description":"This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n"},"object":{"$ref":"#/components/schemas/ChatCompletionObject"},"usage":{"$ref":"#/components/schemas/CompletionUsage"}},"required":["choices","created","id","model","object"]}}}}}},"paths":{"/v1/chat/completions":{"post":{"tags":["Chat"],"operationId":"post-chat-completions-v1","summary":"Chat Completion","description":"Generate a response from conversation messages.","parameters":[{"in":"query","name":"fallbacks","schema":{"type":"string","enum":["true","false"]},"required":false,"description":"To use or not fallbacks in chat completion request"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionsRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/ChatCompletionsResponse"},"400":{"description":"Invalid request data."},"500":{"description":"Server error."}}}}}}
```

***

## Audio

## Audio Speech

> Generate speech audio from text.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Audio","description":"Generate audio or text from audio or text input."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]},{"apiKey":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}},"apiKey":{"type":"http","scheme":"bearer"}},"schemas":{"SpeechRequest":{"type":"object","additionalProperties":false,"properties":{"model":{"type":"string"},"input":{"type":"string","description":"The text to generate audio for.","maxLength":4096},"voice":{"description":"The voice to use when generating the audio.","type":"string","enum":["alloy","echo","fable","onyx","nova","shimmer"]},"response_format":{"description":"The format to output audio in.","default":"mp3","type":"string","enum":["mp3","opus","aac","flac","wav","pcm"]},"speed":{"description":"The speed of the generated audio.","type":"number","default":1,"minimum":0.25,"maximum":4}},"required":["model","input","voice"]}}},"paths":{"/v1/audio/speech":{"post":{"operationId":"post-audio-speech-v1","summary":"Audio Speech","tags":["Audio"],"description":"Generate speech audio from text.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechRequest"}}}},"responses":{"200":{"description":"Successful response with an audio speech.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request data."},"500":{"description":"Server error."}}}}}}
```

## Audio Transcriptions

> Transcribe audio to text.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Audio","description":"Generate audio or text from audio or text input."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]},{"apiKey":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}},"apiKey":{"type":"http","scheme":"bearer"}},"schemas":{"TranscriptionRequest":{"type":"object","additionalProperties":false,"properties":{"file":{"description":"The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.\n","type":"string","format":"binary"},"model":{"type":"string"},"language":{"description":"The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.\n","type":"string"},"prompt":{"description":"An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should match the audio language.\n","type":"string"},"response_format":{"description":"The format of the transcript output.\n","type":"string","enum":["json","text","srt","verbose_json","vtt"],"default":"json"},"temperature":{"description":"The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n","type":"number","default":0},"timestamp_granularities[]":{"description":"The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.\n","type":"array","items":{"type":"string","enum":["word","segment"]},"default":["segment"]}},"required":["file","model"]},"TranscriptionResponseJson":{"type":"object","description":"Represents a transcription response returned by model, based on the provided input.","properties":{"text":{"type":"string","description":"The transcribed text."},"model":{"type":"string","description":"The model used for generating transcription."}}},"TranscriptionResponseVerboseJson":{"type":"object","description":"Represents a verbose json transcription response returned by model, based on the provided input.","properties":{"language":{"type":"string","description":"The language of the input audio."},"duration":{"type":"string","description":"The duration of the input audio."},"text":{"type":"string","description":"The transcribed text."},"words":{"type":"array","description":"Extracted words and their corresponding timestamps.","items":{"$ref":"#/components/schemas/TranscriptionWord"}},"segments":{"type":"array","description":"Segments of the transcribed text and their corresponding details.","items":{"$ref":"#/components/schemas/TranscriptionSegment"}},"model":{"type":"string","description":"The model used for generating transcription."}}},"TranscriptionWord":{"type":"object","properties":{"word":{"type":"string","description":"The text content of the word."},"start":{"type":"number","format":"float","description":"Start time of the word in seconds."},"end":{"type":"number","format":"float","description":"End time of the word in seconds."}}},"TranscriptionSegment":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier of the segment."},"seek":{"type":"integer","description":"Seek offset of the segment."},"start":{"type":"number","format":"float","description":"Start time of the segment in seconds."},"end":{"type":"number","format":"float","description":"End time of the segment in seconds."},"text":{"type":"string","description":"Text content of the segment."},"tokens":{"type":"array","items":{"type":"integer"},"description":"Array of token IDs for the text content."},"temperature":{"type":"number","format":"float","description":"Temperature parameter used for generating the segment."},"avg_logprob":{"type":"number","format":"float","description":"Average logprob of the segment. If the value is lower than -1, consider the logprobs failed."},"compression_ratio":{"type":"number","format":"float","description":"Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed."},"no_speech_prob":{"type":"number","format":"float","description":"Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent."}}}}},"paths":{"/v1/audio/transcriptions":{"post":{"operationId":"post-audio-transcriptions-v1","summary":"Audio Transcriptions","tags":["Audio"],"description":"Transcribe audio to text.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TranscriptionRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TranscriptionResponseJson"},{"$ref":"#/components/schemas/TranscriptionResponseVerboseJson"}]}}}},"400":{"description":"Invalid request data."},"500":{"description":"Server error."}}}}}}
```

## Audio Translations

> Translate audio to English text.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Audio","description":"Generate audio or text from audio or text input."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]},{"apiKey":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}},"apiKey":{"type":"http","scheme":"bearer"}},"schemas":{"TranslationRequest":{"type":"object","additionalProperties":false,"properties":{"file":{"description":"The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.\n","type":"string","format":"binary"},"model":{"type":"string"},"prompt":{"description":"An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should be in English.\n","type":"string"},"response_format":{"description":"The format of the translated transcript output.\n","type":"string","enum":["json","text","srt","verbose_json","vtt"],"default":"json"},"temperature":{"description":"The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n","type":"number","default":0}},"required":["file","model"]},"TranslationResponseJson":{"type":"object","description":"Represents a translation response returned by model, based on the provided input.","properties":{"text":{"type":"string"},"model":{"type":"string","description":"The model used for generating translation."}}},"TranslationResponseVerboseJson":{"type":"object","description":"Represents a verbose translation response returned by model, based on the provided input.","properties":{"language":{"type":"string","description":"The language of the output translation (always `english`)."},"duration":{"type":"string","description":"The duration of the input audio."},"text":{"type":"string","description":"The translated text."},"segments":{"type":"array","description":"Segments of the translated text and their corresponding details.","items":{"$ref":"#/components/schemas/TranscriptionSegment"}},"model":{"type":"string","description":"The model used for generating translation."}}},"TranscriptionSegment":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier of the segment."},"seek":{"type":"integer","description":"Seek offset of the segment."},"start":{"type":"number","format":"float","description":"Start time of the segment in seconds."},"end":{"type":"number","format":"float","description":"End time of the segment in seconds."},"text":{"type":"string","description":"Text content of the segment."},"tokens":{"type":"array","items":{"type":"integer"},"description":"Array of token IDs for the text content."},"temperature":{"type":"number","format":"float","description":"Temperature parameter used for generating the segment."},"avg_logprob":{"type":"number","format":"float","description":"Average logprob of the segment. If the value is lower than -1, consider the logprobs failed."},"compression_ratio":{"type":"number","format":"float","description":"Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed."},"no_speech_prob":{"type":"number","format":"float","description":"Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent."}}}}},"paths":{"/v1/audio/translations":{"post":{"operationId":"post-audio-translations-v1","summary":"Audio Translations","tags":["Audio"],"description":"Translate audio to English text.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TranslationRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TranslationResponseJson"},{"$ref":"#/components/schemas/TranslationResponseVerboseJson"}]}}}},"400":{"description":"Invalid request data."},"500":{"description":"Server error."}}}}}}
```

***

## Images

## Images Generations

> Generate images from a text prompt.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Images","description":"Generate images from image or text input."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]},{"apiKey":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}},"apiKey":{"type":"http","scheme":"bearer"}},"schemas":{"ImagesGenerationsRequest":{"type":"object","additionalProperties":false,"properties":{"prompt":{"description":"A text description of the desired image(s).","type":"string"},"model":{"type":"string"},"n":{"type":"integer","minimum":1,"maximum":10,"nullable":true,"description":"The number of images to generate. Must be between 1 and 10."},"quality":{"description":"The quality of the generated images.","type":"string","enum":["standard","hd"],"default":"standard"},"response_format":{"description":"The format of the generated images.","type":"string","enum":["url","b64_json"],"default":"url","nullable":true},"size":{"description":"The size of the generated images.","type":"string","enum":["256x256","512x512","1024x1024","1792x1024","1024x1792"],"nullable":true},"style":{"description":"The style of the generated images.","type":"string","enum":["vivid","natural"],"default":"vivid","nullable":true}},"required":["prompt","model"]}},"responses":{"ImagesResponse":{"description":"Represents an image response returned by model, based on the provided input.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"integer","description":"The Unix timestamp (in seconds) of when the images were created.\n"},"data":{"type":"array","items":{"type":"object","properties":{"b64_json":{"type":"string","description":"The base64-encoded JSON of the generated image, if response_format is b64_json.\n"},"revised_prompt":{"type":"string","description":"The prompt that was used to generate the image, if there was any revision to the prompt.\n"},"url":{"type":"string","description":"The URL of the generated image, if response_format is url (default).\n"}}}}},"required":["created","data"]}}}}}},"paths":{"/v1/images/generations":{"post":{"operationId":"post-images-generations-v1","summary":"Images Generations","tags":["Images"],"description":"Generate images from a text prompt.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagesGenerationsRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/ImagesResponse"},"400":{"description":"Invalid request data."},"500":{"description":"Server error."}}}}}}
```

***

## Embeddings

## Embeddings

> Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Embeddings","description":"Create vector embeddings for input text."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]},{"apiKey":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}},"apiKey":{"type":"http","scheme":"bearer"}},"schemas":{"EmbeddingsRequest":{"type":"object","properties":{"model":{"type":"string"},"input":{"description":"Input text to get embeddings for.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"integer"}},{"type":"array","items":{"type":"array","items":{"type":"integer"}}}]},"encoding_format":{"type":"string","description":"The format to return the embeddings in. Can be either float or base64.","enum":["float","base64"],"default":"float"},"dimensions":{"type":"integer","description":"The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.","minimum":1}},"required":["model","prompt"]}},"responses":{"EmbeddingsResponse":{"description":"Represents an embedding response returned by model, based on the provided input.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"list\""},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"embedding\""},"embedding":{"type":"array","items":{"type":"number","format":"float"},"description":"The embedding vector"},"index":{"type":"integer","description":"The index of the embedding in the list"}}}},"model":{"type":"string","description":"The model used for generating embeddings"},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","description":"The number of tokens used in the prompt"},"total_tokens":{"type":"integer","description":"The total number of tokens used"}}}}}}}}}},"paths":{"/v1/embeddings":{"post":{"operationId":"post-embeddings-v1","summary":"Embeddings","tags":["Embeddings"],"description":"Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingsRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/EmbeddingsResponse"},"400":{"description":"Invalid request data."},"500":{"description":"Server error."}}}}}}
```

***

## Storage

## List Uploaded Media Files

> List uploaded files.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Storage","description":"Upload and manage media files"}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]},{"apiKey":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}},"apiKey":{"type":"http","scheme":"bearer"}},"schemas":{"FilePurposeType":{"type":"string","description":"The intended purpose for a file.","enum":["batch"]},"ListFilesResponse":{"type":"object","description":"A list of uploaded files.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FileResponse"}},"object":{"type":"string","enum":["list"]}},"required":["data"]},"FileResponse":{"type":"object","description":"The File object represents a document that has been uploaded to OpenAI.","properties":{"bytes":{"type":"integer","description":"The size of the file, in bytes."},"created_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when the file was created."},"filename":{"type":"string","description":"The name of the file."},"id":{"type":"string","description":"The file identifier, which can be referenced in the API endpoints."},"purpose":{"type":"string","description":"The intended purpose of the file.","enum":["assistants","assistants_output","batch","batch_output","fine-tune","fine-tune-results","vision"]},"status":{"type":"string","description":"The status of the file.","enum":["error","processed","uploaded"]},"object":{"type":"string","enum":["file"]}}}}},"paths":{"/v1/storage":{"get":{"operationId":"get-storage-files-v1","summary":"List Uploaded Media Files","tags":["Storage"],"description":"List uploaded files.","parameters":[{"name":"after","in":"query","description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000.","required":false,"schema":{"type":"integer","format":"uint32","default":10000}},{"name":"order","in":"query","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"purpose","in":"query","description":"Only return files with the given purpose.","required":false,"schema":{"$ref":"#/components/schemas/FilePurposeType"}}],"responses":{"200":{"description":"Successful response with list of files","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilesResponse"}}}},"500":{"description":"Server error."}}}}}}
```

## Upload Media File

> Upload a media file for later use.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Storage","description":"Upload and manage media files"}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]},{"apiKey":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}},"apiKey":{"type":"http","scheme":"bearer"}},"schemas":{"UploadFileRequest":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The File object (not file name) to be uploaded."},"purpose":{"$ref":"#/components/schemas/FilePurposeType"}},"required":["file","purpose"]},"FilePurposeType":{"type":"string","description":"The intended purpose for a file.","enum":["batch"]},"FileResponse":{"type":"object","description":"The File object represents a document that has been uploaded to OpenAI.","properties":{"bytes":{"type":"integer","description":"The size of the file, in bytes."},"created_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when the file was created."},"filename":{"type":"string","description":"The name of the file."},"id":{"type":"string","description":"The file identifier, which can be referenced in the API endpoints."},"purpose":{"type":"string","description":"The intended purpose of the file.","enum":["assistants","assistants_output","batch","batch_output","fine-tune","fine-tune-results","vision"]},"status":{"type":"string","description":"The status of the file.","enum":["error","processed","uploaded"]},"object":{"type":"string","enum":["file"]}}}}},"paths":{"/v1/storage":{"post":{"operationId":"post-storage-files-v1","summary":"Upload Media File","tags":["Storage"],"description":"Upload a media file for later use.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadFileRequest"}}}},"responses":{"200":{"description":"Successful response with file upload details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"400":{"description":"Invalid request data."},"500":{"description":"Server error."}}}}}}
```

## Get Storage File

> Retrieve file details by ID.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Storage","description":"Upload and manage media files"}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]},{"apiKey":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}},"apiKey":{"type":"http","scheme":"bearer"}},"schemas":{"FileResponse":{"type":"object","description":"The File object represents a document that has been uploaded to OpenAI.","properties":{"bytes":{"type":"integer","description":"The size of the file, in bytes."},"created_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when the file was created."},"filename":{"type":"string","description":"The name of the file."},"id":{"type":"string","description":"The file identifier, which can be referenced in the API endpoints."},"purpose":{"type":"string","description":"The intended purpose of the file.","enum":["assistants","assistants_output","batch","batch_output","fine-tune","fine-tune-results","vision"]},"status":{"type":"string","description":"The status of the file.","enum":["error","processed","uploaded"]},"object":{"type":"string","enum":["file"]}}}}},"paths":{"/v1/storage/{file_id}":{"get":{"operationId":"get-storage-file-v1","summary":"Get Storage File","tags":["Storage"],"description":"Retrieve file details by ID.","parameters":[{"name":"file_id","description":"The ID of the file to use for this request.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response with file details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"404":{"description":"File not found."},"500":{"description":"Server error."}}}}}}
```

## Delete Storage File

> Delete a file by ID.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Storage","description":"Upload and manage media files"}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]},{"apiKey":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}},"apiKey":{"type":"http","scheme":"bearer"}},"schemas":{"DeletionStatusResponse":{"type":"object","description":"The status of a file deletion.","properties":{"id":{"type":"string","description":"The file identifier."},"deleted":{"type":"boolean","description":"Indicates whether the file has been deleted."}},"required":["id","deleted"]}}},"paths":{"/v1/storage/{file_id}":{"delete":{"operationId":"delete-storage-file-v1","summary":"Delete Storage File","tags":["Storage"],"description":"Delete a file by ID.","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response with deletion status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletionStatusResponse"}}}},"404":{"description":"File not found."},"500":{"description":"Server error."}}}}}}
```

## Get Storage File Contents

> Download file contents by ID.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Storage","description":"Upload and manage media files"}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]},{"apiKey":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}},"apiKey":{"type":"http","scheme":"bearer"}}},"paths":{"/v1/storage/{file_id}/content":{"get":{"operationId":"get-storage-file-contents-v1","summary":"Get Storage File Contents","tags":["Storage"],"description":"Download file contents by ID.","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response with file contents","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"File not found."},"500":{"description":"Server error."}}}}}}
```

***

## Models

## List models

> List all models available to the user.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]},{"apiKey":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}},"apiKey":{"type":"http","scheme":"bearer"}},"responses":{"UserModelsResponse":{"description":"A list of models available to use for the current user.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserModel"}},"total":{"type":"integer"}},"required":["object","data","total"]}}}}},"schemas":{"UserModel":{"type":"object","properties":{"id":{"type":"string","description":"The model identifier, which can be referenced in the API endpoints."},"nexos_model_id":{"type":"string","description":"Internal model identifier, which also can be referenced in the API endpoints."},"object":{"type":"string","description":"The object type, which is always \"model\"."},"created":{"type":"integer","format":"int64","description":"The Unix timestamp (in seconds) when the model was created."},"updated":{"type":"integer","format":"int64","description":"The Unix timestamp (in seconds) when the model was updated."},"owned_by":{"type":"string","description":"The organization that owns the model."},"name":{"type":"string","description":"Model name","deprecated":true},"timeout_ms":{"type":"integer","format":"int32","minimum":1,"description":"Model response timeout (milliseconds)"},"stream_timeout_ms":{"type":"integer","format":"int32","minimum":1,"description":"Model response timeout when streaming is enabled (milliseconds)"},"max_tokens":{"type":"integer","format":"int32","minimum":1,"description":"Maximum number of tokens the model can generate in a single request."}},"required":["id","object","created","updated","name","owned_by"]}}},"paths":{"/v1/models":{"get":{"operationId":"get-user-models-v1","summary":"List models","description":"List all models available to the user.","tags":["Models"],"responses":{"200":{"$ref":"#/components/responses/UserModelsResponse"},"404":{"description":"User not found."}}}}}}
```

## Get fallbacks configuration for particular model

> Fallbacks configuration for particular model. Fallbacks go model by model through by the order of model ids list being supplied

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}},"schemas":{"ModelFallbacksConfiguration":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the model"},"fallback_ids":{"$ref":"#/components/schemas/ModelFallbacks"},"created_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was last updated."}},"required":["id"]},"ModelFallbacks":{"type":"array","items":{"type":"string","format":"uuid","description":"The ID of the model to associate with the company."}}}},"paths":{"/v1/management/models/{model}/fallbacks":{"get":{"operationId":"get-model-fallbacks-v1","summary":"Get fallbacks configuration for particular model","description":"Fallbacks configuration for particular model. Fallbacks go model by model through by the order of model ids list being supplied","tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"description":"The ID of the model.","schema":{"type":"string"}}],"responses":{"200":{"description":"Model fallbacks configuration found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksConfiguration"}}}},"400":{"description":"Houston, we have a problem"}}}}}}
```

## Add fallbacks configuration for particular model

> Fallbacks configuration for particular model. Fallback go model by model through by the order of model ids list being supplied

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}},"schemas":{"ModelFallbacksRequest":{"type":"object","properties":{"models":{"$ref":"#/components/schemas/ModelFallbacks"}},"required":["models"]},"ModelFallbacks":{"type":"array","items":{"type":"string","format":"uuid","description":"The ID of the model to associate with the company."}},"ModelFallbacksConfiguration":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the model"},"fallback_ids":{"$ref":"#/components/schemas/ModelFallbacks"},"created_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was last updated."}},"required":["id"]}}},"paths":{"/v1/management/models/{model}/fallbacks":{"post":{"operationId":"post-model-fallbacks-v1","summary":"Add fallbacks configuration for particular model","description":"Fallbacks configuration for particular model. Fallback go model by model through by the order of model ids list being supplied","tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"description":"The ID of the model.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksRequest"}}}},"responses":{"201":{"description":"Model fallbacks configuration successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksConfiguration"}}}},"400":{"description":"Invalid request or fallback configurations already associated with the model."},"404":{"description":"Model not found."}}}}}}
```

## Delete model fallbacks configuration

> Delete model fallbacks configuration

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}}},"paths":{"/v1/management/models/{model}/fallbacks":{"delete":{"operationId":"delete-model-fallbacks-v1","summary":"Delete model fallbacks configuration","description":"Delete model fallbacks configuration","tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"description":"The ID of the model.","schema":{"type":"string"}}],"responses":{"204":{"description":"Model fallbacks configuration deleted successfully"},"400":{"description":"Houston, we have a problem"}}}}}}
```

## Add fallbacks configuration for particular model

> Fallbacks configuration for particular model. Fallback go model by model through by the order of model ids list being supplied

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}},"schemas":{"ModelFallbacksRequest":{"type":"object","properties":{"models":{"$ref":"#/components/schemas/ModelFallbacks"}},"required":["models"]},"ModelFallbacks":{"type":"array","items":{"type":"string","format":"uuid","description":"The ID of the model to associate with the company."}},"ModelFallbacksConfiguration":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the model"},"fallback_ids":{"$ref":"#/components/schemas/ModelFallbacks"},"created_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was last updated."}},"required":["id"]}}},"paths":{"/v1/management/models/{model}/fallbacks":{"patch":{"operationId":"update-model-fallbacks-v1","summary":"Add fallbacks configuration for particular model","description":"Fallbacks configuration for particular model. Fallback go model by model through by the order of model ids list being supplied","tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"description":"The ID of the model.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksRequest"}}}},"responses":{"200":{"description":"Model fallbacks configuration successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksConfiguration"}}}},"400":{"description":"Houston, we have a problem"}}}}}}
```

***

## Team Management

## GET /v1/teams/{teamId}/api\_keys

> List team API Keys

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}},"schemas":{"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/teams/{teamId}/api_keys":{"get":{"operationId":"list-team-api-keys-v1","tags":["Team Management"],"summary":"List team API Keys","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}}],"responses":{"200":{"description":"List of team API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIKey"}}}}}}}}}}
```

## POST /v1/teams/{teamId}/api\_keys

> Create team API Key

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}},"schemas":{"APIKeyRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the key (needs to be unique).","minLength":1,"maxLength":255},"enabled":{"type":"boolean","description":"Whether the API key is enabled. Only applicable when updating a key."},"expiration_date":{"type":"string","format":"date-time","nullable":true,"description":"The date when the key expires. Null means no expiration."}},"required":["name"]},"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}},"responses":{"TeamAPIKeyResponse":{"description":"Team API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}}},"paths":{"/v1/teams/{teamId}/api_keys":{"post":{"operationId":"create-team-api-key-v1","tags":["Team Management"],"summary":"Create team API Key","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRequest"}}}},"responses":{"201":{"$ref":"#/components/responses/TeamAPIKeyResponse"}}}}}}
```

## DELETE /v1/teams/{teamId}/api\_keys/{keyId}

> Delete team API Key

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}}},"paths":{"/v1/teams/{teamId}/api_keys/{keyId}":{"delete":{"operationId":"delete-team-api-key-v1","tags":["Team Management"],"summary":"Delete team API Key","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"description":"The ID of the key.","schema":{"type":"string"}}],"responses":{"204":{"description":"All good"},"400":{"description":"Bad request"},"404":{"description":"Team/Key not found."}}}}}}
```

## PATCH /v1/teams/{teamId}/api\_keys/{keyId}

> Update team API Key

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}},"schemas":{"APIKeyRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the key (needs to be unique).","minLength":1,"maxLength":255},"enabled":{"type":"boolean","description":"Whether the API key is enabled. Only applicable when updating a key."},"expiration_date":{"type":"string","format":"date-time","nullable":true,"description":"The date when the key expires. Null means no expiration."}},"required":["name"]},"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}},"responses":{"TeamAPIKeyResponse":{"description":"Team API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}}},"paths":{"/v1/teams/{teamId}/api_keys/{keyId}":{"patch":{"operationId":"update-team-api-key-v1","tags":["Team Management"],"summary":"Update team API Key","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"description":"The ID of the key.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/TeamAPIKeyResponse"},"400":{"description":"Invalid request."},"404":{"description":"Team/Key not found."}}}}}}
```

## Rotate API Key

> Rotates the API key used to authenticate this request. Returns a new key value.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Utils","description":"General utilities"}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer"}},"responses":{"RotateAPIKeyResponse":{"description":"Rotated API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}},"schemas":{"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/apikey/rotate":{"patch":{"operationId":"rotate-api-key-v1","tags":["Utils"],"summary":"Rotate API Key","description":"Rotates the API key used to authenticate this request. Returns a new key value.","responses":{"200":{"$ref":"#/components/responses/RotateAPIKeyResponse"},"401":{"description":"Unauthorized — request not authenticated via API key."},"500":{"description":"Internal server error."}}}}}}
```

## PATCH /v1/teams/{teamId}/api\_keys/{keyId}/regenerate

> Regenerate team API Key

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}},"responses":{"TeamAPIKeyResponse":{"description":"Team API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}},"schemas":{"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/teams/{teamId}/api_keys/{keyId}/regenerate":{"patch":{"operationId":"regenerate-team-api-key-v1","deprecated":true,"tags":["Team Management"],"summary":"Regenerate team API Key","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"description":"The ID of the key.","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/TeamAPIKeyResponse"},"400":{"description":"Invalid request."},"404":{"description":"Team/Key not found."}}}}}}
```

***

## User Management

## GET /v1/user/api\_keys

> List user API Keys

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"User Management","description":"Manage user API keys."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}},"schemas":{"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/user/api_keys":{"get":{"operationId":"list-user-api-keys-v1","tags":["User Management"],"summary":"List user API Keys","responses":{"200":{"description":"List of user API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIKey"}}}}}}}}}}
```

## POST /v1/user/api\_keys

> Create user API Key

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"User Management","description":"Manage user API keys."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}},"schemas":{"APIKeyRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the key (needs to be unique).","minLength":1,"maxLength":255},"enabled":{"type":"boolean","description":"Whether the API key is enabled. Only applicable when updating a key."},"expiration_date":{"type":"string","format":"date-time","nullable":true,"description":"The date when the key expires. Null means no expiration."}},"required":["name"]},"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}},"responses":{"UserAPIKeyResponse":{"description":"User API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}}},"paths":{"/v1/user/api_keys":{"post":{"operationId":"create-user-api-key-v1","tags":["User Management"],"summary":"Create user API Key","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRequest"}}}},"responses":{"201":{"$ref":"#/components/responses/UserAPIKeyResponse"}}}}}}
```

## DELETE /v1/user/api\_keys/{keyId}

> Delete user API Key

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"User Management","description":"Manage user API keys."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}}},"paths":{"/v1/user/api_keys/{keyId}":{"delete":{"operationId":"delete-user-api-key-v1","tags":["User Management"],"summary":"Delete user API Key","parameters":[{"name":"keyId","in":"path","required":true,"description":"The ID of the key.","schema":{"type":"string"}}],"responses":{"204":{"description":"All good"},"400":{"description":"Bad request"},"404":{"description":"User/Key not found."}}}}}}
```

## PATCH /v1/user/api\_keys/{keyId}

> Update user API Key

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"User Management","description":"Manage user API keys."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}},"schemas":{"APIKeyRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the key (needs to be unique).","minLength":1,"maxLength":255},"enabled":{"type":"boolean","description":"Whether the API key is enabled. Only applicable when updating a key."},"expiration_date":{"type":"string","format":"date-time","nullable":true,"description":"The date when the key expires. Null means no expiration."}},"required":["name"]},"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}},"responses":{"UserAPIKeyResponse":{"description":"User API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}}},"paths":{"/v1/user/api_keys/{keyId}":{"patch":{"operationId":"update-user-api-key-v1","tags":["User Management"],"summary":"Update user API Key","parameters":[{"name":"keyId","in":"path","required":true,"description":"The ID of the key.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/UserAPIKeyResponse"},"400":{"description":"Invalid request."},"404":{"description":"User/Key not found."}}}}}}
```

## Rotate API Key

> Rotates the API key used to authenticate this request. Returns a new key value.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Utils","description":"General utilities"}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer"}},"responses":{"RotateAPIKeyResponse":{"description":"Rotated API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}},"schemas":{"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/apikey/rotate":{"patch":{"operationId":"rotate-api-key-v1","tags":["Utils"],"summary":"Rotate API Key","description":"Rotates the API key used to authenticate this request. Returns a new key value.","responses":{"200":{"$ref":"#/components/responses/RotateAPIKeyResponse"},"401":{"description":"Unauthorized — request not authenticated via API key."},"500":{"description":"Internal server error."}}}}}}
```

## PATCH /v1/user/api\_keys/{keyId}/regenerate

> Regenerate user API Key

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"User Management","description":"Manage user API keys."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}},"responses":{"UserAPIKeyResponse":{"description":"User API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}},"schemas":{"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/user/api_keys/{keyId}/regenerate":{"patch":{"operationId":"regenerate-user-api-key-v1","deprecated":true,"tags":["User Management"],"summary":"Regenerate user API Key","parameters":[{"name":"keyId","in":"path","required":true,"description":"The ID of the key.","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/UserAPIKeyResponse"},"400":{"description":"Invalid request."},"404":{"description":"User/Key not found."}}}}}}
```

***

## Assistant Management

## Get assistants for a specific user. Deprecated, use /v1/agents instead.

> Deprecated: Use /v1/agents instead. Retrieve list of assistants for a specific user.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Assistant Management","description":"Manage assistants."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"hydra":[]}],"components":{"securitySchemes":{"hydra":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","scopes":{}}}}},"schemas":{"SortByField":{"type":"string","enum":["name","created_at"]},"SortOrder":{"type":"string","enum":["asc","desc"],"description":"Sort order, must be used together with sort_by.field."},"Assistant":{"description":"Represents an AI assistant.","type":"object","properties":{"id":{"type":"string","description":"Unique identifier."},"name":{"type":"string","description":"Assistant name."},"description":{"type":"string","description":"Assistant description.","nullable":true},"instructions":{"type":"string","description":"Assistant instructions."},"model":{"type":"string","description":"Model name."},"created_at":{"type":"string","format":"date-time","description":"The time the assistant was created."}},"required":["id","created_at","name","model"]}},"responses":{"AssistantListResponse":{"description":"A list of assistants.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Assistant"}},"total":{"type":"integer","format":"int64"}}}}}}}},"paths":{"/v1/assistants":{"get":{"operationId":"get-assistants-v1","deprecated":true,"summary":"Get assistants for a specific user. Deprecated, use /v1/agents instead.","tags":["Assistant Management"],"description":"Deprecated: Use /v1/agents instead. Retrieve list of assistants for a specific user.","parameters":[{"name":"limit","in":"query","required":false,"description":"The number of items to return.","schema":{"type":"integer","format":"int64","default":100,"minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"description":"The number of items to skip.","schema":{"type":"integer","format":"int64"}},{"name":"sort_by.field","in":"query","schema":{"$ref":"#/components/schemas/SortByField"},"description":"Field to sort by, must be used together with sort_by.order."},{"name":"sort_by.order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder"},"description":"Sort order, must be used together with sort_by.field."},{"name":"include_shared","in":"query","required":false,"description":"Whether to include assistants shared with the user.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"$ref":"#/components/responses/AssistantListResponse"},"404":{"description":"Assistant not found."}}}}}}
```

***

## 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":[],"servers":[{"url":"https://api.nexos.ai"}],"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."}}},"components":{"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"},"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}},"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"}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","description":"The number of output tokens."},"output_tokens_details":{"type":"object","description":"A detailed breakdown of the output tokens.","properties":{"reasoning_tokens":{"type":"integer","description":"The number of reasoning tokens."}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","description":"The total number of tokens used."}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]},"Conversation-2":{"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"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"]}}}}
````

## 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":[],"servers":[{"url":"https://api.nexos.ai"}],"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"}}},"components":{"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}},"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"},"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"}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","description":"The number of output tokens."},"output_tokens_details":{"type":"object","description":"A detailed breakdown of the output tokens.","properties":{"reasoning_tokens":{"type":"integer","description":"The number of reasoning tokens."}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","description":"The total number of tokens used."}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]},"Conversation-2":{"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"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."}}}}
````

## 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":[],"servers":[{"url":"https://api.nexos.ai"}],"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"}}},"components":{"schemas":{"Error":{"type":"object","properties":{"code":{"type":"string","nullable":true},"message":{"type":"string"},"param":{"type":"string","nullable":true},"type":{"type":"string"}},"required":["type","message","param","code"]}}}}
```

## 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":[],"servers":[{"url":"https://api.nexos.ai"}],"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."}}},"components":{"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"]}}}}
````

## Cancel a response

> Cancels a model response with the given ID. Only responses created with\
> the \`background\` parameter set to \`true\` can be cancelled. <br>

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[],"servers":[{"url":"https://api.nexos.ai"}],"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"}}},"components":{"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}},"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"},"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"}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","description":"The number of output tokens."},"output_tokens_details":{"type":"object","description":"A detailed breakdown of the output tokens.","properties":{"reasoning_tokens":{"type":"integer","description":"The number of reasoning tokens."}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","description":"The total number of tokens used."}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]},"Conversation-2":{"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"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","properties":{"code":{"type":"string","nullable":true},"message":{"type":"string"},"param":{"type":"string","nullable":true},"type":{"type":"string"}},"required":["type","message","param","code"]}}}}
````

## Compact a response

> Compact conversation

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"servers":[{"url":"https://api.nexos.ai"}],"paths":{"/v1/responses/compact":{"post":{"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"}}}}}}}},"components":{"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"}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","description":"The number of output tokens."},"output_tokens_details":{"type":"object","description":"A detailed breakdown of the output tokens.","properties":{"reasoning_tokens":{"type":"integer","description":"The number of reasoning tokens."}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","description":"The total number of tokens used."}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]}}}}
````

## Get input token counts

> Get input token counts

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"servers":[{"url":"https://api.nexos.ai"}],"paths":{"/v1/responses/input_tokens":{"post":{"summary":"Get input token counts","description":"Get input token counts","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"}}}}}}}},"components":{"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"},"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"}}}}
````


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
