GET

/v1/schemas/openai/chat/responses%3Fbeta%3Dtrue?kind=output

kind outputactivity chathash 6e3508e0extracted Jul 23, 2026version currentsource upstream spec ↗

Response body

0 properties · 0 required · 0 $defs

This schema isn’t a plain object with properties — showing the raw JSON instead.

application/json
{
  "provider": "openai",
  "activity": "chat",
  "endpointId": "responses?beta=true",
  "kind": "output",
  "contentHash": "6e3508e01891dee991fb0b1c45fe9b69ff27d8aa3ccd9a11d57db1e69fdf3f5b",
  "specRevision": null,
  "provenance": {
    "sourceUrl": "https://raw.githubusercontent.com/openai/openai-openapi/master/openapi.yaml",
    "sourceHash": "0e6756eca8e097e1738f273d0fa288dd745d75ee298c038a8bc9b8c6301f42d7",
    "fetchedAt": 1784782802,
    "extractorVersion": "1"
  },
  "createdAt": 1784782802,
  "supersededAt": null,
  "schema": {
    "title": "The response object",
    "allOf": [
      {
        "$ref": "#/$defs/BetaModelResponseProperties"
      },
      {
        "$ref": "#/$defs/BetaResponseProperties"
      },
      {
        "type": "object",
        "properties": {
          "truncation": {
            "anyOf": [
              {
                "type": "string",
                "description": "The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n  the model's context window size, the model will truncate the\n  response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n  size for a model, the request will fail with a 400 error.\n",
                "enum": [
                  "auto",
                  "disabled"
                ],
                "default": "disabled"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "description": "Unique identifier for this Response.\n"
          },
          "object": {
            "type": "string",
            "description": "The object type of this resource - always set to `response`.\n",
            "enum": [
              "response"
            ],
            "x-stainless-const": true
          },
          "status": {
            "type": "string",
            "description": "The status of the response generation. One of `completed`, `failed`,\n`in_progress`, `cancelled`, `queued`, or `incomplete`.\n",
            "enum": [
              "completed",
              "failed",
              "in_progress",
              "cancelled",
              "queued",
              "incomplete"
            ]
          },
          "created_at": {
            "type": "number",
            "format": "unixtime",
            "description": "Unix timestamp (in seconds) of when this Response was created.\n"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "number",
                "format": "unixtime",
                "description": "Unix timestamp (in seconds) of when this Response was completed.\nOnly present when the status is `completed`.\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "$ref": "#/$defs/BetaResponseError"
          },
          "incomplete_details": {
            "anyOf": [
              {
                "type": "object",
                "description": "Details about why the response is incomplete.\n",
                "properties": {
                  "reason": {
                    "type": "string",
                    "description": "The reason why the response is incomplete.",
                    "enum": [
                      "max_output_tokens",
                      "content_filter"
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "output": {
            "type": "array",
            "description": "An array of content items generated by the model.\n\n- The length and order of items in the `output` array is dependent\n  on the model's response.\n- Rather than accessing the first item in the `output` array and\n  assuming it's an `assistant` message with the content generated by\n  the model, you might consider using the `output_text` property where\n  supported in SDKs.\n",
            "items": {
              "$ref": "#/$defs/BetaOutputItem"
            }
          },
          "reasoning": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaReasoning"
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions": {
            "anyOf": [
              {
                "description": "A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n",
                "oneOf": [
                  {
                    "type": "string",
                    "description": "A text input to the model, equivalent to a text input with the\n`developer` role.\n"
                  },
                  {
                    "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": "#/$defs/BetaInputItem"
                    }
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "output_text": {
            "anyOf": [
              {
                "type": "string",
                "description": "SDK-only convenience property that contains the aggregated text output\nfrom all `output_text` items in the `output` array, if any are present.\nSupported in the Python and JavaScript SDKs.\n",
                "x-oaiSupportedSDKs": [
                  "python",
                  "javascript"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "usage": {
            "$ref": "#/$defs/BetaResponseUsage"
          },
          "prompt_cache_options": {
            "$ref": "#/$defs/BetaPromptCacheOptions"
          },
          "moderation": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaModeration",
                "description": "Moderation results for the response input and output, if moderated completions were requested.\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "parallel_tool_calls": {
            "type": "boolean",
            "description": "Whether to allow the model to run tool calls in parallel.\n",
            "default": true
          },
          "conversation": {
            "anyOf": [
              {
                "default": null,
                "$ref": "#/$defs/BetaConversation-2"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_output_tokens": {
            "anyOf": [
              {
                "description": "An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning).\n",
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "error",
          "incomplete_details",
          "instructions",
          "model",
          "tools",
          "output",
          "parallel_tool_calls",
          "metadata",
          "tool_choice",
          "temperature",
          "top_p"
        ]
      }
    ],
    "example": {
      "id": "resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41",
      "object": "response",
      "created_at": 1741476777,
      "status": "completed",
      "completed_at": 1741476778,
      "error": null,
      "incomplete_details": null,
      "instructions": null,
      "max_output_tokens": null,
      "model": "gpt-4o-2024-08-06",
      "output": [
        {
          "type": "message",
          "id": "msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41",
          "status": "completed",
          "role": "assistant",
          "content": [
            {
              "type": "output_text",
              "text": "The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.",
              "annotations": []
            }
          ]
        }
      ],
      "parallel_tool_calls": true,
      "previous_response_id": null,
      "reasoning": {
        "effort": null,
        "summary": null,
        "context": null
      },
      "store": true,
      "temperature": 1,
      "text": {
        "format": {
          "type": "text"
        }
      },
      "tool_choice": "auto",
      "tools": [],
      "top_p": 1,
      "truncation": "disabled",
      "usage": {
        "input_tokens": 328,
        "input_tokens_details": {
          "cached_tokens": 0,
          "cache_write_tokens": 0
        },
        "output_tokens": 52,
        "output_tokens_details": {
          "reasoning_tokens": 0
        },
        "total_tokens": 380
      },
      "user": null,
      "metadata": {}
    },
    "$defs": {
      "BetaAdditionalTools": {
        "properties": {
          "agent": {
            "$ref": "#/$defs/BetaAgentTag",
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "additional_tools"
            ],
            "description": "The type of the item. Always `additional_tools`.",
            "default": "additional_tools",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the additional tools item."
          },
          "role": {
            "$ref": "#/$defs/BetaMessageRole",
            "description": "The role that provided the additional tools."
          },
          "tools": {
            "items": {
              "$ref": "#/$defs/BetaTool"
            },
            "type": "array",
            "description": "The additional tool definitions made available at this item."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "role",
          "tools"
        ]
      },
      "BetaAdditionalToolsItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of this additional tools item.",
                "example": "at_123"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "additional_tools"
            ],
            "description": "The item type. Always `additional_tools`.",
            "default": "additional_tools",
            "x-stainless-const": true
          },
          "role": {
            "type": "string",
            "enum": [
              "developer"
            ],
            "description": "The role that provided the additional tools. Only `developer` is supported.",
            "default": "developer",
            "x-stainless-const": true
          },
          "tools": {
            "items": {
              "$ref": "#/$defs/BetaTool"
            },
            "type": "array",
            "description": "A list of additional tools made available at this item."
          }
        },
        "type": "object",
        "required": [
          "type",
          "role",
          "tools"
        ]
      },
      "BetaAgentMessage": {
        "properties": {
          "agent": {
            "$ref": "#/$defs/BetaAgentTag",
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "agent_message"
            ],
            "description": "The type of the item. Always `agent_message`.",
            "default": "agent_message",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the agent message."
          },
          "author": {
            "type": "string",
            "description": "The sending agent identity."
          },
          "recipient": {
            "type": "string",
            "description": "The destination agent identity."
          },
          "content": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/$defs/BetaInputTextContent"
                },
                {
                  "$ref": "#/$defs/BetaOutputTextContent"
                },
                {
                  "$ref": "#/$defs/BetaTextContent"
                },
                {
                  "$ref": "#/$defs/BetaSummaryTextContent"
                },
                {
                  "$ref": "#/$defs/BetaReasoningTextContent"
                },
                {
                  "$ref": "#/$defs/BetaRefusalContent"
                },
                {
                  "$ref": "#/$defs/BetaInputImageContent"
                },
                {
                  "$ref": "#/$defs/BetaComputerScreenshotContent"
                },
                {
                  "$ref": "#/$defs/BetaInputFileContent"
                },
                {
                  "$ref": "#/$defs/BetaEncryptedContent"
                }
              ],
              "description": "A content part that makes up an input or output item.",
              "discriminator": {
                "propertyName": "type"
              }
            },
            "type": "array",
            "description": "Encrypted content sent between agents."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "author",
          "recipient",
          "content"
        ],
        "x-oai-beta": "responses_multi_agent=v1"
      },
      "BetaAgentMessageItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of this agent message item.",
                "example": "amsg_123"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "agent_message"
            ],
            "description": "The item type. Always `agent_message`.",
            "default": "agent_message",
            "x-stainless-const": true
          },
          "author": {
            "type": "string",
            "description": "The sending agent identity."
          },
          "recipient": {
            "type": "string",
            "description": "The destination agent identity."
          },
          "content": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/$defs/BetaInputTextContentParam"
                },
                {
                  "$ref": "#/$defs/BetaInputImageContentParamAutoParam"
                },
                {
                  "$ref": "#/$defs/BetaEncryptedContentParam"
                }
              ],
              "description": "A plaintext, image, or encrypted agent message content part.",
              "discriminator": {
                "propertyName": "type"
              }
            },
            "type": "array",
            "description": "Plaintext, image, or encrypted content sent between agents."
          }
        },
        "type": "object",
        "required": [
          "type",
          "author",
          "recipient",
          "content"
        ],
        "title": "Agent message",
        "description": "A message routed between agents.",
        "x-oai-beta": "responses_multi_agent=v1"
      },
      "BetaAgentTag": {
        "properties": {
          "agent_name": {
            "type": "string",
            "description": "The canonical name of the agent that produced this item."
          }
        },
        "type": "object",
        "required": [
          "agent_name"
        ],
        "x-oai-beta": "responses_multi_agent=v1"
      },
      "BetaAnnotation": {
        "oneOf": [
          {
            "$ref": "#/$defs/BetaFileCitationBody"
          },
          {
            "$ref": "#/$defs/BetaUrlCitationBody"
          },
          {
            "$ref": "#/$defs/BetaContainerFileCitationBody"
          },
          {
            "$ref": "#/$defs/BetaFilePath"
          }
        ],
        "description": "An annotation that applies to a span of output text.",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "BetaApplyPatchCallOutputStatus": {
        "type": "string",
        "enum": [
          "completed",
          "failed"
        ]
      },
      "BetaApplyPatchCallOutputStatusParam": {
        "type": "string",
        "enum": [
          "completed",
          "failed"
        ],
        "title": "Apply patch call output status",
        "description": "Outcome values reported for apply_patch tool call outputs."
      },
      "BetaApplyPatchCallStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed"
        ]
      },
      "BetaApplyPatchCallStatusParam": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed"
        ],
        "title": "Apply patch call status",
        "description": "Status values reported for apply_patch tool calls."
      },
      "BetaApplyPatchCreateFileOperation": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "create_file"
            ],
            "description": "Create a new file with the provided diff.",
            "default": "create_file",
            "x-stainless-const": true
          },
          "path": {
            "type": "string",
            "description": "Path of the file to create."
          },
          "diff": {
            "type": "string",
            "description": "Diff to apply."
          }
        },
        "type": "object",
        "required": [
          "type",
          "path",
          "diff"
        ],
        "title": "Apply patch create file operation",
        "description": "Instruction describing how to create a file via the apply_patch tool."
      },
      "BetaApplyPatchCreateFileOperationParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "create_file"
            ],
            "description": "The operation type. Always `create_file`.",
            "default": "create_file",
            "x-stainless-const": true
          },
          "path": {
            "type": "string",
            "minLength": 1,
            "description": "Path of the file to create relative to the workspace root."
          },
          "diff": {
            "type": "string",
            "maxLength": 10485760,
            "description": "Unified diff content to apply when creating the file."
          }
        },
        "type": "object",
        "required": [
          "type",
          "path",
          "diff"
        ],
        "title": "Apply patch create file operation",
        "description": "Instruction for creating a new file via the apply_patch tool."
      },
      "BetaApplyPatchDeleteFileOperation": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "delete_file"
            ],
            "description": "Delete the specified file.",
            "default": "delete_file",
            "x-stainless-const": true
          },
          "path": {
            "type": "string",
            "description": "Path of the file to delete."
          }
        },
        "type": "object",
        "required": [
          "type",
          "path"
        ],
        "title": "Apply patch delete file operation",
        "description": "Instruction describing how to delete a file via the apply_patch tool."
      },
      "BetaApplyPatchDeleteFileOperationParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "delete_file"
            ],
            "description": "The operation type. Always `delete_file`.",
            "default": "delete_file",
            "x-stainless-const": true
          },
          "path": {
            "type": "string",
            "minLength": 1,
            "description": "Path of the file to delete relative to the workspace root."
          }
        },
        "type": "object",
        "required": [
          "type",
          "path"
        ],
        "title": "Apply patch delete file operation",
        "description": "Instruction for deleting an existing file via the apply_patch tool."
      },
      "BetaApplyPatchOperationParam": {
        "oneOf": [
          {
            "$ref": "#/$defs/BetaApplyPatchCreateFileOperationParam"
          },
          {
            "$ref": "#/$defs/BetaApplyPatchDeleteFileOperationParam"
          },
          {
            "$ref": "#/$defs/BetaApplyPatchUpdateFileOperationParam"
          }
        ],
        "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"
        }
      },
      "BetaApplyPatchToolCall": {
        "properties": {
          "agent": {
            "$ref": "#/$defs/BetaAgentTag",
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "apply_patch_call"
            ],
            "description": "The type of the item. Always `apply_patch_call`.",
            "default": "apply_patch_call",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API."
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the apply patch tool call generated by the model."
          },
          "caller": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaToolCallCaller",
                "description": "The execution context that produced this tool call."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/$defs/BetaApplyPatchCallStatus",
            "description": "The status of the apply patch tool call. One of `in_progress` or `completed`."
          },
          "operation": {
            "oneOf": [
              {
                "$ref": "#/$defs/BetaApplyPatchCreateFileOperation"
              },
              {
                "$ref": "#/$defs/BetaApplyPatchDeleteFileOperation"
              },
              {
                "$ref": "#/$defs/BetaApplyPatchUpdateFileOperation"
              }
            ],
            "title": "Apply patch operation",
            "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.",
            "discriminator": {
              "propertyName": "type"
            }
          },
          "created_by": {
            "type": "string",
            "description": "The ID of the entity that created this tool call."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "status",
          "operation"
        ],
        "title": "Apply patch tool call",
        "description": "A tool call that applies file diffs by creating, deleting, or updating files."
      },
      "BetaApplyPatchToolCallItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "apply_patch_call"
            ],
            "description": "The type of the item. Always `apply_patch_call`.",
            "default": "apply_patch_call",
            "x-stainless-const": true
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API.",
                "example": "apc_123"
              },
              {
                "type": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The unique ID of the apply patch tool call generated by the model."
          },
          "caller": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaToolCallCallerParam",
                "description": "The execution context that produced this tool call."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/$defs/BetaApplyPatchCallStatusParam",
            "description": "The status of the apply patch tool call. One of `in_progress` or `completed`."
          },
          "operation": {
            "$ref": "#/$defs/BetaApplyPatchOperationParam",
            "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."
      },
      "BetaApplyPatchToolCallOutput": {
        "properties": {
          "agent": {
            "$ref": "#/$defs/BetaAgentTag",
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "apply_patch_call_output"
            ],
            "description": "The type of the item. Always `apply_patch_call_output`.",
            "default": "apply_patch_call_output",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API."
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the apply patch tool call generated by the model."
          },
          "caller": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaToolCallCaller",
                "description": "The execution context that produced this tool call."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/$defs/BetaApplyPatchCallOutputStatus",
            "description": "The status of the apply patch tool call output. One of `completed` or `failed`."
          },
          "output": {
            "anyOf": [
              {
                "type": "string",
                "description": "Optional textual output returned by the apply patch tool."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_by": {
            "type": "string",
            "description": "The ID of the entity that created this tool call output."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "status"
        ],
        "title": "Apply patch tool call output",
        "description": "The output emitted by an apply patch tool call."
      },
      "BetaApplyPatchToolCallOutputItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "apply_patch_call_output"
            ],
            "description": "The type of the item. Always `apply_patch_call_output`.",
            "default": "apply_patch_call_output",
            "x-stainless-const": true
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API.",
                "example": "apco_123"
              },
              {
                "type": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The unique ID of the apply patch tool call generated by the model."
          },
          "caller": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaToolCallCallerParam",
                "description": "The execution context that produced this tool call."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/$defs/BetaApplyPatchCallOutputStatusParam",
            "description": "The status of the apply patch tool call output. One of `completed` or `failed`."
          },
          "output": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10485760,
                "description": "Optional human-readable log text from the apply patch tool (e.g., patch results or errors)."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "call_id",
          "status"
        ],
        "title": "Apply patch tool call output",
        "description": "The streamed output emitted by an apply patch tool call."
      },
      "BetaApplyPatchToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "apply_patch"
            ],
            "description": "The type of the tool. Always `apply_patch`.",
            "default": "apply_patch",
            "x-stainless-const": true
          },
          "allowed_callers": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/$defs/BetaCallableToolAllowedCaller"
                },
                "type": "array",
                "minItems": 1,
                "description": "The tool invocation context(s)."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Apply patch tool",
        "description": "Allows the assistant to create, delete, or update files using unified diffs."
      },
      "BetaApplyPatchUpdateFileOperation": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "update_file"
            ],
            "description": "Update an existing file with the provided diff.",
            "default": "update_file",
            "x-stainless-const": true
          },
          "path": {
            "type": "string",
            "description": "Path of the file to update."
          },
          "diff": {
            "type": "string",
            "description": "Diff to apply."
          }
        },
        "type": "object",
        "required": [
          "type",
          "path",
          "diff"
        ],
        "title": "Apply patch update file operation",
        "description": "Instruction describing how to update a file via the apply_patch tool."
      },
      "BetaApplyPatchUpdateFileOperationParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "update_file"
            ],
            "description": "The operation type. Always `update_file`.",
            "default": "update_file",
            "x-stainless-const": true
          },
          "path": {
            "type": "string",
            "minLength": 1,
            "description": "Path of the file to update relative to the workspace root."
          },
          "diff": {
            "type": "string",
            "maxLength": 10485760,
            "description": "Unified diff content to apply to the existing file."
          }
        },
        "type": "object",
        "required": [
          "type",
          "path",
          "diff"
        ],
        "title": "Apply patch update file operation",
        "description": "Instruction for updating an existing file via the apply_patch tool."
      },
      "BetaApproximateLocation": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "approximate"
            ],
            "description": "The type of location approximation. Always `approximate`.",
            "default": "approximate",
            "x-stainless-const": true
          },
          "country": {
            "anyOf": [
              {
                "type": "string",
                "description": "The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`."
              },
              {
                "type": "null"
              }
            ]
          },
          "region": {
            "anyOf": [
              {
                "type": "string",
                "description": "Free text input for the region of the user, e.g. `California`."
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string",
                "description": "Free text input for the city of the user, e.g. `San Francisco`."
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string",
                "description": "The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "BetaAutoCodeInterpreterToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "auto"
            ],
            "description": "Always `auto`.",
            "default": "auto",
            "x-stainless-const": true
          },
          "file_ids": {
            "items": {
              "type": "string",
              "example": "file-123"
            },
            "type": "array",
            "maxItems": 50,
            "description": "An optional list of uploaded files to make available to your code."
          },
          "memory_limit": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaContainerMemoryLimit",
                "description": "The memory limit for the code interpreter container."
              },
              {
                "type": "null"
              }
            ]
          },
          "network_policy": {
            "oneOf": [
              {
                "$ref": "#/$defs/BetaContainerNetworkPolicyDisabledParam"
              },
              {
                "$ref": "#/$defs/BetaContainerNetworkPolicyAllowlistParam"
              }
            ],
            "description": "Network access policy for the container.",
            "discriminator": {
              "propertyName": "type"
            }
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "CodeInterpreterToolAuto",
        "description": "Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on."
      },
      "BetaCallableToolAllowedCaller": {
        "type": "string",
        "enum": [
          "direct",
          "programmatic"
        ]
      },
      "BetaClickButtonType": {
        "type": "string",
        "enum": [
          "left",
          "right",
          "wheel",
          "back",
          "forward"
        ]
      },
      "BetaClickParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "click"
            ],
            "description": "Specifies the event type. For a click action, this property is always `click`.",
            "default": "click",
            "x-stainless-const": true
          },
          "button": {
            "$ref": "#/$defs/BetaClickButtonType",
            "description": "Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."
          },
          "x": {
            "type": "integer",
            "description": "The x-coordinate where the click occurred."
          },
          "y": {
            "type": "integer",
            "description": "The y-coordinate where the click occurred."
          },
          "keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "description": "The keys being held while clicking."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "button",
          "x",
          "y"
        ],
        "title": "Click",
        "description": "A click action."
      },
      "BetaCodeInterpreterOutputImage": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "image"
            ],
            "description": "The type of the output. Always `image`.",
            "default": "image",
            "x-stainless-const": true
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the image output from the code interpreter."
          }
        },
        "type": "object",
        "required": [
          "type",
          "url"
        ],
        "title": "Code interpreter output image",
        "description": "The image output from the code interpreter."
      },
      "BetaCodeInterpreterOutputLogs": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "logs"
            ],
            "description": "The type of the output. Always `logs`.",
            "default": "logs",
            "x-stainless-const": true
          },
          "logs": {
            "type": "string",
            "description": "The logs output from the code interpreter."
          }
        },
        "type": "object",
        "required": [
          "type",
          "logs"
        ],
        "title": "Code interpreter output logs",
        "description": "The logs output from the code interpreter."
      },
      "BetaCodeInterpreterTool": {
        "type": "object",
        "title": "Code interpreter",
        "description": "A tool that runs Python code to help generate a response to a prompt.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "code_interpreter"
            ],
            "description": "The type of the code interpreter tool. Always `code_interpreter`.\n",
            "x-stainless-const": true
          },
          "container": {
            "description": "The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code, along with an\noptional `memory_limit` setting.\n",
            "oneOf": [
              {
                "type": "string",
                "description": "The container ID."
              },
              {
                "$ref": "#/$defs/BetaAutoCodeInterpreterToolParam"
              }
            ]
          },
          "allowed_callers": {
            "anyOf": [
              {
                "type": "array",
                "minItems": 1,
                "items": {
                  "$ref": "#/$defs/BetaCallableToolAllowedCaller"
                },
                "description": "The tool invocation context(s)."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "container"
        ]
      },
      "BetaCodeInterpreterToolCall": {
        "type": "object",
        "title": "Code interpreter tool call",
        "description": "A tool call to run code.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "code_interpreter_call"
            ],
            "default": "code_interpreter_call",
            "x-stainless-const": true,
            "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.\n"
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the code interpreter tool call.\n"
          },
          "status": {
            "type": "string",
            "enum": [
              "in_progress",
              "completed",
              "incomplete",
              "interpreting",
              "failed"
            ],
            "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"
          },
          "container_id": {
            "type": "string",
            "description": "The ID of the container used to run the code.\n"
          },
          "code": {
            "anyOf": [
              {
                "type": "string",
                "description": "The code to run, or null if not available.\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "outputs": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/$defs/BetaCodeInterpreterOutputLogs"
                    },
                    {
                      "$ref": "#/$defs/BetaCodeInterpreterOutputImage"
                    }
                  ],
                  "discriminator": {
                    "propertyName": "type"
                  }
                },
                "discriminator": {
                  "propertyName": "type"
                },
                "description": "The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "id",
          "status",
          "container_id",
          "code",
          "outputs"
        ]
      },
      "BetaCompactionBody": {
        "properties": {
          "agent": {
            "$ref": "#/$defs/BetaAgentTag",
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "compaction"
            ],
            "description": "The type of the item. Always `compaction`.",
            "default": "compaction",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the compaction item."
          },
          "encrypted_content": {
            "type": "string",
            "description": "The encrypted content that was produced by compaction."
          },
          "created_by": {
            "type": "string",
            "description": "The identifier of the actor that created the item."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "encrypted_content"
        ],
        "title": "Compaction item",
        "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact)."
      },
      "BetaCompactionSummaryItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The ID of the compaction item.",
                "example": "cmp_123"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "compaction"
            ],
            "description": "The type of the item. Always `compaction`.",
            "default": "compaction",
            "x-stainless-const": true
          },
          "encrypted_content": {
            "type": "string",
            "maxLength": 10485760,
            "description": "The encrypted content of the compaction summary."
          }
        },
        "type": "object",
        "required": [
          "type",
          "encrypted_content"
        ],
        "title": "Compaction item",
        "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact)."
      },
      "BetaCompactionTriggerItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "compaction_trigger"
            ],
            "description": "The type of the item. Always `compaction_trigger`.",
            "default": "compaction_trigger",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Compaction trigger",
        "description": "Compacts the current context. Must be the final input item."
      },
      "BetaComparisonFilter": {
        "type": "object",
        "additionalProperties": false,
        "title": "Comparison Filter",
        "description": "A filter used to compare a specified attribute key to a given value using a defined comparison operation.\n",
        "properties": {
          "type": {
            "type": "string",
            "default": "eq",
            "enum": [
              "eq",
              "ne",
              "gt",
              "gte",
              "lt",
              "lte",
              "in",
              "nin"
            ],
            "description": "Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.\n- `eq`: equals\n- `ne`: not equal\n- `gt`: greater than\n- `gte`: greater than or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `in`: in\n- `nin`: not in\n"
          },
          "key": {
            "type": "string",
            "description": "The key to compare against the value."
          },
          "value": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    }
                  ]
                }
              }
            ],
            "description": "The value to compare against the attribute key; supports string, number, or boolean types."
          }
        },
        "required": [
          "type",
          "key",
          "value"
        ],
        "x-oaiMeta": {
          "name": "ComparisonFilter"
        }
      },
      "BetaCompoundFilter": {
        "$recursiveAnchor": true,
        "type": "object",
        "additionalProperties": false,
        "title": "Compound Filter",
        "description": "Combine multiple filters using `and` or `or`.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of operation: `and` or `or`.",
            "enum": [
              "and",
              "or"
            ]
          },
          "filters": {
            "type": "array",
            "description": "Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/$defs/BetaComparisonFilter"
                },
                {
                  "$recursiveRef": "#"
                }
              ],
              "discriminator": {
                "propertyName": "type"
              }
            }
          }
        },
        "required": [
          "type",
          "filters"
        ],
        "x-oaiMeta": {
          "name": "CompoundFilter"
        }
      },
      "BetaComputerAction": {
        "oneOf": [
          {
            "$ref": "#/$defs/BetaClickParam"
          },
          {
            "$ref": "#/$defs/BetaDoubleClickAction"
          },
          {
            "$ref": "#/$defs/BetaDragParam"
          },
          {
            "$ref": "#/$defs/BetaKeyPressAction"
          },
          {
            "$ref": "#/$defs/BetaMoveParam"
          },
          {
            "$ref": "#/$defs/BetaScreenshotParam"
          },
          {
            "$ref": "#/$defs/BetaScrollParam"
          },
          {
            "$ref": "#/$defs/BetaTypeParam"
          },
          {
            "$ref": "#/$defs/BetaWaitParam"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "BetaComputerActionList": {
        "title": "Computer Action List",
        "type": "array",
        "description": "Flattened batched actions for `computer_use`. Each action includes an\n`type` discriminator and action-specific fields.\n",
        "items": {
          "$ref": "#/$defs/BetaComputerAction"
        }
      },
      "BetaComputerCallOutputItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The ID of the computer tool call output.",
                "example": "cuo_123"
              },
              {
                "type": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The ID of the computer tool call that produced the output."
          },
          "type": {
            "type": "string",
            "enum": [
              "computer_call_output"
            ],
            "description": "The type of the computer tool call output. Always `computer_call_output`.",
            "default": "computer_call_output",
            "x-stainless-const": true
          },
          "output": {
            "$ref": "#/$defs/BetaComputerScreenshotImage"
          },
          "acknowledged_safety_checks": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/$defs/BetaComputerCallSafetyCheckParam"
                },
                "type": "array",
                "description": "The safety checks reported by the API that have been acknowledged by the developer."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaFunctionCallItemStatus",
                "description": "The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "call_id",
          "type",
          "output"
        ],
        "title": "Computer tool call output",
        "description": "The output of a computer tool call."
      },
      "BetaComputerCallOutputStatus": {
        "type": "string",
        "enum": [
          "completed",
          "incomplete",
          "failed"
        ]
      },
      "BetaComputerCallSafetyCheckParam": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the pending safety check."
          },
          "code": {
            "anyOf": [
              {
                "type": "string",
                "description": "The type of the pending safety check."
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "anyOf": [
              {
                "type": "string",
                "description": "Details about the pending safety check."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "description": "A pending safety check for the computer call."
      },
      "BetaComputerEnvironment": {
        "type": "string",
        "enum": [
          "windows",
          "mac",
          "linux",
          "ubuntu",
          "browser"
        ]
      },
      "BetaComputerScreenshotContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "computer_screenshot"
            ],
            "description": "Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.",
            "default": "computer_screenshot",
            "x-stainless-const": true
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri",
                "description": "The URL of the screenshot image."
              },
              {
                "type": "null"
              }
            ]
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The identifier of an uploaded file that contains the screenshot."
              },
              {
                "type": "null"
              }
            ]
          },
          "detail": {
            "$ref": "#/$defs/BetaImageDetail",
            "description": "The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`."
          },
          "prompt_cache_breakpoint": {
            "$ref": "#/$defs/BetaPromptCacheBreakpointConfig"
          }
        },
        "type": "object",
        "required": [
          "type",
          "image_url",
          "file_id",
          "detail"
        ],
        "title": "Computer screenshot",
        "description": "A screenshot of a computer."
      },
      "BetaComputerScreenshotImage": {
        "type": "object",
        "description": "A computer screenshot image used with the computer use tool.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "computer_screenshot"
            ],
            "default": "computer_screenshot",
            "description": "Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n",
            "x-stainless-const": true
          },
          "image_url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the screenshot image."
          },
          "file_id": {
            "type": "string",
            "description": "The identifier of an uploaded file that contains the screenshot."
          }
        },
        "required": [
          "type"
        ]
      },
      "BetaComputerTool": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "computer"
            ],
            "description": "The type of the computer tool. Always `computer`.",
            "default": "computer",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Computer",
        "description": "A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use)."
      },
      "BetaComputerToolCall": {
        "type": "object",
        "title": "Computer tool call",
        "description": "A tool call to a computer use tool. See the\n[computer use guide](/docs/guides/tools-computer-use) for more information.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "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": "#/$defs/BetaComputerAction"
          },
          "actions": {
            "$ref": "#/$defs/BetaComputerActionList"
          },
          "pending_safety_checks": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/BetaComputerCallSafetyCheckParam"
            },
            "description": "The pending safety checks for the computer call.\n"
          },
          "status": {
            "type": "string",
            "description": "The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ]
          }
        },
        "required": [
          "type",
          "id",
          "call_id",
          "pending_safety_checks",
          "status"
        ]
      },
      "BetaComputerToolCallOutput": {
        "type": "object",
        "title": "Computer tool call output",
        "description": "The output of a computer tool call.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "description": "The type of the computer tool call output. Always `computer_call_output`.\n",
            "enum": [
              "computer_call_output"
            ],
            "default": "computer_call_output",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The ID of the computer tool call output.\n"
          },
          "call_id": {
            "type": "string",
            "description": "The ID of the computer tool call that produced the output.\n"
          },
          "acknowledged_safety_checks": {
            "type": "array",
            "description": "The safety checks reported by the API that have been acknowledged by the\ndeveloper.\n",
            "items": {
              "$ref": "#/$defs/BetaComputerCallSafetyCheckParam"
            }
          },
          "output": {
            "$ref": "#/$defs/BetaComputerScreenshotImage"
          },
          "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"
        ]
      },
      "BetaComputerToolCallOutputResource": {
        "allOf": [
          {
            "$ref": "#/$defs/BetaComputerToolCallOutput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of the computer call tool output.\n"
              },
              "status": {
                "description": "The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n",
                "$ref": "#/$defs/BetaComputerCallOutputStatus"
              },
              "created_by": {
                "type": "string",
                "description": "The identifier of the actor that created the item.\n"
              }
            },
            "required": [
              "id",
              "status"
            ]
          }
        ]
      },
      "BetaComputerUsePreviewTool": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "computer_use_preview"
            ],
            "description": "The type of the computer use tool. Always `computer_use_preview`.",
            "default": "computer_use_preview",
            "x-stainless-const": true
          },
          "environment": {
            "$ref": "#/$defs/BetaComputerEnvironment",
            "description": "The type of computer environment to control."
          },
          "display_width": {
            "type": "integer",
            "description": "The width of the computer display."
          },
          "display_height": {
            "type": "integer",
            "description": "The height of the computer display."
          }
        },
        "type": "object",
        "required": [
          "type",
          "environment",
          "display_width",
          "display_height"
        ],
        "title": "Computer use preview",
        "description": "A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use)."
      },
      "BetaContainerAutoParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "container_auto"
            ],
            "description": "Automatically creates a container for this request",
            "default": "container_auto",
            "x-stainless-const": true
          },
          "file_ids": {
            "items": {
              "type": "string",
              "example": "file-123"
            },
            "type": "array",
            "maxItems": 50,
            "description": "An optional list of uploaded files to make available to your code."
          },
          "memory_limit": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaContainerMemoryLimit",
                "description": "The memory limit for the container."
              },
              {
                "type": "null"
              }
            ]
          },
          "network_policy": {
            "oneOf": [
              {
                "$ref": "#/$defs/BetaContainerNetworkPolicyDisabledParam"
              },
              {
                "$ref": "#/$defs/BetaContainerNetworkPolicyAllowlistParam"
              }
            ],
            "description": "Network access policy for the container.",
            "discriminator": {
              "propertyName": "type"
            }
          },
          "skills": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/$defs/BetaSkillReferenceParam"
                },
                {
                  "$ref": "#/$defs/BetaInlineSkillParam"
                }
              ],
              "discriminator": {
                "propertyName": "type"
              }
            },
            "type": "array",
            "maxItems": 200,
            "description": "An optional list of skills referenced by id or inline data."
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "BetaContainerFileCitationBody": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "container_file_citation"
            ],
            "description": "The type of the container file citation. Always `container_file_citation`.",
            "default": "container_file_citation",
            "x-stainless-const": true
          },
          "container_id": {
            "type": "string",
            "description": "The ID of the container file."
          },
          "file_id": {
            "type": "string",
            "description": "The ID of the file."
          },
          "start_index": {
            "type": "integer",
            "description": "The index of the first character of the container file citation in the message."
          },
          "end_index": {
            "type": "integer",
            "description": "The index of the last character of the container file citation in the message."
          },
          "filename": {
            "type": "string",
            "description": "The filename of the container file cited."
          }
        },
        "type": "object",
        "required": [
          "type",
          "container_id",
          "file_id",
          "start_index",
          "end_index",
          "filename"
        ],
        "title": "Container file citation",
        "description": "A citation for a container file used to generate a model response."
      },
      "BetaContainerFileCitationParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "container_file_citation"
            ],
            "description": "The citation type. Always `container_file_citation`.",
            "default": "container_file_citation",
            "x-stainless-const": true
          },
          "start_index": {
            "type": "integer",
            "minimum": 0,
            "description": "The index of the first character of the citation in the message."
          },
          "end_index": {
            "type": "integer",
            "minimum": 0,
            "description": "The index of the last character of the citation in the message."
          },
          "container_id": {
            "type": "string",
            "description": "The ID of the container.",
            "example": "cntr_123"
          },
          "file_id": {
            "type": "string",
            "description": "The ID of the container file.",
            "example": "cfile_123"
          },
          "filename": {
            "type": "string",
            "description": "The filename of the container file cited."
          }
        },
        "type": "object",
        "required": [
          "type",
          "start_index",
          "end_index",
          "container_id",
          "file_id",
          "filename"
        ]
      },
      "BetaContainerMemoryLimit": {
        "type": "string",
        "enum": [
          "1g",
          "4g",
          "16g",
          "64g"
        ]
      },
      "BetaContainerNetworkPolicyAllowlistParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "allowlist"
            ],
            "description": "Allow outbound network access only to specified domains. Always `allowlist`.",
            "default": "allowlist",
            "x-stainless-const": true
          },
          "allowed_domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "description": "A list of allowed domains when type is `allowlist`."
          },
          "domain_secrets": {
            "items": {
              "$ref": "#/$defs/BetaContainerNetworkPolicyDomainSecretParam"
            },
            "type": "array",
            "minItems": 1,
            "description": "Optional domain-scoped secrets for allowlisted domains."
          }
        },
        "type": "object",
        "required": [
          "type",
          "allowed_domains"
        ]
      },
      "BetaContainerNetworkPolicyDisabledParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "disabled"
            ],
            "description": "Disable outbound network access. Always `disabled`.",
            "default": "disabled",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "BetaContainerNetworkPolicyDomainSecretParam": {
        "properties": {
          "domain": {
            "type": "string",
            "minLength": 1,
            "description": "The domain associated with the secret."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The name of the secret to inject for the domain."
          },
          "value": {
            "type": "string",
            "maxLength": 10485760,
            "minLength": 1,
            "description": "The secret value to inject for the domain."
          }
        },
        "type": "object",
        "required": [
          "domain",
          "name",
          "value"
        ]
      },
      "BetaContainerReferenceParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "container_reference"
            ],
            "description": "References a container created with the /v1/containers endpoint",
            "default": "container_reference",
            "x-stainless-const": true
          },
          "container_id": {
            "type": "string",
            "description": "The ID of the referenced container.",
            "example": "cntr_123"
          }
        },
        "type": "object",
        "required": [
          "type",
          "container_id"
        ]
      },
      "BetaContainerReferenceResource": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "container_reference"
            ],
            "description": "The environment type. Always `container_reference`.",
            "default": "container_reference",
            "x-stainless-const": true
          },
          "container_id": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "type",
          "container_id"
        ],
        "title": "Container Reference",
        "description": "Represents a container created with /v1/containers."
      },
      "BetaConversation-2": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID of the conversation that this response was associated with."
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "Conversation",
        "description": "The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation."
      },
      "BetaCoordParam": {
        "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 }`."
      },
      "BetaCustomGrammarFormatParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "grammar"
            ],
            "description": "Grammar format. Always `grammar`.",
            "default": "grammar",
            "x-stainless-const": true
          },
          "syntax": {
            "$ref": "#/$defs/BetaGrammarSyntax1",
            "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."
      },
      "BetaCustomTextFormatParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "text"
            ],
            "description": "Unconstrained text format. Always `text`.",
            "default": "text",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Text format",
        "description": "Unconstrained free-form text."
      },
      "BetaCustomToolCall": {
        "type": "object",
        "title": "Custom tool call",
        "description": "A call to a custom tool created by the model.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "custom_tool_call"
            ],
            "x-stainless-const": true,
            "description": "The type of the custom tool call. Always `custom_tool_call`.\n"
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the custom tool call in the OpenAI platform.\n"
          },
          "call_id": {
            "type": "string",
            "description": "An identifier used to map this custom tool call to a tool call output.\n"
          },
          "caller": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaToolCallCaller"
              },
              {
                "type": "null"
              }
            ]
          },
          "namespace": {
            "type": "string",
            "description": "The namespace of the custom tool being called.\n"
          },
          "name": {
            "type": "string",
            "description": "The name of the custom tool being called.\n"
          },
          "input": {
            "type": "string",
            "description": "The input for the custom tool call generated by the model.\n"
          }
        },
        "required": [
          "type",
          "call_id",
          "name",
          "input"
        ]
      },
      "BetaCustomToolCallOutput": {
        "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": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "custom_tool_call_output"
            ],
            "x-stainless-const": true,
            "description": "The type of the custom tool call output. Always `custom_tool_call_output`.\n"
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the custom tool call output in the OpenAI platform.\n"
          },
          "call_id": {
            "type": "string",
            "description": "The call ID, used to map this custom tool call output to a custom tool call.\n"
          },
          "caller": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaToolCallCallerParam"
              },
              {
                "type": "null"
              }
            ]
          },
          "output": {
            "description": "The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n",
            "oneOf": [
              {
                "type": "string",
                "description": "A string of the output of the custom tool call.\n",
                "title": "string output"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/BetaFunctionAndCustomToolCallOutput"
                },
                "title": "output content list",
                "description": "Text, image, or file output of the custom tool call.\n"
              }
            ]
          }
        },
        "required": [
          "type",
          "call_id",
          "output"
        ]
      },
      "BetaCustomToolCallOutputResource": {
        "title": "ResponseCustomToolCallOutputItem",
        "allOf": [
          {
            "$ref": "#/$defs/BetaCustomToolCallOutput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of the custom tool call output item.\n"
              },
              "status": {
                "description": "The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n",
                "$ref": "#/$defs/BetaFunctionCallOutputStatusEnum"
              },
              "created_by": {
                "type": "string",
                "description": "The identifier of the actor that created the item.\n"
              }
            },
            "required": [
              "id",
              "status"
            ]
          }
        ]
      },
      "BetaCustomToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "custom"
            ],
            "description": "The type of the custom tool. Always `custom`.",
            "default": "custom",
            "x-stainless-const": true
          },
          "name": {
            "type": "string",
            "description": "The name of the custom tool, used to identify it in tool calls."
          },
          "description": {
            "type": "string",
            "description": "Optional description of the custom tool, used to provide more context."
          },
          "format": {
            "oneOf": [
              {
                "$ref": "#/$defs/BetaCustomTextFormatParam"
              },
              {
                "$ref": "#/$defs/BetaCustomGrammarFormatParam"
              }
            ],
            "description": "The input format for the custom tool. Default is unconstrained text.",
            "discriminator": {
              "propertyName": "type"
            }
          },
          "defer_loading": {
            "type": "boolean",
            "description": "Whether this tool should be deferred and discovered via tool search."
          },
          "allowed_callers": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/$defs/BetaCallableToolAllowedCaller"
                },
                "type": "array",
                "minItems": 1,
                "description": "The tool invocation context(s)."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "name"
        ],
        "title": "Custom tool",
        "description": "A custom tool that processes input using a specified format. Learn more about   [custom tools](/docs/guides/function-calling#custom-tools)"
      },
      "BetaDetailEnum": {
        "type": "string",
        "enum": [
          "low",
          "high",
          "auto",
          "original"
        ]
      },
      "BetaDirectToolCallCaller": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "direct"
            ],
            "default": "direct",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "BetaDirectToolCallCallerParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "direct"
            ],
            "description": "The caller type. Always `direct`.",
            "default": "direct",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "BetaDoubleClickAction": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "double_click"
            ],
            "description": "Specifies the event type. For a double click action, this property is always set to `double_click`.",
            "default": "double_click",
            "x-stainless-const": true
          },
          "x": {
            "type": "integer",
            "description": "The x-coordinate where the double click occurred."
          },
          "y": {
            "type": "integer",
            "description": "The y-coordinate where the double click occurred."
          },
          "keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "description": "The keys being held while double-clicking."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "x",
          "y",
          "keys"
        ],
        "title": "DoubleClick",
        "description": "A double click action."
      },
      "BetaDragParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "drag"
            ],
            "description": "Specifies the event type. For a drag action, this property is always set to `drag`.",
            "default": "drag",
            "x-stainless-const": true
          },
          "path": {
            "items": {
              "$ref": "#/$defs/BetaCoordParam"
            },
            "type": "array",
            "description": "An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg\n```\n[\n  { x: 100, y: 200 },\n  { x: 200, y: 300 }\n]\n```"
          },
          "keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "description": "The keys being held while dragging the mouse."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "path"
        ],
        "title": "Drag",
        "description": "A drag action."
      },
      "BetaEasyInputMessage": {
        "type": "object",
        "title": "Input message",
        "description": "A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n",
        "properties": {
          "role": {
            "type": "string",
            "description": "The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n",
            "enum": [
              "user",
              "assistant",
              "system",
              "developer"
            ]
          },
          "content": {
            "description": "Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n",
            "oneOf": [
              {
                "type": "string",
                "title": "Text input",
                "description": "A text input to the model.\n"
              },
              {
                "$ref": "#/$defs/BetaInputMessageContentList"
              }
            ]
          },
          "phase": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaMessagePhase"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "description": "The type of the message input. Always `message`.\n",
            "enum": [
              "message"
            ],
            "x-stainless-const": true
          }
        },
        "required": [
          "role",
          "content"
        ]
      },
      "BetaEmptyModelParam": {
        "properties": {},
        "type": "object",
        "required": []
      },
      "BetaEncryptedContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "encrypted_content"
            ],
            "description": "The type of the input item. Always `encrypted_content`.",
            "default": "encrypted_content",
            "x-stainless-const": true
          },
          "encrypted_content": {
            "type": "string",
            "description": "Opaque encrypted content."
          }
        },
        "type": "object",
        "required": [
          "type",
          "encrypted_content"
        ],
        "title": "Encrypted content",
        "description": "Opaque encrypted content that Responses API decrypts inside trusted model execution.",
        "x-oai-beta": "responses_multi_agent=v1"
      },
      "BetaEncryptedContentParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "encrypted_content"
            ],
            "description": "The type of the input item. Always `encrypted_content`.",
            "default": "encrypted_content",
            "x-stainless-const": true
          },
          "encrypted_content": {
            "type": "string",
            "maxLength": 10485760,
            "description": "Opaque encrypted content."
          }
        },
        "type": "object",
        "required": [
          "type",
          "encrypted_content"
        ],
        "title": "Encrypted content",
        "description": "Opaque encrypted content that Responses API decrypts inside trusted model execution.",
        "x-oai-beta": "responses_multi_agent=v1"
      },
      "BetaFileCitationBody": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "file_citation"
            ],
            "description": "The type of the file citation. Always `file_citation`.",
            "default": "file_citation",
            "x-stainless-const": true
          },
          "file_id": {
            "type": "string",
            "description": "The ID of the file."
          },
          "index": {
            "type": "integer",
            "description": "The index of the file in the list of files."
          },
          "filename": {
            "type": "string",
            "description": "The filename of the file cited."
          }
        },
        "type": "object",
        "required": [
          "type",
          "file_id",
          "index",
          "filename"
        ],
        "title": "File citation",
        "description": "A citation to a file."
      },
      "BetaFileCitationParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "file_citation"
            ],
            "description": "The citation type. Always `file_citation`.",
            "default": "file_citation",
            "x-stainless-const": true
          },
          "index": {
            "type": "integer",
            "minimum": 0,
            "description": "The index of the file in the list of files."
          },
          "file_id": {
            "type": "string",
            "description": "The ID of the file.",
            "example": "file-123"
          },
          "filename": {
            "type": "string",
            "description": "The filename of the file cited."
          }
        },
        "type": "object",
        "required": [
          "type",
          "index",
          "file_id",
          "filename"
        ]
      },
      "BetaFileDetailEnum": {
        "type": "string",
        "enum": [
          "auto",
          "low",
          "high"
        ]
      },
      "BetaFileInputDetail": {
        "type": "string",
        "enum": [
          "auto",
          "low",
          "high"
        ]
      },
      "BetaFilePath": {
        "type": "object",
        "title": "File path",
        "description": "A path to a file.\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the file path. Always `file_path`.\n",
            "enum": [
              "file_path"
            ],
            "x-stainless-const": true
          },
          "file_id": {
            "type": "string",
            "description": "The ID of the file.\n"
          },
          "index": {
            "type": "integer",
            "description": "The index of the file in the list of files.\n"
          }
        },
        "required": [
          "type",
          "file_id",
          "index"
        ]
      },
      "BetaFileSearchTool": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "file_search"
            ],
            "description": "The type of the file search tool. Always `file_search`.",
            "default": "file_search",
            "x-stainless-const": true
          },
          "vector_store_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "The IDs of the vector stores to search."
          },
          "max_num_results": {
            "type": "integer",
            "description": "The maximum number of results to return. This number should be between 1 and 50 inclusive."
          },
          "ranking_options": {
            "$ref": "#/$defs/BetaRankingOptions",
            "description": "Ranking options for search."
          },
          "filters": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaFilters",
                "description": "A filter to apply."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "vector_store_ids"
        ],
        "title": "File search",
        "description": "A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search)."
      },
      "BetaFileSearchToolCall": {
        "type": "object",
        "title": "File search tool call",
        "description": "The results of a file search tool call. See the\n[file search guide](/docs/guides/tools-file-search) for more information.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the file search tool call.\n"
          },
          "type": {
            "type": "string",
            "enum": [
              "file_search_call"
            ],
            "description": "The type of the file search tool call. Always `file_search_call`.\n",
            "x-stainless-const": true
          },
          "status": {
            "type": "string",
            "description": "The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n",
            "enum": [
              "in_progress",
              "searching",
              "completed",
              "incomplete",
              "failed"
            ]
          },
          "queries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The queries used to search for files.\n"
          },
          "results": {
            "anyOf": [
              {
                "type": "array",
                "description": "The results of the file search tool call.\n",
                "items": {
                  "type": "object",
                  "properties": {
                    "file_id": {
                      "type": "string",
                      "description": "The unique ID of the file.\n"
                    },
                    "text": {
                      "type": "string",
                      "description": "The text that was retrieved from the file.\n"
                    },
                    "filename": {
                      "type": "string",
                      "description": "The name of the file.\n"
                    },
                    "attributes": {
                      "$ref": "#/$defs/BetaVectorStoreFileAttributes"
                    },
                    "score": {
                      "type": "number",
                      "format": "float",
                      "description": "The relevance score of the file - a value between 0 and 1.\n"
                    }
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "queries"
        ]
      },
      "BetaFilters": {
        "anyOf": [
          {
            "$ref": "#/$defs/BetaComparisonFilter"
          },
          {
            "$ref": "#/$defs/BetaCompoundFilter"
          }
        ]
      },
      "BetaFunctionAndCustomToolCallOutput": {
        "oneOf": [
          {
            "$ref": "#/$defs/BetaInputTextContent"
          },
          {
            "$ref": "#/$defs/BetaInputImageContent"
          },
          {
            "$ref": "#/$defs/BetaInputFileContent"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "BetaFunctionCallItemStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ]
      },
      "BetaFunctionCallOutputItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the function tool call output. Populated when this item is returned via API.",
                "example": "fc_123"
              },
              {
                "type": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The unique ID of the function tool call generated by the model."
          },
          "type": {
            "type": "string",
            "enum": [
              "function_call_output"
            ],
            "description": "The type of the function tool call output. Always `function_call_output`.",
            "default": "function_call_output",
            "x-stainless-const": true
          },
          "output": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 10485760,
                "description": "A JSON string of the output of the function tool call."
              },
              {
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/$defs/BetaInputTextContentParam"
                    },
                    {
                      "$ref": "#/$defs/BetaInputImageContentParamAutoParam"
                    },
                    {
                      "$ref": "#/$defs/BetaInputFileContentParam"
                    }
                  ],
                  "description": "A piece of message content, such as text, an image, or a file.",
                  "discriminator": {
                    "propertyName": "type"
                  }
                },
                "type": "array",
                "description": "An array of content outputs (text, image, file) for the function tool call."
              }
            ],
            "description": "Text, image, or file output of the function tool call."
          },
          "caller": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaToolCallCallerParam",
                "description": "The execution context that produced this tool call."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaFunctionCallItemStatus",
                "description": "The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "call_id",
          "type",
          "output"
        ],
        "title": "Function tool call output",
        "description": "The output of a function tool call."
      },
      "BetaFunctionCallOutputStatusEnum": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ]
      },
      "BetaFunctionCallStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ]
      },
      "BetaFunctionShellAction": {
        "properties": {
          "commands": {
            "items": {
              "type": "string",
              "description": "A list of commands to run."
            },
            "type": "array"
          },
          "timeout_ms": {
            "anyOf": [
              {
                "type": "integer",
                "description": "Optional timeout in milliseconds for the commands."
              },
              {
                "type": "null"
              }
            ]
          },
          "max_output_length": {
            "anyOf": [
              {
                "type": "integer",
                "description": "Optional maximum number of characters to return from each command."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "commands",
          "timeout_ms",
          "max_output_length"
        ],
        "title": "Shell exec action",
        "description": "Execute a shell command."
      },
      "BetaFunctionShellActionParam": {
        "properties": {
          "commands": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "Ordered shell commands for the execution environment to run."
          },
          "timeout_ms": {
            "anyOf": [
              {
                "type": "integer",
                "description": "Maximum wall-clock time in milliseconds to allow the shell commands to run."
              },
              {
                "type": "null"
              }
            ]
          },
          "max_output_length": {
            "anyOf": [
              {
                "type": "integer",
                "description": "Maximum number of UTF-8 characters to capture from combined stdout and stderr output."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "commands"
        ],
        "title": "Shell action",
        "description": "Commands and limits describing how to run the shell tool call."
      },
      "BetaFunctionShellCall": {
        "properties": {
          "agent": {
            "$ref": "#/$defs/BetaAgentTag",
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "shell_call"
            ],
            "description": "The type of the item. Always `shell_call`.",
            "default": "shell_call",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the shell tool call. Populated when this item is returned via API."
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the shell tool call generated by the model."
          },
          "caller": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaToolCallCaller",
                "description": "The execution context that produced this tool call."
              },
              {
                "type": "null"
              }
            ]
          },
          "action": {
            "$ref": "#/$defs/BetaFunctionShellAction",
            "description": "The shell commands and limits that describe how to run the tool call."
          },
          "status": {
            "$ref": "#/$defs/BetaFunctionShellCallStatus",
            "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."
          },
          "environment": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/$defs/BetaLocalEnvironmentResource"
                  },
                  {
                    "$ref": "#/$defs/BetaContainerReferenceResource"
                  }
                ],
                "discriminator": {
                  "propertyName": "type"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "created_by": {
            "type": "string",
            "description": "The ID of the entity that created this tool call."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "action",
          "status",
          "environment"
        ],
        "title": "Shell tool call",
        "description": "A tool call that executes one or more shell commands in a managed environment."
      },
      "BetaFunctionShellCallItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the shell tool call. Populated when this item is returned via API.",
                "example": "sh_123"
              },
              {
                "type": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The unique ID of the shell tool call generated by the model."
          },
          "caller": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaToolCallCallerParam",
                "description": "The execution context that produced this tool call."
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "shell_call"
            ],
            "description": "The type of the item. Always `shell_call`.",
            "default": "shell_call",
            "x-stainless-const": true
          },
          "action": {
            "$ref": "#/$defs/BetaFunctionShellActionParam",
            "description": "The shell commands and limits that describe how to run the tool call."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaFunctionShellCallItemStatus",
                "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."
              },
              {
                "type": "null"
              }
            ]
          },
          "environment": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/$defs/BetaLocalEnvironmentParam"
                  },
                  {
                    "$ref": "#/$defs/BetaContainerReferenceParam"
                  }
                ],
                "description": "The environment to execute the shell commands in.",
                "discriminator": {
                  "propertyName": "type"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "call_id",
          "type",
          "action"
        ],
        "title": "Shell tool call",
        "description": "A tool representing a request to execute one or more shell commands."
      },
      "BetaFunctionShellCallItemStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ],
        "title": "Shell call status",
        "description": "Status values reported for shell tool calls."
      },
      "BetaFunctionShellCallOutput": {
        "properties": {
          "agent": {
            "$ref": "#/$defs/BetaAgentTag",
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "shell_call_output"
            ],
            "description": "The type of the shell call output. Always `shell_call_output`.",
            "default": "shell_call_output",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the shell call output. Populated when this item is returned via API."
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the shell tool call generated by the model."
          },
          "caller": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaToolCallCaller",
                "description": "The execution context that produced this tool call."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/$defs/BetaFunctionShellCallOutputStatusEnum",
            "description": "The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`."
          },
          "output": {
            "items": {
              "$ref": "#/$defs/BetaFunctionShellCallOutputContent"
            },
            "type": "array",
            "description": "An array of shell call output contents"
          },
          "max_output_length": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_by": {
            "type": "string",
            "description": "The identifier of the actor that created the item."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "status",
          "output",
          "max_output_length"
        ],
        "title": "Shell call output",
        "description": "The output of a shell tool call that was emitted."
      },
      "BetaFunctionShellCallOutputContent": {
        "properties": {
          "stdout": {
            "type": "string",
            "description": "The standard output that was captured."
          },
          "stderr": {
            "type": "string",
            "description": "The standard error output that was captured."
          },
          "outcome": {
            "oneOf": [
              {
                "$ref": "#/$defs/BetaFunctionShellCallOutputTimeoutOutcome"
              },
              {
                "$ref": "#/$defs/BetaFunctionShellCallOutputExitOutcome"
              }
            ],
            "title": "Shell call outcome",
            "description": "Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.",
            "discriminator": {
              "propertyName": "type"
            }
          },
          "created_by": {
            "type": "string",
            "description": "The identifier of the actor that created the item."
          }
        },
        "type": "object",
        "required": [
          "stdout",
          "stderr",
          "outcome"
        ],
        "title": "Shell call output content",
        "description": "The content of a shell tool call output that was emitted."
      },
      "BetaFunctionShellCallOutputContentParam": {
        "properties": {
          "stdout": {
            "type": "string",
            "maxLength": 10485760,
            "description": "Captured stdout output for the shell call."
          },
          "stderr": {
            "type": "string",
            "maxLength": 10485760,
            "description": "Captured stderr output for the shell call."
          },
          "outcome": {
            "$ref": "#/$defs/BetaFunctionShellCallOutputOutcomeParam",
            "description": "The exit or timeout outcome associated with this shell call."
          }
        },
        "type": "object",
        "required": [
          "stdout",
          "stderr",
          "outcome"
        ],
        "title": "Shell output content",
        "description": "Captured stdout and stderr for a portion of a shell tool call output."
      },
      "BetaFunctionShellCallOutputExitOutcome": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "exit"
            ],
            "description": "The outcome type. Always `exit`.",
            "default": "exit",
            "x-stainless-const": true
          },
          "exit_code": {
            "type": "integer",
            "description": "Exit code from the shell process."
          }
        },
        "type": "object",
        "required": [
          "type",
          "exit_code"
        ],
        "title": "Shell call exit outcome",
        "description": "Indicates that the shell commands finished and returned an exit code."
      },
      "BetaFunctionShellCallOutputExitOutcomeParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "exit"
            ],
            "description": "The outcome type. Always `exit`.",
            "default": "exit",
            "x-stainless-const": true
          },
          "exit_code": {
            "type": "integer",
            "description": "The exit code returned by the shell process."
          }
        },
        "type": "object",
        "required": [
          "type",
          "exit_code"
        ],
        "title": "Shell call exit outcome",
        "description": "Indicates that the shell commands finished and returned an exit code."
      },
      "BetaFunctionShellCallOutputItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the shell tool call output. Populated when this item is returned via API.",
                "example": "sho_123"
              },
              {
                "type": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The unique ID of the shell tool call generated by the model."
          },
          "caller": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaToolCallCallerParam",
                "description": "The execution context that produced this tool call."
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "shell_call_output"
            ],
            "description": "The type of the item. Always `shell_call_output`.",
            "default": "shell_call_output",
            "x-stainless-const": true
          },
          "output": {
            "items": {
              "$ref": "#/$defs/BetaFunctionShellCallOutputContentParam"
            },
            "type": "array",
            "description": "Captured chunks of stdout and stderr output, along with their associated outcomes."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaFunctionShellCallItemStatus",
                "description": "The status of the shell call output."
              },
              {
                "type": "null"
              }
            ]
          },
          "max_output_length": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The maximum number of UTF-8 characters captured for this shell call's combined output."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "call_id",
          "type",
          "output"
        ],
        "title": "Shell tool call output",
        "description": "The streamed output items emitted by a shell tool call."
      },
      "BetaFunctionShellCallOutputOutcomeParam": {
        "oneOf": [
          {
            "$ref": "#/$defs/BetaFunctionShellCallOutputTimeoutOutcomeParam"
          },
          {
            "$ref": "#/$defs/BetaFunctionShellCallOutputExitOutcomeParam"
          }
        ],
        "title": "Shell call outcome",
        "description": "The exit or timeout outcome associated with this shell call.",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "BetaFunctionShellCallOutputStatusEnum": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ]
      },
      "BetaFunctionShellCallOutputTimeoutOutcome": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "timeout"
            ],
            "description": "The outcome type. Always `timeout`.",
            "default": "timeout",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Shell call timeout outcome",
        "description": "Indicates that the shell call exceeded its configured time limit."
      },
      "BetaFunctionShellCallOutputTimeoutOutcomeParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "timeout"
            ],
            "description": "The outcome type. Always `timeout`.",
            "default": "timeout",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Shell call timeout outcome",
        "description": "Indicates that the shell call exceeded its configured time limit."
      },
      "BetaFunctionShellCallStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ]
      },
      "BetaFunctionShellToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "shell"
            ],
            "description": "The type of the shell tool. Always `shell`.",
            "default": "shell",
            "x-stainless-const": true
          },
          "environment": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/$defs/BetaContainerAutoParam"
                  },
                  {
                    "$ref": "#/$defs/BetaLocalEnvironmentParam"
                  },
                  {
                    "$ref": "#/$defs/BetaContainerReferenceParam"
                  }
                ],
                "discriminator": {
                  "propertyName": "type"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "allowed_callers": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/$defs/BetaCallableToolAllowedCaller"
                },
                "type": "array",
                "minItems": 1,
                "description": "The tool invocation context(s)."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Shell tool",
        "description": "A tool that allows the model to execute shell commands."
      },
      "BetaFunctionTool": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "function"
            ],
            "description": "The type of the function tool. Always `function`.",
            "default": "function",
            "x-stainless-const": true
          },
          "name": {
            "type": "string",
            "description": "The name of the function to call."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "description": "A description of the function. Used by the model to determine whether or not to call the function."
              },
              {
                "type": "null"
              }
            ]
          },
          "parameters": {
            "anyOf": [
              {
                "additionalProperties": {},
                "type": "object",
                "description": "A JSON schema object describing the parameters of the function.",
                "x-oaiTypeLabel": "map"
              },
              {
                "type": "null"
              }
            ]
          },
          "output_schema": {
            "anyOf": [
              {
                "additionalProperties": {},
                "type": "object",
                "description": "A JSON schema object describing the JSON value encoded in string outputs for this function.",
                "x-oaiTypeLabel": "map"
              },
              {
                "type": "null"
              }
            ]
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean",
                "description": "Whether strict parameter validation is enforced for this function tool."
              },
              {
                "type": "null"
              }
            ]
          },
          "defer_loading": {
            "type": "boolean",
            "description": "Whether this function is deferred and loaded via tool search."
          },
          "allowed_callers": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/$defs/BetaCallableToolAllowedCaller"
                },
                "type": "array",
                "description": "The tool invocation context(s)."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "strict",
          "parameters"
        ],
        "title": "Function",
        "description": "Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling)."
      },
      "BetaFunctionToolCall": {
        "type": "object",
        "title": "Function tool call",
        "description": "A tool call to run a function. See the \n[function calling guide](/docs/guides/function-calling) for more information.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the function tool call.\n"
          },
          "type": {
            "type": "string",
            "enum": [
              "function_call"
            ],
            "description": "The type of the function tool call. Always `function_call`.\n",
            "x-stainless-const": true
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the function tool call generated by the model.\n"
          },
          "caller": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaToolCallCaller"
              },
              {
                "type": "null"
              }
            ]
          },
          "namespace": {
            "type": "string",
            "description": "The namespace of the function to run.\n"
          },
          "name": {
            "type": "string",
            "description": "The name of the function to run.\n"
          },
          "arguments": {
            "type": "string",
            "description": "A JSON string of the arguments to pass to the function.\n"
          },
          "status": {
            "type": "string",
            "description": "The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ]
          }
        },
        "required": [
          "type",
          "call_id",
          "name",
          "arguments"
        ]
      },
      "BetaFunctionToolCallOutput": {
        "type": "object",
        "title": "Function tool call output",
        "description": "The output of a function tool call.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the function tool call output. Populated when this item\nis returned via API.\n"
          },
          "type": {
            "type": "string",
            "enum": [
              "function_call_output"
            ],
            "description": "The type of the function tool call output. Always `function_call_output`.\n",
            "x-stainless-const": true
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the function tool call generated by the model.\n"
          },
          "caller": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaToolCallCallerParam"
              },
              {
                "type": "null"
              }
            ]
          },
          "output": {
            "description": "The output from the function call generated by your code.\nCan be a string or an list of output content.\n",
            "oneOf": [
              {
                "type": "string",
                "description": "A string of the output of the function call.\n",
                "title": "string output"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/BetaFunctionAndCustomToolCallOutput"
                },
                "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"
        ]
      },
      "BetaFunctionToolCallOutputResource": {
        "allOf": [
          {
            "$ref": "#/$defs/BetaFunctionToolCallOutput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of the function call tool output.\n"
              },
              "status": {
                "description": "The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n",
                "$ref": "#/$defs/BetaFunctionCallOutputStatusEnum"
              },
              "created_by": {
                "type": "string",
                "description": "The identifier of the actor that created the item.\n"
              }
            },
            "required": [
              "id",
              "status"
            ]
          }
        ]
      },
      "BetaFunctionToolParam": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "parameters": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaEmptyModelParam"
              },
              {
                "type": "null"
              }
            ]
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean",
                "description": "Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise."
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "function"
            ],
            "default": "function",
            "x-stainless-const": true
          },
          "output_schema": {
            "anyOf": [
              {
                "additionalProperties": {},
                "type": "object",
                "description": "A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.",
                "x-oaiTypeLabel": "map"
              },
              {
                "type": "null"
              }
            ]
          },
          "defer_loading": {
            "type": "boolean",
            "description": "Whether this function should be deferred and discovered via tool search."
          },
          "allowed_callers": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/$defs/BetaCallableToolAllowedCaller"
                },
                "type": "array",
                "minItems": 1,
                "description": "The tool invocation context(s)."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "name",
          "type"
        ]
      },
      "BetaGrammarSyntax1": {
        "type": "string",
        "enum": [
          "lark",
          "regex"
        ]
      },
      "BetaHybridSearchOptions": {
        "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"
        ]
      },
      "BetaImageDetail": {
        "type": "string",
        "enum": [
          "low",
          "high",
          "auto",
          "original"
        ]
      },
      "BetaImageGenActionEnum": {
        "type": "string",
        "enum": [
          "generate",
          "edit",
          "auto"
        ]
      },
      "BetaImageGenTool": {
        "type": "object",
        "title": "Image generation tool",
        "description": "A tool that generates images using the GPT image models.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "image_generation"
            ],
            "description": "The type of the image generation tool. Always `image_generation`.\n",
            "x-stainless-const": true
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "enum": [
                  "gpt-image-1",
                  "gpt-image-1-mini",
                  "gpt-image-1.5"
                ],
                "description": "The image generation model to use. Default: `gpt-image-1`.\n",
                "default": "gpt-image-1"
              }
            ]
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "auto"
            ],
            "description": "The quality of the generated image. One of `low`, `medium`, `high`,\nor `auto`. Default: `auto`.\n",
            "default": "auto"
          },
          "size": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "enum": [
                  "1024x1024",
                  "1024x1536",
                  "1536x1024",
                  "auto"
                ]
              }
            ],
            "description": "The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.",
            "default": "auto"
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "webp",
              "jpeg"
            ],
            "description": "The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.\n",
            "default": "png"
          },
          "output_compression": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Compression level for the output image. Default: 100.\n",
            "default": 100
          },
          "moderation": {
            "type": "string",
            "enum": [
              "auto",
              "low"
            ],
            "description": "Moderation level for the generated image. Default: `auto`.\n",
            "default": "auto"
          },
          "background": {
            "type": "string",
            "enum": [
              "transparent",
              "opaque",
              "auto"
            ],
            "description": "Background type for the generated image. One of `transparent`,\n`opaque`, or `auto`. Default: `auto`.\n",
            "default": "auto"
          },
          "input_fidelity": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaInputFidelity"
              },
              {
                "type": "null"
              }
            ]
          },
          "input_image_mask": {
            "type": "object",
            "description": "Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).\n",
            "properties": {
              "image_url": {
                "type": "string",
                "description": "Base64-encoded mask image.\n"
              },
              "file_id": {
                "type": "string",
                "description": "File ID for the mask image.\n"
              }
            },
            "required": [],
            "additionalProperties": false
          },
          "partial_images": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3,
            "description": "Number of partial images to generate in streaming mode, from 0 (default value) to 3.\n",
            "default": 0
          },
          "action": {
            "description": "Whether to generate a new image or edit an existing image. Default: `auto`.\n",
            "$ref": "#/$defs/BetaImageGenActionEnum"
          }
        },
        "required": [
          "type"
        ]
      },
      "BetaImageGenToolCall": {
        "type": "object",
        "title": "Image generation call",
        "description": "An image generation request made by the model.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "image_generation_call"
            ],
            "description": "The type of the image generation call. Always `image_generation_call`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the image generation call.\n"
          },
          "status": {
            "type": "string",
            "enum": [
              "in_progress",
              "completed",
              "generating",
              "failed"
            ],
            "description": "The status of the image generation call.\n"
          },
          "result": {
            "anyOf": [
              {
                "type": "string",
                "description": "The generated image encoded in base64.\n"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "id",
          "status",
          "result"
        ]
      },
      "BetaInlineSkillParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "inline"
            ],
            "description": "Defines an inline skill for this request.",
            "default": "inline",
            "x-stainless-const": true
          },
          "name": {
            "type": "string",
            "description": "The name of the skill."
          },
          "description": {
            "type": "string",
            "description": "The description of the skill."
          },
          "source": {
            "$ref": "#/$defs/BetaInlineSkillSourceParam",
            "description": "Inline skill payload"
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "description",
          "source"
        ]
      },
      "BetaInlineSkillSourceParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "base64"
            ],
            "description": "The type of the inline skill source. Must be `base64`.",
            "default": "base64",
            "x-stainless-const": true
          },
          "media_type": {
            "type": "string",
            "enum": [
              "application/zip"
            ],
            "description": "The media type of the inline skill payload. Must be `application/zip`.",
            "default": "application/zip",
            "x-stainless-const": true
          },
          "data": {
            "type": "string",
            "maxLength": 70254592,
            "minLength": 1,
            "description": "Base64-encoded skill zip bundle."
          }
        },
        "type": "object",
        "required": [
          "type",
          "media_type",
          "data"
        ],
        "description": "Inline skill payload"
      },
      "BetaInputContent": {
        "oneOf": [
          {
            "$ref": "#/$defs/BetaInputTextContent"
          },
          {
            "$ref": "#/$defs/BetaInputImageContent"
          },
          {
            "$ref": "#/$defs/BetaInputFileContent"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "BetaInputFidelity": {
        "type": "string",
        "enum": [
          "high",
          "low"
        ],
        "description": "Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`."
      },
      "BetaInputFileContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_file"
            ],
            "description": "The type of the input item. Always `input_file`.",
            "default": "input_file",
            "x-stainless-const": true
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The ID of the file to be sent to the model."
              },
              {
                "type": "null"
              }
            ]
          },
          "filename": {
            "type": "string",
            "description": "The name of the file to be sent to the model."
          },
          "file_data": {
            "type": "string",
            "description": "The content of the file to be sent to the model.\n"
          },
          "prompt_cache_breakpoint": {
            "$ref": "#/$defs/BetaPromptCacheBreakpointConfig"
          },
          "file_url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the file to be sent to the model."
          },
          "detail": {
            "$ref": "#/$defs/BetaFileInputDetail",
            "description": "The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`."
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Input file",
        "description": "A file input to the model."
      },
      "BetaInputFileContentParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_file"
            ],
            "description": "The type of the input item. Always `input_file`.",
            "default": "input_file",
            "x-stainless-const": true
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The ID of the file to be sent to the model.",
                "example": "file-123"
              },
              {
                "type": "null"
              }
            ]
          },
          "filename": {
            "anyOf": [
              {
                "type": "string",
                "description": "The name of the file to be sent to the model."
              },
              {
                "type": "null"
              }
            ]
          },
          "file_data": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 73400320,
                "description": "The base64-encoded data of the file to be sent to the model."
              },
              {
                "type": "null"
              }
            ]
          },
          "file_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri",
                "description": "The URL of the file to be sent to the model."
              },
              {
                "type": "null"
              }
            ]
          },
          "detail": {
            "$ref": "#/$defs/BetaFileDetailEnum",
            "description": "The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`."
          },
          "prompt_cache_breakpoint": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaPromptCacheBreakpointParam"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Input file",
        "description": "A file input to the model."
      },
      "BetaInputImageContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_image"
            ],
            "description": "The type of the input item. Always `input_image`.",
            "default": "input_image",
            "x-stainless-const": true
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri",
                "description": "The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."
              },
              {
                "type": "null"
              }
            ]
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The ID of the file to be sent to the model."
              },
              {
                "type": "null"
              }
            ]
          },
          "detail": {
            "$ref": "#/$defs/BetaImageDetail",
            "description": "The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`."
          },
          "prompt_cache_breakpoint": {
            "$ref": "#/$defs/BetaPromptCacheBreakpointConfig"
          }
        },
        "type": "object",
        "required": [
          "type",
          "detail"
        ],
        "title": "Input image",
        "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision)."
      },
      "BetaInputImageContentParamAutoParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_image"
            ],
            "description": "The type of the input item. Always `input_image`.",
            "default": "input_image",
            "x-stainless-const": true
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20971520,
                "format": "uri",
                "description": "The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."
              },
              {
                "type": "null"
              }
            ]
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The ID of the file to be sent to the model.",
                "example": "file-123"
              },
              {
                "type": "null"
              }
            ]
          },
          "detail": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaDetailEnum",
                "description": "The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`."
              },
              {
                "type": "null"
              }
            ]
          },
          "prompt_cache_breakpoint": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaPromptCacheBreakpointParam"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Input image",
        "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision)"
      },
      "BetaInputItem": {
        "oneOf": [
          {
            "$ref": "#/$defs/BetaEasyInputMessage"
          },
          {
            "type": "object",
            "title": "Item",
            "description": "An item representing part of the context for the response to be\ngenerated by the model. Can contain text, images, and audio inputs,\nas well as previous assistant responses and tool call outputs.\n",
            "$ref": "#/$defs/BetaItem"
          },
          {
            "$ref": "#/$defs/BetaCompactionTriggerItemParam"
          },
          {
            "$ref": "#/$defs/BetaItemReferenceParam"
          },
          {
            "$ref": "#/$defs/BetaProgramItemParam"
          },
          {
            "$ref": "#/$defs/BetaProgramOutputItemParam"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "BetaInputMessage": {
        "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": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "description": "The type of the message input. Always set to `message`.\n",
            "enum": [
              "message"
            ],
            "x-stainless-const": true
          },
          "role": {
            "type": "string",
            "description": "The role of the message input. One of `user`, `system`, or `developer`.\n",
            "enum": [
              "user",
              "system",
              "developer"
            ]
          },
          "status": {
            "type": "string",
            "description": "The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ]
          },
          "content": {
            "$ref": "#/$defs/BetaInputMessageContentList"
          }
        },
        "required": [
          "role",
          "content"
        ]
      },
      "BetaInputMessageContentList": {
        "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": "#/$defs/BetaInputContent"
        }
      },
      "BetaInputTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_text"
            ],
            "description": "The type of the input item. Always `input_text`.",
            "default": "input_text",
            "x-stainless-const": true
          },
          "text": {
            "type": "string",
            "description": "The text input to the model."
          },
          "prompt_cache_breakpoint": {
            "$ref": "#/$defs/BetaPromptCacheBreakpointConfig"
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "Input text",
        "description": "A text input to the model."
      },
      "BetaInputTextContentParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_text"
            ],
            "description": "The type of the input item. Always `input_text`.",
            "default": "input_text",
            "x-stainless-const": true
          },
          "text": {
            "type": "string",
            "maxLength": 10485760,
            "description": "The text input to the model."
          },
          "prompt_cache_breakpoint": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaPromptCacheBreakpointParam"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "Input text",
        "description": "A text input to the model."
      },
      "BetaItem": {
        "type": "object",
        "description": "Content item used to generate a response.\n",
        "oneOf": [
          {
            "$ref": "#/$defs/BetaInputMessage"
          },
          {
            "$ref": "#/$defs/BetaOutputMessage"
          },
          {
            "$ref": "#/$defs/BetaFileSearchToolCall"
          },
          {
            "$ref": "#/$defs/BetaComputerToolCall"
          },
          {
            "$ref": "#/$defs/BetaComputerCallOutputItemParam"
          },
          {
            "$ref": "#/$defs/BetaWebSearchToolCall"
          },
          {
            "$ref": "#/$defs/BetaFunctionToolCall"
          },
          {
            "$ref": "#/$defs/BetaFunctionCallOutputItemParam"
          },
          {
            "$ref": "#/$defs/BetaAgentMessageItemParam"
          },
          {
            "$ref": "#/$defs/BetaMultiAgentCallItemParam"
          },
          {
            "$ref": "#/$defs/BetaMultiAgentCallOutputItemParam"
          },
          {
            "$ref": "#/$defs/BetaToolSearchCallItemParam"
          },
          {
            "$ref": "#/$defs/BetaToolSearchOutputItemParam"
          },
          {
            "$ref": "#/$defs/BetaAdditionalToolsItemParam"
          },
          {
            "$ref": "#/$defs/BetaReasoningItem"
          },
          {
            "$ref": "#/$defs/BetaCompactionSummaryItemParam"
          },
          {
            "$ref": "#/$defs/BetaImageGenToolCall"
          },
          {
            "$ref": "#/$defs/BetaCodeInterpreterToolCall"
          },
          {
            "$ref": "#/$defs/BetaLocalShellToolCall"
          },
          {
            "$ref": "#/$defs/BetaLocalShellToolCallOutput"
          },
          {
            "$ref": "#/$defs/BetaFunctionShellCallItemParam"
          },
          {
            "$ref": "#/$defs/BetaFunctionShellCallOutputItemParam"
          },
          {
            "$ref": "#/$defs/BetaApplyPatchToolCallItemParam"
          },
          {
            "$ref": "#/$defs/BetaApplyPatchToolCallOutputItemParam"
          },
          {
            "$ref": "#/$defs/BetaMCPListTools"
          },
          {
            "$ref": "#/$defs/BetaMCPApprovalRequest"
          },
          {
            "$ref": "#/$defs/BetaMCPApprovalResponse"
          },
          {
            "$ref": "#/$defs/BetaMCPToolCall"
          },
          {
            "$ref": "#/$defs/BetaCustomToolCallOutput"
          },
          {
            "$ref": "#/$defs/BetaCustomToolCall"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "BetaItemReferenceParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "item_reference"
                ],
                "description": "The type of item to reference. Always `item_reference`.",
                "default": "item_reference",
                "x-stainless-const": true
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "description": "The ID of the item to reference."
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "Item reference",
        "description": "An internal identifier for an item to reference."
      },
      "BetaKeyPressAction": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "keypress"
            ],
            "description": "Specifies the event type. For a keypress action, this property is always set to `keypress`.",
            "default": "keypress",
            "x-stainless-const": true
          },
          "keys": {
            "items": {
              "type": "string",
              "description": "One of the keys the model is requesting to be pressed."
            },
            "type": "array",
            "description": "The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key."
          }
        },
        "type": "object",
        "required": [
          "type",
          "keys"
        ],
        "title": "KeyPress",
        "description": "A collection of keypresses the model would like to perform."
      },
      "BetaLocalEnvironmentParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "local"
            ],
            "description": "Use a local computer environment.",
            "default": "local",
            "x-stainless-const": true
          },
          "skills": {
            "items": {
              "$ref": "#/$defs/BetaLocalSkillParam"
            },
            "type": "array",
            "maxItems": 200,
            "description": "An optional list of skills."
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "BetaLocalEnvironmentResource": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "local"
            ],
            "description": "The environment type. Always `local`.",
            "default": "local",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Local Environment",
        "description": "Represents the use of a local environment to perform shell actions."
      },
      "BetaLocalShellExecAction": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "exec"
            ],
            "description": "The type of the local shell action. Always `exec`.",
            "default": "exec",
            "x-stainless-const": true
          },
          "command": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "The command to run."
          },
          "timeout_ms": {
            "anyOf": [
              {
                "type": "integer",
                "description": "Optional timeout in milliseconds for the command."
              },
              {
                "type": "null"
              }
            ]
          },
          "working_directory": {
            "anyOf": [
              {
                "type": "string",
                "description": "Optional working directory to run the command in."
              },
              {
                "type": "null"
              }
            ]
          },
          "env": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "description": "Environment variables to set for the command.",
            "x-oaiTypeLabel": "map"
          },
          "user": {
            "anyOf": [
              {
                "type": "string",
                "description": "Optional user to run the command as."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "command",
          "env"
        ],
        "title": "Local shell exec action",
        "description": "Execute a shell command on the server."
      },
      "BetaLocalShellToolCall": {
        "type": "object",
        "title": "Local shell call",
        "description": "A tool call to run a command on the local shell.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "local_shell_call"
            ],
            "description": "The type of the local shell call. Always `local_shell_call`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the local shell call.\n"
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the local shell tool call generated by the model.\n"
          },
          "action": {
            "$ref": "#/$defs/BetaLocalShellExecAction"
          },
          "status": {
            "type": "string",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ],
            "description": "The status of the local shell call.\n"
          }
        },
        "required": [
          "type",
          "id",
          "call_id",
          "action",
          "status"
        ]
      },
      "BetaLocalShellToolCallOutput": {
        "type": "object",
        "title": "Local shell call output",
        "description": "The output of a local shell tool call.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "local_shell_call_output"
            ],
            "description": "The type of the local shell tool call output. Always `local_shell_call_output`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the local shell tool call generated by the model.\n"
          },
          "output": {
            "type": "string",
            "description": "A JSON string of the output of the local shell tool call.\n"
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "in_progress",
                  "completed",
                  "incomplete"
                ],
                "description": "The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "type",
          "call_id",
          "output"
        ]
      },
      "BetaLocalShellToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "local_shell"
            ],
            "description": "The type of the local shell tool. Always `local_shell`.",
            "default": "local_shell",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Local shell tool",
        "description": "A tool that allows the model to execute shell commands in a local environment."
      },
      "BetaLocalSkillParam": {
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the skill."
          },
          "description": {
            "type": "string",
            "description": "The description of the skill."
          },
          "path": {
            "type": "string",
            "description": "The path to the directory containing the skill."
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "path"
        ]
      },
      "BetaLogProb": {
        "properties": {
          "token": {
            "type": "string"
          },
          "logprob": {
            "type": "number"
          },
          "bytes": {
            "items": {
              "type": "integer"
            },
            "type": "array"
          },
          "top_logprobs": {
            "items": {
              "$ref": "#/$defs/BetaTopLogProb"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "token",
          "logprob",
          "bytes",
          "top_logprobs"
        ],
        "title": "Log probability",
        "description": "The log probability of a token."
      },
      "BetaMCPApprovalRequest": {
        "type": "object",
        "title": "MCP approval request",
        "description": "A request for human approval of a tool invocation.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "mcp_approval_request"
            ],
            "description": "The type of the item. Always `mcp_approval_request`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the approval request.\n"
          },
          "server_label": {
            "type": "string",
            "description": "The label of the MCP server making the request.\n"
          },
          "name": {
            "type": "string",
            "description": "The name of the tool to run.\n"
          },
          "arguments": {
            "type": "string",
            "description": "A JSON string of arguments for the tool.\n"
          }
        },
        "required": [
          "type",
          "id",
          "server_label",
          "name",
          "arguments"
        ]
      },
      "BetaMCPApprovalResponse": {
        "type": "object",
        "title": "MCP approval response",
        "description": "A response to an MCP approval request.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "mcp_approval_response"
            ],
            "description": "The type of the item. Always `mcp_approval_response`.\n",
            "x-stainless-const": true
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the approval response\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "approval_request_id": {
            "type": "string",
            "description": "The ID of the approval request being answered.\n"
          },
          "approve": {
            "type": "boolean",
            "description": "Whether the request was approved.\n"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "description": "Optional reason for the decision.\n"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "request_id",
          "approve",
          "approval_request_id"
        ]
      },
      "BetaMCPApprovalResponseResource": {
        "type": "object",
        "title": "MCP approval response",
        "description": "A response to an MCP approval request.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "mcp_approval_response"
            ],
            "description": "The type of the item. Always `mcp_approval_response`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the approval response\n"
          },
          "approval_request_id": {
            "type": "string",
            "description": "The ID of the approval request being answered.\n"
          },
          "approve": {
            "type": "boolean",
            "description": "Whether the request was approved.\n"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "description": "Optional reason for the decision.\n"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "id",
          "request_id",
          "approve",
          "approval_request_id"
        ]
      },
      "BetaMCPListTools": {
        "type": "object",
        "title": "MCP list tools",
        "description": "A list of tools available on an MCP server.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "mcp_list_tools"
            ],
            "description": "The type of the item. Always `mcp_list_tools`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the list.\n"
          },
          "server_label": {
            "type": "string",
            "description": "The label of the MCP server.\n"
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/BetaMCPListToolsTool"
            },
            "description": "The tools available on the server.\n"
          },
          "error": {
            "anyOf": [
              {
                "type": "string",
                "description": "Error message if the server could not list tools.\n"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "id",
          "server_label",
          "tools"
        ]
      },
      "BetaMCPListToolsTool": {
        "type": "object",
        "title": "MCP list tools tool",
        "description": "A tool available on an MCP server.\n",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the tool.\n"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "description": "The description of the tool.\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "input_schema": {
            "type": "object",
            "description": "The JSON schema describing the tool's input.\n"
          },
          "annotations": {
            "anyOf": [
              {
                "type": "object",
                "description": "Additional annotations about the tool.\n"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name",
          "input_schema"
        ]
      },
      "BetaMCPTool": {
        "type": "object",
        "title": "MCP tool",
        "description": "Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "mcp"
            ],
            "description": "The type of the MCP tool. Always `mcp`.",
            "x-stainless-const": true
          },
          "server_label": {
            "type": "string",
            "description": "A label for this MCP server, used to identify it in tool calls.\n"
          },
          "server_url": {
            "type": "string",
            "format": "uri",
            "description": "The URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.\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`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/docs/guides/tools-remote-mcp#connectors).\n\nCurrently supported `connector_id` values are:\n\n- Dropbox: `connector_dropbox`\n- Gmail: `connector_gmail`\n- Google Calendar: `connector_googlecalendar`\n- Google Drive: `connector_googledrive`\n- Microsoft Teams: `connector_microsoftteams`\n- Outlook Calendar: `connector_outlookcalendar`\n- Outlook Email: `connector_outlookemail`\n- SharePoint: `connector_sharepoint`\n"
          },
          "tunnel_id": {
            "type": "string",
            "pattern": "^tunnel_[a-z0-9]{32}$",
            "description": "The Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n"
          },
          "authorization": {
            "type": "string",
            "description": "An OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.\n"
          },
          "server_description": {
            "type": "string",
            "description": "Optional description of the MCP server, used to provide more context.\n"
          },
          "headers": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Optional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "allowed_tools": {
            "anyOf": [
              {
                "description": "List of allowed tool names or a filter object.\n",
                "oneOf": [
                  {
                    "type": "array",
                    "title": "MCP allowed tools",
                    "description": "A string array of allowed tool names",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "$ref": "#/$defs/BetaMCPToolFilter"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "allowed_callers": {
            "anyOf": [
              {
                "type": "array",
                "minItems": 1,
                "items": {
                  "$ref": "#/$defs/BetaCallableToolAllowedCaller"
                },
                "description": "The tool invocation context(s)."
              },
              {
                "type": "null"
              }
            ]
          },
          "require_approval": {
            "anyOf": [
              {
                "description": "Specify which of the MCP server's tools require approval.",
                "oneOf": [
                  {
                    "type": "object",
                    "title": "MCP tool approval filter",
                    "description": "Specify which of the MCP server's tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.\n",
                    "properties": {
                      "always": {
                        "$ref": "#/$defs/BetaMCPToolFilter"
                      },
                      "never": {
                        "$ref": "#/$defs/BetaMCPToolFilter"
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "string",
                    "title": "MCP tool approval setting",
                    "description": "Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.\n",
                    "enum": [
                      "always",
                      "never"
                    ]
                  }
                ],
                "default": "always"
              },
              {
                "type": "null"
              }
            ]
          },
          "defer_loading": {
            "type": "boolean",
            "description": "Whether this MCP tool is deferred and discovered via tool search.\n"
          }
        },
        "required": [
          "type",
          "server_label"
        ]
      },
      "BetaMCPToolCall": {
        "type": "object",
        "title": "MCP tool call",
        "description": "An invocation of a tool on an MCP server.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "mcp_call"
            ],
            "description": "The type of the item. Always `mcp_call`.\n",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the tool call.\n"
          },
          "server_label": {
            "type": "string",
            "description": "The label of the MCP server running the tool.\n"
          },
          "name": {
            "type": "string",
            "description": "The name of the tool that was run.\n"
          },
          "arguments": {
            "type": "string",
            "description": "A JSON string of the arguments passed to the tool.\n"
          },
          "output": {
            "anyOf": [
              {
                "type": "string",
                "description": "The output from the tool call.\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string",
                "description": "The error from the tool call, if any.\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/$defs/BetaMCPToolCallStatus",
            "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"
          },
          "approval_request_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "id",
          "server_label",
          "name",
          "arguments"
        ]
      },
      "BetaMCPToolCallStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete",
          "calling",
          "failed"
        ]
      },
      "BetaMCPToolFilter": {
        "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
      },
      "BetaMessagePhase": {
        "type": "string",
        "description": "Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).\nFor models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend\nphase on all assistant messages — dropping it can degrade performance. Not used for user messages.\n",
        "enum": [
          "commentary",
          "final_answer"
        ]
      },
      "BetaMessageRole": {
        "type": "string",
        "enum": [
          "unknown",
          "user",
          "assistant",
          "system",
          "critic",
          "discriminator",
          "developer",
          "tool"
        ]
      },
      "BetaMetadata": {
        "anyOf": [
          {
            "type": "object",
            "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n",
            "additionalProperties": {
              "type": "string"
            },
            "x-oaiTypeLabel": "map"
          },
          {
            "type": "null"
          }
        ]
      },
      "BetaModelIdsResponses": {
        "example": "gpt-5.1",
        "anyOf": [
          {
            "$ref": "#/$defs/BetaModelIdsShared"
          },
          {
            "type": "string",
            "title": "ResponsesOnlyModel",
            "enum": [
              "o1-pro",
              "o1-pro-2025-03-19",
              "o3-pro",
              "o3-pro-2025-06-10",
              "o3-deep-research",
              "o3-deep-research-2025-06-26",
              "o4-mini-deep-research",
              "o4-mini-deep-research-2025-06-26",
              "computer-use-preview",
              "computer-use-preview-2025-03-11",
              "gpt-5-codex",
              "gpt-5-pro",
              "gpt-5-pro-2025-10-06",
              "gpt-5.1-codex-max"
            ]
          }
        ]
      },
      "BetaModelIdsShared": {
        "example": "gpt-5.4",
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "string",
            "enum": [
              "gpt-5.6-sol",
              "gpt-5.6-terra",
              "gpt-5.6-luna",
              "gpt-5.4",
              "gpt-5.4-mini",
              "gpt-5.4-nano",
              "gpt-5.4-mini-2026-03-17",
              "gpt-5.4-nano-2026-03-17",
              "gpt-5.3-chat-latest",
              "gpt-5.2",
              "gpt-5.2-2025-12-11",
              "gpt-5.2-chat-latest",
              "gpt-5.2-pro",
              "gpt-5.2-pro-2025-12-11",
              "gpt-5.1",
              "gpt-5.1-2025-11-13",
              "gpt-5.1-codex",
              "gpt-5.1-mini",
              "gpt-5.1-chat-latest",
              "gpt-5",
              "gpt-5-mini",
              "gpt-5-nano",
              "gpt-5-2025-08-07",
              "gpt-5-mini-2025-08-07",
              "gpt-5-nano-2025-08-07",
              "gpt-5-chat-latest",
              "gpt-4.1",
              "gpt-4.1-mini",
              "gpt-4.1-nano",
              "gpt-4.1-2025-04-14",
              "gpt-4.1-mini-2025-04-14",
              "gpt-4.1-nano-2025-04-14",
              "o4-mini",
              "o4-mini-2025-04-16",
              "o3",
              "o3-2025-04-16",
              "o3-mini",
              "o3-mini-2025-01-31",
              "o1",
              "o1-2024-12-17",
              "o1-preview",
              "o1-preview-2024-09-12",
              "o1-mini",
              "o1-mini-2024-09-12",
              "gpt-4o",
              "gpt-4o-2024-11-20",
              "gpt-4o-2024-08-06",
              "gpt-4o-2024-05-13",
              "gpt-4o-audio-preview",
              "gpt-4o-audio-preview-2024-10-01",
              "gpt-4o-audio-preview-2024-12-17",
              "gpt-4o-audio-preview-2025-06-03",
              "gpt-4o-mini-audio-preview",
              "gpt-4o-mini-audio-preview-2024-12-17",
              "gpt-4o-search-preview",
              "gpt-4o-mini-search-preview",
              "gpt-4o-search-preview-2025-03-11",
              "gpt-4o-mini-search-preview-2025-03-11",
              "chatgpt-4o-latest",
              "codex-mini-latest",
              "gpt-4o-mini",
              "gpt-4o-mini-2024-07-18",
              "gpt-4-turbo",
              "gpt-4-turbo-2024-04-09",
              "gpt-4-0125-preview",
              "gpt-4-turbo-preview",
              "gpt-4-1106-preview",
              "gpt-4-vision-preview",
              "gpt-4",
              "gpt-4-0314",
              "gpt-4-0613",
              "gpt-4-32k",
              "gpt-4-32k-0314",
              "gpt-4-32k-0613",
              "gpt-3.5-turbo",
              "gpt-3.5-turbo-16k",
              "gpt-3.5-turbo-0301",
              "gpt-3.5-turbo-0613",
              "gpt-3.5-turbo-1106",
              "gpt-3.5-turbo-0125",
              "gpt-3.5-turbo-16k-0613"
            ]
          }
        ]
      },
      "BetaModelResponseProperties": {
        "type": "object",
        "properties": {
          "metadata": {
            "$ref": "#/$defs/BetaMetadata"
          },
          "top_logprobs": {
            "anyOf": [
              {
                "description": "An integer between 0 and 20 specifying the maximum number of most likely\ntokens to return at each token position, each with an associated log\nprobability. In some cases, the number of returned tokens may be fewer than\nrequested.\n",
                "type": "integer",
                "minimum": 0,
                "maximum": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 2,
                "default": 1,
                "example": 1,
                "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "default": 1,
                "example": 1,
                "description": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "user": {
            "type": "string",
            "example": "user-1234",
            "deprecated": true,
            "description": "This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\nA stable identifier for your end-users.\nUsed to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
          },
          "safety_identifier": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64,
                "example": "safety-identifier-1234",
                "description": "A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "prompt_cache_key": {
            "anyOf": [
              {
                "type": "string",
                "example": "prompt-cache-key-1234",
                "description": "Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching).\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "service_tier": {
            "$ref": "#/$defs/BetaServiceTier"
          },
          "prompt_cache_retention": {
            "deprecated": true,
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "in_memory",
                  "24h"
                ],
                "description": "Deprecated. Use `prompt_cache_options.ttl` instead.\n\nThe retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention).\nThis field expresses a maximum retention policy, while\n`prompt_cache_options.ttl` expresses a minimum cache lifetime. The two\nfields are independent and do not interact.\nFor `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.\n\nFor older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:\n  - Organizations without ZDR enabled default to `24h`.\n  - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.\n"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "BetaModeration": {
        "properties": {
          "input": {
            "oneOf": [
              {
                "$ref": "#/$defs/BetaModerationResultBody"
              },
              {
                "$ref": "#/$defs/BetaModerationErrorBody"
              }
            ],
            "description": "Moderation for the response input.",
            "discriminator": {
              "propertyName": "type"
            }
          },
          "output": {
            "oneOf": [
              {
                "$ref": "#/$defs/BetaModerationResultBody"
              },
              {
                "$ref": "#/$defs/BetaModerationErrorBody"
              }
            ],
            "description": "Moderation for the response output.",
            "discriminator": {
              "propertyName": "type"
            }
          }
        },
        "type": "object",
        "required": [
          "input",
          "output"
        ],
        "title": "Moderation",
        "description": "Moderation results or errors for the response input and output."
      },
      "BetaModerationErrorBody": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "error"
            ],
            "description": "The object type, which was always `error` for moderation failures.",
            "default": "error",
            "x-stainless-const": true
          },
          "code": {
            "type": "string",
            "description": "The error code."
          },
          "message": {
            "type": "string",
            "description": "The error message."
          }
        },
        "type": "object",
        "required": [
          "type",
          "code",
          "message"
        ],
        "title": "Moderation error",
        "description": "An error produced while attempting moderation for the response input or output."
      },
      "BetaModerationInputType": {
        "type": "string",
        "enum": [
          "text",
          "image"
        ]
      },
      "BetaModerationResultBody": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "moderation_result"
            ],
            "description": "The object type, which was always `moderation_result` for successful moderation results.",
            "default": "moderation_result",
            "x-stainless-const": true
          },
          "model": {
            "type": "string",
            "description": "The moderation model that produced this result."
          },
          "flagged": {
            "type": "boolean",
            "description": "A boolean indicating whether the content was flagged by any category."
          },
          "categories": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object",
            "description": "A dictionary of moderation categories to booleans, True if the input is flagged under this category.",
            "x-oaiTypeLabel": "map"
          },
          "category_scores": {
            "additionalProperties": {
              "type": "number"
            },
            "type": "object",
            "description": "A dictionary of moderation categories to scores.",
            "x-oaiTypeLabel": "map"
          },
          "category_applied_input_types": {
            "additionalProperties": {
              "items": {
                "$ref": "#/$defs/BetaModerationInputType"
              },
              "type": "array"
            },
            "type": "object",
            "description": "Which modalities of input are reflected by the score for each category.",
            "x-oaiTypeLabel": "map"
          }
        },
        "type": "object",
        "required": [
          "type",
          "model",
          "flagged",
          "categories",
          "category_scores",
          "category_applied_input_types"
        ],
        "title": "Moderation result",
        "description": "A moderation result produced for the response input or output."
      },
      "BetaMoveParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "move"
            ],
            "description": "Specifies the event type. For a move action, this property is always set to `move`.",
            "default": "move",
            "x-stainless-const": true
          },
          "x": {
            "type": "integer",
            "description": "The x-coordinate to move to."
          },
          "y": {
            "type": "integer",
            "description": "The y-coordinate to move to."
          },
          "keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "description": "The keys being held while moving the mouse."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "x",
          "y"
        ],
        "title": "Move",
        "description": "A mouse move action."
      },
      "BetaMultiAgentAction": {
        "type": "string",
        "enum": [
          "spawn_agent",
          "interrupt_agent",
          "list_agents",
          "send_message",
          "followup_task",
          "wait_agent"
        ]
      },
      "BetaMultiAgentAction1": {
        "type": "string",
        "enum": [
          "spawn_agent",
          "interrupt_agent",
          "list_agents",
          "send_message",
          "followup_task",
          "wait_agent"
        ]
      },
      "BetaMultiAgentCall": {
        "properties": {
          "agent": {
            "$ref": "#/$defs/BetaAgentTag",
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "multi_agent_call"
            ],
            "description": "The type of the multi-agent call. Always `multi_agent_call`.",
            "default": "multi_agent_call",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the multi-agent call item."
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID linking this call to its output."
          },
          "action": {
            "$ref": "#/$defs/BetaMultiAgentAction",
            "description": "The multi-agent action to execute."
          },
          "arguments": {
            "type": "string",
            "description": "The JSON string of arguments generated for the action."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "action",
          "arguments"
        ],
        "x-oai-beta": "responses_multi_agent=v1"
      },
      "BetaMultiAgentCallItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of this multi-agent call.",
                "example": "mac_123"
              },
              {
                "type": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The unique ID linking this call to its output."
          },
          "type": {
            "type": "string",
            "enum": [
              "multi_agent_call"
            ],
            "description": "The item type. Always `multi_agent_call`.",
            "default": "multi_agent_call",
            "x-stainless-const": true
          },
          "action": {
            "$ref": "#/$defs/BetaMultiAgentAction1",
            "description": "The multi-agent action that was executed."
          },
          "arguments": {
            "type": "string",
            "description": "The action arguments as a JSON string."
          }
        },
        "type": "object",
        "required": [
          "call_id",
          "type",
          "action",
          "arguments"
        ],
        "x-oai-beta": "responses_multi_agent=v1"
      },
      "BetaMultiAgentCallOutput": {
        "properties": {
          "agent": {
            "$ref": "#/$defs/BetaAgentTag",
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "multi_agent_call_output"
            ],
            "description": "The type of the multi-agent result. Always `multi_agent_call_output`.",
            "default": "multi_agent_call_output",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the multi-agent call output item."
          },
          "call_id": {
            "type": "string",
            "description": "The unique ID of the multi-agent call."
          },
          "action": {
            "$ref": "#/$defs/BetaMultiAgentAction",
            "description": "The multi-agent action that produced this result."
          },
          "output": {
            "items": {
              "$ref": "#/$defs/BetaOutputTextContent"
            },
            "type": "array",
            "description": "Text output returned by the multi-agent action."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "action",
          "output"
        ],
        "x-oai-beta": "responses_multi_agent=v1"
      },
      "BetaMultiAgentCallOutputItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of this multi-agent call output.",
                "example": "maco_123"
              },
              {
                "type": "null"
              }
            ]
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The unique ID of the multi-agent call."
          },
          "type": {
            "type": "string",
            "enum": [
              "multi_agent_call_output"
            ],
            "description": "The item type. Always `multi_agent_call_output`.",
            "default": "multi_agent_call_output",
            "x-stainless-const": true
          },
          "action": {
            "$ref": "#/$defs/BetaMultiAgentAction1",
            "description": "The multi-agent action that produced this result."
          },
          "output": {
            "items": {
              "$ref": "#/$defs/BetaOutputTextContentParam"
            },
            "type": "array",
            "description": "Text output returned by the multi-agent action."
          }
        },
        "type": "object",
        "required": [
          "call_id",
          "type",
          "action",
          "output"
        ],
        "x-oai-beta": "responses_multi_agent=v1"
      },
      "BetaNamespaceToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "namespace"
            ],
            "description": "The type of the tool. Always `namespace`.",
            "default": "namespace",
            "x-stainless-const": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The namespace name used in tool calls (for example, `crm`)."
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "description": "A description of the namespace shown to the model."
          },
          "tools": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/$defs/BetaFunctionToolParam"
                },
                {
                  "$ref": "#/$defs/BetaCustomToolParam"
                }
              ],
              "description": "A function or custom tool that belongs to a namespace.",
              "discriminator": {
                "propertyName": "type"
              }
            },
            "type": "array",
            "minItems": 1,
            "description": "The function/custom tools available inside this namespace."
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "description",
          "tools"
        ],
        "title": "Namespace",
        "description": "Groups function/custom tools under a shared namespace."
      },
      "BetaOutputItem": {
        "oneOf": [
          {
            "$ref": "#/$defs/BetaOutputMessage"
          },
          {
            "$ref": "#/$defs/BetaFileSearchToolCall"
          },
          {
            "$ref": "#/$defs/BetaFunctionToolCall"
          },
          {
            "$ref": "#/$defs/BetaFunctionToolCallOutputResource"
          },
          {
            "$ref": "#/$defs/BetaAgentMessage"
          },
          {
            "$ref": "#/$defs/BetaMultiAgentCall"
          },
          {
            "$ref": "#/$defs/BetaMultiAgentCallOutput"
          },
          {
            "$ref": "#/$defs/BetaWebSearchToolCall"
          },
          {
            "$ref": "#/$defs/BetaComputerToolCall"
          },
          {
            "$ref": "#/$defs/BetaComputerToolCallOutputResource"
          },
          {
            "$ref": "#/$defs/BetaReasoningItem"
          },
          {
            "$ref": "#/$defs/BetaProgram"
          },
          {
            "$ref": "#/$defs/BetaProgramOutput"
          },
          {
            "$ref": "#/$defs/BetaToolSearchCall"
          },
          {
            "$ref": "#/$defs/BetaToolSearchOutput"
          },
          {
            "$ref": "#/$defs/BetaAdditionalTools"
          },
          {
            "$ref": "#/$defs/BetaCompactionBody"
          },
          {
            "$ref": "#/$defs/BetaImageGenToolCall"
          },
          {
            "$ref": "#/$defs/BetaCodeInterpreterToolCall"
          },
          {
            "$ref": "#/$defs/BetaLocalShellToolCall"
          },
          {
            "$ref": "#/$defs/BetaLocalShellToolCallOutput"
          },
          {
            "$ref": "#/$defs/BetaFunctionShellCall"
          },
          {
            "$ref": "#/$defs/BetaFunctionShellCallOutput"
          },
          {
            "$ref": "#/$defs/BetaApplyPatchToolCall"
          },
          {
            "$ref": "#/$defs/BetaApplyPatchToolCallOutput"
          },
          {
            "$ref": "#/$defs/BetaMCPToolCall"
          },
          {
            "$ref": "#/$defs/BetaMCPListTools"
          },
          {
            "$ref": "#/$defs/BetaMCPApprovalRequest"
          },
          {
            "$ref": "#/$defs/BetaMCPApprovalResponseResource"
          },
          {
            "$ref": "#/$defs/BetaCustomToolCall"
          },
          {
            "$ref": "#/$defs/BetaCustomToolCallOutputResource"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "BetaOutputMessage": {
        "type": "object",
        "title": "Output message",
        "description": "An output message from the model.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the output message.\n"
          },
          "type": {
            "type": "string",
            "description": "The type of the output message. Always `message`.\n",
            "enum": [
              "message"
            ],
            "x-stainless-const": true
          },
          "role": {
            "type": "string",
            "description": "The role of the output message. Always `assistant`.\n",
            "enum": [
              "assistant"
            ],
            "x-stainless-const": true
          },
          "content": {
            "type": "array",
            "description": "The content of the output message.\n",
            "items": {
              "$ref": "#/$defs/BetaOutputMessageContent"
            }
          },
          "phase": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaMessagePhase"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "description": "The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "role",
          "content",
          "status"
        ]
      },
      "BetaOutputMessageContent": {
        "oneOf": [
          {
            "$ref": "#/$defs/BetaOutputTextContent"
          },
          {
            "$ref": "#/$defs/BetaRefusalContent"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "BetaOutputTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "output_text"
            ],
            "description": "The type of the output text. Always `output_text`.",
            "default": "output_text",
            "x-stainless-const": true
          },
          "text": {
            "type": "string",
            "description": "The text output from the model."
          },
          "annotations": {
            "items": {
              "$ref": "#/$defs/BetaAnnotation"
            },
            "type": "array",
            "description": "The annotations of the text output."
          },
          "logprobs": {
            "items": {
              "$ref": "#/$defs/BetaLogProb"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "type",
          "text",
          "annotations",
          "logprobs"
        ],
        "title": "Output text",
        "description": "A text output from the model."
      },
      "BetaOutputTextContentParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "output_text"
            ],
            "description": "The content type. Always `output_text`.",
            "default": "output_text",
            "x-stainless-const": true
          },
          "text": {
            "type": "string",
            "maxLength": 10485760,
            "description": "The text content."
          },
          "annotations": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/$defs/BetaFileCitationParam"
                },
                {
                  "$ref": "#/$defs/BetaUrlCitationParam"
                },
                {
                  "$ref": "#/$defs/BetaContainerFileCitationParam"
                }
              ],
              "discriminator": {
                "propertyName": "type"
              }
            },
            "type": "array",
            "description": "Citations associated with the text content."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ]
      },
      "BetaProgram": {
        "properties": {
          "agent": {
            "$ref": "#/$defs/BetaAgentTag",
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "program"
            ],
            "description": "The type of the item. Always `program`.",
            "default": "program",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the program item."
          },
          "call_id": {
            "type": "string",
            "description": "The stable call ID of the program item."
          },
          "code": {
            "type": "string",
            "description": "The JavaScript source executed by programmatic tool calling."
          },
          "fingerprint": {
            "type": "string",
            "description": "Opaque program replay fingerprint that must be round-tripped."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "code",
          "fingerprint"
        ]
      },
      "BetaProgramItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "description": "The unique ID of this program item.",
            "example": "cm_123"
          },
          "type": {
            "type": "string",
            "enum": [
              "program"
            ],
            "description": "The item type. Always `program`.",
            "default": "program",
            "x-stainless-const": true
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The stable call ID of the program item."
          },
          "code": {
            "type": "string",
            "maxLength": 10485760,
            "description": "The JavaScript source executed by programmatic tool calling."
          },
          "fingerprint": {
            "type": "string",
            "maxLength": 10485760,
            "description": "Opaque program replay fingerprint that must be round-tripped."
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "call_id",
          "code",
          "fingerprint"
        ]
      },
      "BetaProgramOutput": {
        "properties": {
          "agent": {
            "$ref": "#/$defs/BetaAgentTag",
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "program_output"
            ],
            "description": "The type of the item. Always `program_output`.",
            "default": "program_output",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the program output item."
          },
          "call_id": {
            "type": "string",
            "description": "The call ID of the program item."
          },
          "result": {
            "type": "string",
            "description": "The result produced by the program item."
          },
          "status": {
            "$ref": "#/$defs/BetaProgramOutputStatus",
            "description": "The terminal status of the program output item."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "result",
          "status"
        ]
      },
      "BetaProgramOutputItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "description": "The unique ID of this program output item.",
            "example": "cmo_123"
          },
          "type": {
            "type": "string",
            "enum": [
              "program_output"
            ],
            "description": "The item type. Always `program_output`.",
            "default": "program_output",
            "x-stainless-const": true
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The call ID of the program item."
          },
          "result": {
            "type": "string",
            "maxLength": 10485760,
            "description": "The result produced by the program item."
          },
          "status": {
            "$ref": "#/$defs/BetaProgramOutputItemStatus",
            "description": "The terminal status of the program output."
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "call_id",
          "result",
          "status"
        ]
      },
      "BetaProgramOutputItemStatus": {
        "type": "string",
        "enum": [
          "completed",
          "incomplete"
        ]
      },
      "BetaProgramOutputStatus": {
        "type": "string",
        "enum": [
          "completed",
          "incomplete"
        ]
      },
      "BetaProgramToolCallCaller": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "program"
            ],
            "default": "program",
            "x-stainless-const": true
          },
          "caller_id": {
            "type": "string",
            "description": "The call ID of the program item that produced this tool call."
          }
        },
        "type": "object",
        "required": [
          "type",
          "caller_id"
        ]
      },
      "BetaProgramToolCallCallerParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "program"
            ],
            "description": "The caller type. Always `program`.",
            "default": "program",
            "x-stainless-const": true
          },
          "caller_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The call ID of the program item that produced this tool call."
          }
        },
        "type": "object",
        "required": [
          "type",
          "caller_id"
        ]
      },
      "BetaProgrammaticToolCallingParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "programmatic_tool_calling"
            ],
            "description": "The type of the tool. Always `programmatic_tool_calling`.",
            "default": "programmatic_tool_calling",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "BetaPrompt": {
        "anyOf": [
          {
            "type": "object",
            "description": "Reference to a prompt template and its variables.\n[Learn more](/docs/guides/text?api-mode=responses#reusable-prompts).\n",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique identifier of the prompt template to use."
              },
              "version": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Optional version of the prompt template."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "variables": {
                "$ref": "#/$defs/BetaResponsePromptVariables"
              }
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "BetaPromptCacheBreakpointConfig": {
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "explicit"
            ],
            "description": "The breakpoint mode. Always `explicit`.",
            "default": "explicit",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "mode"
        ],
        "title": "Prompt cache breakpoint",
        "description": "Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block."
      },
      "BetaPromptCacheBreakpointParam": {
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "explicit"
            ],
            "description": "The breakpoint mode. Always `explicit`.",
            "default": "explicit",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "mode"
        ],
        "title": "Prompt cache breakpoint",
        "description": "Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block."
      },
      "BetaPromptCacheModeEnum": {
        "type": "string",
        "enum": [
          "implicit",
          "explicit"
        ]
      },
      "BetaPromptCacheOptions": {
        "properties": {
          "ttl": {
            "$ref": "#/$defs/BetaPromptCacheTTLEnum",
            "description": "The minimum lifetime applied to each cache breakpoint."
          },
          "mode": {
            "$ref": "#/$defs/BetaPromptCacheModeEnum",
            "description": "Whether implicit prompt-cache breakpoints were enabled."
          }
        },
        "type": "object",
        "required": [
          "ttl",
          "mode"
        ],
        "title": "Prompt cache options",
        "description": "The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models."
      },
      "BetaPromptCacheTTLEnum": {
        "type": "string",
        "enum": [
          "30m"
        ]
      },
      "BetaRankerVersionType": {
        "type": "string",
        "enum": [
          "auto",
          "default-2024-11-15"
        ]
      },
      "BetaRankingOptions": {
        "properties": {
          "ranker": {
            "$ref": "#/$defs/BetaRankerVersionType",
            "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": "#/$defs/BetaHybridSearchOptions",
            "description": "Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled."
          }
        },
        "type": "object",
        "required": []
      },
      "BetaReasoning": {
        "type": "object",
        "description": "**gpt-5 and o-series models only**\n\nConfiguration options for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).\n",
        "title": "Reasoning",
        "properties": {
          "mode": {
            "$ref": "#/$defs/BetaReasoningModeEnum",
            "description": "Controls the reasoning execution mode for the request.\n\nWhen returned on a response, this is the effective execution mode.\n"
          },
          "effort": {
            "$ref": "#/$defs/BetaReasoningEffort"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string",
                "description": "A summary of the reasoning performed by the model. This can be\nuseful for debugging and understanding the model's reasoning process.\nOne of `auto`, `concise`, or `detailed`.\n\n`concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.\n",
                "enum": [
                  "auto",
                  "concise",
                  "detailed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "context": {
            "anyOf": [
              {
                "type": "string",
                "description": "Controls which reasoning items are rendered back to the model on later turns.\nIf omitted or set to `auto`, the model determines the context mode. The\n`gpt-5.6` model family defaults to `all_turns`; earlier models default to\n`current_turn`.\n\nWhen returned on a response, this is the effective reasoning context mode\nused for the response.\n",
                "enum": [
                  "auto",
                  "current_turn",
                  "all_turns"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "generate_summary": {
            "anyOf": [
              {
                "type": "string",
                "deprecated": true,
                "description": "**Deprecated:** use `summary` instead.\n\nA summary of the reasoning performed by the model. This can be\nuseful for debugging and understanding the model's reasoning process.\nOne of `auto`, `concise`, or `detailed`.\n",
                "enum": [
                  "auto",
                  "concise",
                  "detailed"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "BetaReasoningEffort": {
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh",
              "max"
            ],
            "default": "medium",
            "description": "Constrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](https://platform.openai.com/docs/guides/reasoning)\nfor model-specific support.\n"
          },
          {
            "type": "null"
          }
        ]
      },
      "BetaReasoningItem": {
        "type": "object",
        "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](/docs/guides/conversation-state).\n",
        "title": "Reasoning",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "description": "The type of the object. Always `reasoning`.\n",
            "enum": [
              "reasoning"
            ],
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique identifier of the reasoning content.\n"
          },
          "encrypted_content": {
            "anyOf": [
              {
                "type": "string",
                "description": "The encrypted content of the reasoning item. This is populated by default\nfor reasoning items returned by `POST /v1/responses` and WebSocket\n`response.create` requests.\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "summary": {
            "type": "array",
            "description": "Reasoning summary content.\n",
            "items": {
              "$ref": "#/$defs/BetaSummaryTextContent"
            }
          },
          "content": {
            "type": "array",
            "description": "Reasoning text content.\n",
            "items": {
              "$ref": "#/$defs/BetaReasoningTextContent"
            }
          },
          "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"
        ]
      },
      "BetaReasoningModeEnum": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "string",
            "enum": [
              "standard",
              "pro"
            ]
          }
        ]
      },
      "BetaReasoningTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "reasoning_text"
            ],
            "description": "The type of the reasoning text. Always `reasoning_text`.",
            "default": "reasoning_text",
            "x-stainless-const": true
          },
          "text": {
            "type": "string",
            "description": "The reasoning text from the model."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "Reasoning text",
        "description": "Reasoning text from the model."
      },
      "BetaRefusalContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "refusal"
            ],
            "description": "The type of the refusal. Always `refusal`.",
            "default": "refusal",
            "x-stainless-const": true
          },
          "refusal": {
            "type": "string",
            "description": "The refusal explanation from the model."
          }
        },
        "type": "object",
        "required": [
          "type",
          "refusal"
        ],
        "title": "Refusal",
        "description": "A refusal from the model."
      },
      "BetaResponseError": {
        "anyOf": [
          {
            "type": "object",
            "description": "An error object returned when the model fails to generate a Response.\n",
            "properties": {
              "code": {
                "$ref": "#/$defs/BetaResponseErrorCode"
              },
              "message": {
                "type": "string",
                "description": "A human-readable description of the error.\n"
              }
            },
            "required": [
              "code",
              "message"
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "BetaResponseErrorCode": {
        "type": "string",
        "description": "The error code for the response.\n",
        "enum": [
          "server_error",
          "rate_limit_exceeded",
          "invalid_prompt",
          "data_residency_mismatch",
          "bio_policy",
          "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"
        ]
      },
      "BetaResponseFormatJsonObject": {
        "type": "object",
        "title": "JSON object",
        "description": "JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of response format being defined. Always `json_object`.",
            "enum": [
              "json_object"
            ],
            "x-stainless-const": true
          }
        },
        "required": [
          "type"
        ]
      },
      "BetaResponseFormatJsonSchemaSchema": {
        "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
      },
      "BetaResponseFormatText": {
        "type": "object",
        "title": "Text",
        "description": "Default response format. Used to generate text responses.\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of response format being defined. Always `text`.",
            "enum": [
              "text"
            ],
            "x-stainless-const": true
          }
        },
        "required": [
          "type"
        ]
      },
      "BetaResponsePromptVariables": {
        "anyOf": [
          {
            "type": "object",
            "title": "Prompt Variables",
            "description": "Optional map of values to substitute in for variables in your\nprompt. The substitution values can either be strings, or other\nResponse input types like images or files.\n",
            "x-oaiExpandable": true,
            "x-oaiTypeLabel": "map",
            "additionalProperties": {
              "x-oaiExpandable": true,
              "x-oaiTypeLabel": "map",
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/$defs/BetaInputTextContent"
                },
                {
                  "$ref": "#/$defs/BetaInputImageContent"
                },
                {
                  "$ref": "#/$defs/BetaInputFileContent"
                }
              ]
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "BetaResponseProperties": {
        "type": "object",
        "properties": {
          "previous_response_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the previous response to the model. Use this to\ncreate multi-turn conversations. Learn more about\n[conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.\n"
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "description": "Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and price points. Refer to the [model guide](/docs/models)\nto browse and compare available models.\n",
            "$ref": "#/$defs/BetaModelIdsResponses"
          },
          "background": {
            "anyOf": [
              {
                "type": "boolean",
                "description": "Whether to run the model response in the background.\n[Learn more](/docs/guides/background).\n",
                "default": false
              },
              {
                "type": "null"
              }
            ]
          },
          "max_tool_calls": {
            "anyOf": [
              {
                "description": "The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n",
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "text": {
            "$ref": "#/$defs/BetaResponseTextParam"
          },
          "tools": {
            "$ref": "#/$defs/BetaToolsArray"
          },
          "tool_choice": {
            "$ref": "#/$defs/BetaToolChoiceParam"
          },
          "prompt": {
            "$ref": "#/$defs/BetaPrompt"
          }
        }
      },
      "BetaResponseTextParam": {
        "type": "object",
        "description": "Configuration options for a text response from the model. Can be plain\ntext or structured JSON data. Learn more:\n- [Text inputs and outputs](/docs/guides/text)\n- [Structured Outputs](/docs/guides/structured-outputs)\n",
        "properties": {
          "format": {
            "$ref": "#/$defs/BetaTextResponseFormatConfiguration"
          },
          "verbosity": {
            "$ref": "#/$defs/BetaVerbosity"
          }
        }
      },
      "BetaResponseUsage": {
        "type": "object",
        "description": "Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.\n",
        "properties": {
          "input_tokens": {
            "type": "integer",
            "description": "The number of input tokens."
          },
          "input_tokens_details": {
            "type": "object",
            "description": "A detailed breakdown of the input tokens.",
            "properties": {
              "cached_tokens": {
                "type": "integer",
                "description": "The number of tokens that were retrieved from the cache. \n[More on prompt caching](/docs/guides/prompt-caching).\n"
              },
              "cache_write_tokens": {
                "type": "integer",
                "description": "The number of input tokens that were written to the cache."
              }
            },
            "required": [
              "cached_tokens",
              "cache_write_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"
        ]
      },
      "BetaScreenshotParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "screenshot"
            ],
            "description": "Specifies the event type. For a screenshot action, this property is always set to `screenshot`.",
            "default": "screenshot",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Screenshot",
        "description": "A screenshot action."
      },
      "BetaScrollParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "scroll"
            ],
            "description": "Specifies the event type. For a scroll action, this property is always set to `scroll`.",
            "default": "scroll",
            "x-stainless-const": true
          },
          "x": {
            "type": "integer",
            "description": "The x-coordinate where the scroll occurred."
          },
          "y": {
            "type": "integer",
            "description": "The y-coordinate where the scroll occurred."
          },
          "scroll_x": {
            "type": "integer",
            "description": "The horizontal scroll distance."
          },
          "scroll_y": {
            "type": "integer",
            "description": "The vertical scroll distance."
          },
          "keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "description": "The keys being held while scrolling."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "x",
          "y",
          "scroll_x",
          "scroll_y"
        ],
        "title": "Scroll",
        "description": "A scroll action."
      },
      "BetaSearchContentType": {
        "type": "string",
        "enum": [
          "text",
          "image"
        ]
      },
      "BetaSearchContextSize": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high"
        ]
      },
      "BetaServiceTier": {
        "anyOf": [
          {
            "type": "string",
            "description": "Specifies the processing type used for serving the request.\n  - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n  - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n  - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.\n  - When not set, the default behavior is 'auto'.\n\n  When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n",
            "enum": [
              "auto",
              "default",
              "flex",
              "scale",
              "priority"
            ],
            "default": "auto"
          },
          {
            "type": "null"
          }
        ]
      },
      "BetaSkillReferenceParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "skill_reference"
            ],
            "description": "References a skill created with the /v1/skills endpoint.",
            "default": "skill_reference",
            "x-stainless-const": true
          },
          "skill_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "The ID of the referenced skill."
          },
          "version": {
            "type": "string",
            "description": "Optional skill version. Use a positive integer or 'latest'. Omit for default."
          }
        },
        "type": "object",
        "required": [
          "type",
          "skill_id"
        ]
      },
      "BetaSpecificApplyPatchParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "apply_patch"
            ],
            "description": "The tool to call. Always `apply_patch`.",
            "default": "apply_patch",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Specific apply patch tool choice",
        "description": "Forces the model to call the apply_patch tool when executing a tool call."
      },
      "BetaSpecificFunctionShellParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "shell"
            ],
            "description": "The tool to call. Always `shell`.",
            "default": "shell",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Specific shell tool choice",
        "description": "Forces the model to call the shell tool when a tool call is required."
      },
      "BetaSpecificProgrammaticToolCallingParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "programmatic_tool_calling"
            ],
            "description": "The tool to call. Always `programmatic_tool_calling`.",
            "default": "programmatic_tool_calling",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "BetaSummaryTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "summary_text"
            ],
            "description": "The type of the object. Always `summary_text`.",
            "default": "summary_text",
            "x-stainless-const": true
          },
          "text": {
            "type": "string",
            "description": "A summary of the reasoning output from the model so far."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "Summary text",
        "description": "A summary text from the model."
      },
      "BetaTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "text"
            ],
            "default": "text",
            "x-stainless-const": true
          },
          "text": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "Text Content",
        "description": "A text content."
      },
      "BetaTextResponseFormatConfiguration": {
        "description": "An object specifying the format that the model must output.\n\nConfiguring `{ \"type\": \"json_schema\" }` enables Structured Outputs, \nwhich ensures the model will match your supplied JSON schema. Learn more in the \n[Structured Outputs guide](/docs/guides/structured-outputs).\n\nThe default format is `{ \"type\": \"text\" }` with no additional options.\n\n**Not recommended for gpt-4o and newer models:**\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n",
        "oneOf": [
          {
            "$ref": "#/$defs/BetaResponseFormatText"
          },
          {
            "$ref": "#/$defs/BetaTextResponseFormatJsonSchema"
          },
          {
            "$ref": "#/$defs/BetaResponseFormatJsonObject"
          }
        ]
      },
      "BetaTextResponseFormatJsonSchema": {
        "type": "object",
        "title": "JSON schema",
        "description": "JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](/docs/guides/structured-outputs).\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of response format being defined. Always `json_schema`.",
            "enum": [
              "json_schema"
            ],
            "x-stainless-const": true
          },
          "description": {
            "type": "string",
            "description": "A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n"
          },
          "name": {
            "type": "string",
            "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n"
          },
          "schema": {
            "$ref": "#/$defs/BetaResponseFormatJsonSchemaSchema"
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean",
                "default": false,
                "description": "Whether to enable strict schema adherence when generating the output.\nIf set to true, the model will always follow the exact schema defined\nin the `schema` field. Only a subset of JSON Schema is supported when\n`strict` is `true`. To learn more, read the [Structured Outputs\nguide](/docs/guides/structured-outputs).\n"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "schema",
          "name"
        ]
      },
      "BetaTool": {
        "description": "A tool that can be used to generate a response.\n",
        "discriminator": {
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/$defs/BetaFunctionTool"
          },
          {
            "$ref": "#/$defs/BetaFileSearchTool"
          },
          {
            "$ref": "#/$defs/BetaComputerTool"
          },
          {
            "$ref": "#/$defs/BetaComputerUsePreviewTool"
          },
          {
            "$ref": "#/$defs/BetaWebSearchTool"
          },
          {
            "$ref": "#/$defs/BetaMCPTool"
          },
          {
            "$ref": "#/$defs/BetaCodeInterpreterTool"
          },
          {
            "$ref": "#/$defs/BetaProgrammaticToolCallingParam"
          },
          {
            "$ref": "#/$defs/BetaImageGenTool"
          },
          {
            "$ref": "#/$defs/BetaLocalShellToolParam"
          },
          {
            "$ref": "#/$defs/BetaFunctionShellToolParam"
          },
          {
            "$ref": "#/$defs/BetaCustomToolParam"
          },
          {
            "$ref": "#/$defs/BetaNamespaceToolParam"
          },
          {
            "$ref": "#/$defs/BetaToolSearchToolParam"
          },
          {
            "$ref": "#/$defs/BetaWebSearchPreviewTool"
          },
          {
            "$ref": "#/$defs/BetaApplyPatchToolParam"
          }
        ]
      },
      "BetaToolCallCaller": {
        "oneOf": [
          {
            "$ref": "#/$defs/BetaDirectToolCallCaller"
          },
          {
            "$ref": "#/$defs/BetaProgramToolCallCaller"
          }
        ],
        "description": "The execution context that produced this tool call.",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "BetaToolCallCallerParam": {
        "oneOf": [
          {
            "$ref": "#/$defs/BetaDirectToolCallCallerParam"
          },
          {
            "$ref": "#/$defs/BetaProgramToolCallCallerParam"
          }
        ],
        "description": "The execution context that produced this tool call.",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "BetaToolChoiceAllowed": {
        "type": "object",
        "title": "Allowed tools",
        "description": "Constrains the tools available to the model to a pre-defined set.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "allowed_tools"
            ],
            "description": "Allowed tool configuration type. Always `allowed_tools`.",
            "x-stainless-const": true
          },
          "mode": {
            "type": "string",
            "enum": [
              "auto",
              "required"
            ],
            "description": "Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n"
          },
          "tools": {
            "type": "array",
            "description": "A list of tool definitions that the model should be allowed to call.\n\nFor the Responses API, the list of tool definitions might look like:\n```json\n[\n  { \"type\": \"function\", \"name\": \"get_weather\" },\n  { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n  { \"type\": \"image_generation\" }\n]\n```\n",
            "items": {
              "type": "object",
              "description": "A tool definition that the model should be allowed to call.\n",
              "additionalProperties": true,
              "x-oaiExpandable": false
            }
          }
        },
        "required": [
          "type",
          "mode",
          "tools"
        ]
      },
      "BetaToolChoiceCustom": {
        "type": "object",
        "title": "Custom tool",
        "description": "Use this option to force the model to call a specific custom tool.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "custom"
            ],
            "description": "For custom tool calling, the type is always `custom`.",
            "x-stainless-const": true
          },
          "name": {
            "type": "string",
            "description": "The name of the custom tool to call."
          }
        },
        "required": [
          "type",
          "name"
        ]
      },
      "BetaToolChoiceFunction": {
        "type": "object",
        "title": "Function tool",
        "description": "Use this option to force the model to call a specific function.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "function"
            ],
            "description": "For function calling, the type is always `function`.",
            "x-stainless-const": true
          },
          "name": {
            "type": "string",
            "description": "The name of the function to call."
          }
        },
        "required": [
          "type",
          "name"
        ]
      },
      "BetaToolChoiceMCP": {
        "type": "object",
        "title": "MCP tool",
        "description": "Use this option to force the model to call a specific tool on a remote MCP server.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "mcp"
            ],
            "description": "For MCP tools, the type is always `mcp`.",
            "x-stainless-const": true
          },
          "server_label": {
            "type": "string",
            "description": "The label of the MCP server to use.\n"
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "description": "The name of the tool to call on the server.\n"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "server_label"
        ]
      },
      "BetaToolChoiceOptions": {
        "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"
        ]
      },
      "BetaToolChoiceParam": {
        "description": "How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call.\n",
        "oneOf": [
          {
            "$ref": "#/$defs/BetaToolChoiceOptions"
          },
          {
            "$ref": "#/$defs/BetaToolChoiceAllowed"
          },
          {
            "$ref": "#/$defs/BetaToolChoiceTypes"
          },
          {
            "$ref": "#/$defs/BetaToolChoiceFunction"
          },
          {
            "$ref": "#/$defs/BetaToolChoiceMCP"
          },
          {
            "$ref": "#/$defs/BetaToolChoiceCustom"
          },
          {
            "$ref": "#/$defs/BetaSpecificProgrammaticToolCallingParam"
          },
          {
            "$ref": "#/$defs/BetaSpecificApplyPatchParam"
          },
          {
            "$ref": "#/$defs/BetaSpecificFunctionShellParam"
          }
        ]
      },
      "BetaToolChoiceTypes": {
        "type": "object",
        "title": "Hosted tool",
        "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](/docs/guides/tools).\n",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of hosted tool the model should to use. Learn more about\n[built-in tools](/docs/guides/tools).\n\nAllowed values are:\n- `file_search`\n- `web_search_preview`\n- `computer`\n- `computer_use_preview`\n- `computer_use`\n- `code_interpreter`\n- `image_generation`\n",
            "enum": [
              "file_search",
              "web_search_preview",
              "computer",
              "computer_use_preview",
              "computer_use",
              "web_search_preview_2025_03_11",
              "image_generation",
              "code_interpreter"
            ]
          }
        },
        "required": [
          "type"
        ]
      },
      "BetaToolSearchCall": {
        "properties": {
          "agent": {
            "$ref": "#/$defs/BetaAgentTag",
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "tool_search_call"
            ],
            "description": "The type of the item. Always `tool_search_call`.",
            "default": "tool_search_call",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the tool search call item."
          },
          "call_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the tool search call generated by the model."
              },
              {
                "type": "null"
              }
            ]
          },
          "execution": {
            "$ref": "#/$defs/BetaToolSearchExecutionType",
            "description": "Whether tool search was executed by the server or by the client."
          },
          "arguments": {
            "description": "Arguments used for the tool search call."
          },
          "status": {
            "$ref": "#/$defs/BetaFunctionCallStatus",
            "description": "The status of the tool search call item that was recorded."
          },
          "created_by": {
            "type": "string",
            "description": "The identifier of the actor that created the item."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "execution",
          "arguments",
          "status"
        ]
      },
      "BetaToolSearchCallItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of this tool search call.",
                "example": "tsc_123"
              },
              {
                "type": "null"
              }
            ]
          },
          "call_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64,
                "minLength": 1,
                "description": "The unique ID of the tool search call generated by the model."
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "tool_search_call"
            ],
            "description": "The item type. Always `tool_search_call`.",
            "default": "tool_search_call",
            "x-stainless-const": true
          },
          "execution": {
            "$ref": "#/$defs/BetaToolSearchExecutionType",
            "description": "Whether tool search was executed by the server or by the client."
          },
          "arguments": {
            "$ref": "#/$defs/BetaEmptyModelParam",
            "description": "The arguments supplied to the tool search call."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaFunctionCallItemStatus",
                "description": "The status of the tool search call."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "arguments"
        ]
      },
      "BetaToolSearchExecutionType": {
        "type": "string",
        "enum": [
          "server",
          "client"
        ]
      },
      "BetaToolSearchOutput": {
        "properties": {
          "agent": {
            "$ref": "#/$defs/BetaAgentTag",
            "description": "The agent that produced this item."
          },
          "type": {
            "type": "string",
            "enum": [
              "tool_search_output"
            ],
            "description": "The type of the item. Always `tool_search_output`.",
            "default": "tool_search_output",
            "x-stainless-const": true
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the tool search output item."
          },
          "call_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of the tool search call generated by the model."
              },
              {
                "type": "null"
              }
            ]
          },
          "execution": {
            "$ref": "#/$defs/BetaToolSearchExecutionType",
            "description": "Whether tool search was executed by the server or by the client."
          },
          "tools": {
            "items": {
              "$ref": "#/$defs/BetaTool"
            },
            "type": "array",
            "description": "The loaded tool definitions returned by tool search."
          },
          "status": {
            "$ref": "#/$defs/BetaFunctionCallOutputStatusEnum",
            "description": "The status of the tool search output item that was recorded."
          },
          "created_by": {
            "type": "string",
            "description": "The identifier of the actor that created the item."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "execution",
          "tools",
          "status"
        ]
      },
      "BetaToolSearchOutputItemParam": {
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/Beta_AgentTagParam",
                "description": "The agent that produced this item."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "The unique ID of this tool search output.",
                "example": "tso_123"
              },
              {
                "type": "null"
              }
            ]
          },
          "call_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64,
                "minLength": 1,
                "description": "The unique ID of the tool search call generated by the model."
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "tool_search_output"
            ],
            "description": "The item type. Always `tool_search_output`.",
            "default": "tool_search_output",
            "x-stainless-const": true
          },
          "execution": {
            "$ref": "#/$defs/BetaToolSearchExecutionType",
            "description": "Whether tool search was executed by the server or by the client."
          },
          "tools": {
            "items": {
              "$ref": "#/$defs/BetaTool"
            },
            "type": "array",
            "description": "The loaded tool definitions returned by the tool search output."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaFunctionCallItemStatus",
                "description": "The status of the tool search output."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "tools"
        ]
      },
      "BetaToolSearchToolParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "tool_search"
            ],
            "description": "The type of the tool. Always `tool_search`.",
            "default": "tool_search",
            "x-stainless-const": true
          },
          "execution": {
            "$ref": "#/$defs/BetaToolSearchExecutionType",
            "description": "Whether tool search is executed by the server or by the client."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "description": "Description shown to the model for a client-executed tool search tool."
              },
              {
                "type": "null"
              }
            ]
          },
          "parameters": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaEmptyModelParam",
                "description": "Parameter schema for a client-executed tool search tool."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Tool search tool",
        "description": "Hosted or BYOT tool search configuration for deferred tools."
      },
      "BetaToolsArray": {
        "type": "array",
        "description": "An array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter.\n\nWe support the following categories of tools:\n- **Built-in tools**: Tools that are provided by OpenAI that extend the\n  model's capabilities, like [web search](/docs/guides/tools-web-search)\n  or [file search](/docs/guides/tools-file-search). Learn more about\n  [built-in tools](/docs/guides/tools).\n- **MCP Tools**: Integrations with third-party systems via custom MCP servers\n  or predefined connectors such as Google Drive and SharePoint. Learn more about\n  [MCP Tools](/docs/guides/tools-connectors-mcp).\n- **Function calls (custom tools)**: Functions that are defined by you,\n  enabling the model to call your own code with strongly typed arguments\n  and outputs. Learn more about\n  [function calling](/docs/guides/function-calling). You can also use\n  custom tools to call your own code.\n",
        "items": {
          "$ref": "#/$defs/BetaTool"
        }
      },
      "BetaTopLogProb": {
        "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."
      },
      "BetaTypeParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "type"
            ],
            "description": "Specifies the event type. For a type action, this property is always set to `type`.",
            "default": "type",
            "x-stainless-const": true
          },
          "text": {
            "type": "string",
            "description": "The text to type."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "Type",
        "description": "An action to type in text."
      },
      "BetaUrlCitationBody": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "url_citation"
            ],
            "description": "The type of the URL citation. Always `url_citation`.",
            "default": "url_citation",
            "x-stainless-const": true
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the web resource."
          },
          "start_index": {
            "type": "integer",
            "description": "The index of the first character of the URL citation in the message."
          },
          "end_index": {
            "type": "integer",
            "description": "The index of the last character of the URL citation in the message."
          },
          "title": {
            "type": "string",
            "description": "The title of the web resource."
          }
        },
        "type": "object",
        "required": [
          "type",
          "url",
          "start_index",
          "end_index",
          "title"
        ],
        "title": "URL citation",
        "description": "A citation for a web resource used to generate a model response."
      },
      "BetaUrlCitationParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "url_citation"
            ],
            "description": "The citation type. Always `url_citation`.",
            "default": "url_citation",
            "x-stainless-const": true
          },
          "start_index": {
            "type": "integer",
            "minimum": 0,
            "description": "The index of the first character of the citation in the message."
          },
          "end_index": {
            "type": "integer",
            "minimum": 0,
            "description": "The index of the last character of the citation in the message."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the cited resource."
          },
          "title": {
            "type": "string",
            "description": "The title of the cited resource."
          }
        },
        "type": "object",
        "required": [
          "type",
          "start_index",
          "end_index",
          "url",
          "title"
        ]
      },
      "BetaVectorStoreFileAttributes": {
        "anyOf": [
          {
            "type": "object",
            "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n",
            "maxProperties": 16,
            "propertyNames": {
              "type": "string",
              "maxLength": 64
            },
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "string",
                  "maxLength": 512
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "x-oaiTypeLabel": "map"
          },
          {
            "type": "null"
          }
        ]
      },
      "BetaVerbosity": {
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "default": "medium",
            "description": "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`. The default is\n`medium`.\n"
          },
          {
            "type": "null"
          }
        ]
      },
      "BetaWaitParam": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "wait"
            ],
            "description": "Specifies the event type. For a wait action, this property is always set to `wait`.",
            "default": "wait",
            "x-stainless-const": true
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Wait",
        "description": "A wait action."
      },
      "BetaWebSearchActionFind": {
        "type": "object",
        "title": "Find action",
        "description": "Action type \"find_in_page\": Searches for a pattern within a loaded page.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "find_in_page"
            ],
            "description": "The action type.\n",
            "x-stainless-const": true
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the page searched for the pattern.\n"
          },
          "pattern": {
            "type": "string",
            "description": "The pattern or text to search for within the page.\n"
          }
        },
        "required": [
          "type",
          "url",
          "pattern"
        ]
      },
      "BetaWebSearchActionOpenPage": {
        "type": "object",
        "title": "Open page action",
        "description": "Action type \"open_page\" - Opens a specific URL from search results.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "open_page"
            ],
            "description": "The action type.\n",
            "x-stainless-const": true
          },
          "url": {
            "description": "The URL opened by the model.\n",
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "type"
        ]
      },
      "BetaWebSearchActionSearch": {
        "type": "object",
        "title": "Search action",
        "description": "Action type \"search\" - Performs a web search query.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "search"
            ],
            "description": "The action type.\n",
            "x-stainless-const": true
          },
          "query": {
            "type": "string",
            "deprecated": true,
            "description": "The search query.\n"
          },
          "queries": {
            "type": "array",
            "title": "Search queries",
            "description": "The search queries.\n",
            "items": {
              "type": "string",
              "description": "A search query.\n"
            }
          },
          "sources": {
            "type": "array",
            "title": "Web search sources",
            "description": "The sources used in the search.\n",
            "items": {
              "type": "object",
              "title": "Web search source",
              "description": "A source used in the search.\n",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "url"
                  ],
                  "description": "The type of source. Always `url`.\n",
                  "x-stainless-const": true
                },
                "url": {
                  "type": "string",
                  "format": "uri",
                  "description": "The URL of the source.\n"
                }
              },
              "required": [
                "type",
                "url"
              ]
            }
          }
        },
        "required": [
          "type"
        ]
      },
      "BetaWebSearchApproximateLocation": {
        "anyOf": [
          {
            "type": "object",
            "title": "Web search approximate location",
            "description": "The approximate location of the user.\n",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "approximate"
                ],
                "description": "The type of location approximation. Always `approximate`.",
                "default": "approximate",
                "x-stainless-const": true
              },
              "country": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "region": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Free text input for the region of the user, e.g. `California`."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "city": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Free text input for the city of the user, e.g. `San Francisco`."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "timezone": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "BetaWebSearchPreviewTool": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "web_search_preview",
              "web_search_preview_2025_03_11"
            ],
            "description": "The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.",
            "default": "web_search_preview",
            "x-stainless-const": true
          },
          "user_location": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaApproximateLocation",
                "description": "The user's location."
              },
              {
                "type": "null"
              }
            ]
          },
          "search_context_size": {
            "$ref": "#/$defs/BetaSearchContextSize",
            "description": "High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."
          },
          "search_content_types": {
            "items": {
              "$ref": "#/$defs/BetaSearchContentType"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Web search preview",
        "description": "This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search)."
      },
      "BetaWebSearchTool": {
        "type": "object",
        "title": "Web search",
        "description": "Search the Internet for sources related to the prompt. Learn more about the\n[web search tool](/docs/guides/tools-web-search).\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "web_search",
              "web_search_2025_08_26"
            ],
            "description": "The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.",
            "default": "web_search"
          },
          "filters": {
            "anyOf": [
              {
                "type": "object",
                "description": "Filters for the search.\n",
                "properties": {
                  "allowed_domains": {
                    "anyOf": [
                      {
                        "type": "array",
                        "title": "Allowed domains for the search.",
                        "description": "Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well.\n\nExample: `[\"pubmed.ncbi.nlm.nih.gov\"]`\n",
                        "items": {
                          "type": "string",
                          "description": "Allowed domain for the search."
                        },
                        "default": []
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "user_location": {
            "$ref": "#/$defs/BetaWebSearchApproximateLocation"
          },
          "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"
        ]
      },
      "BetaWebSearchToolCall": {
        "type": "object",
        "title": "Web search tool call",
        "description": "The results of a web search tool call. See the\n[web search guide](/docs/guides/tools-web-search) for more information.\n",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/$defs/BetaAgentTag"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that produced this item."
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the web search tool call.\n"
          },
          "type": {
            "type": "string",
            "enum": [
              "web_search_call"
            ],
            "description": "The type of the web search tool call. Always `web_search_call`.\n",
            "x-stainless-const": true
          },
          "status": {
            "type": "string",
            "description": "The status of the web search tool call.\n",
            "enum": [
              "in_progress",
              "searching",
              "completed",
              "failed"
            ]
          },
          "action": {
            "type": "object",
            "description": "An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find_in_page).\n",
            "oneOf": [
              {
                "$ref": "#/$defs/BetaWebSearchActionSearch"
              },
              {
                "$ref": "#/$defs/BetaWebSearchActionOpenPage"
              },
              {
                "$ref": "#/$defs/BetaWebSearchActionFind"
              }
            ],
            "discriminator": {
              "propertyName": "type"
            }
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "action"
        ]
      },
      "Beta_AgentTagParam": {
        "properties": {
          "agent_name": {
            "type": "string",
            "description": "The canonical name of the agent that produced this item."
          }
        },
        "type": "object",
        "required": [
          "agent_name"
        ],
        "description": "The agent that produced this item.",
        "x-oai-beta": "responses_multi_agent=v1"
      }
    }
  }
}

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"openai","endpointId":"responses?beta=true","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}