> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a model response

> Creates a model response. Provide [text](https://developers.openai.com/api/docs/guides/text) or
[image](https://developers.openai.com/api/docs/guides/images-vision) inputs to generate [text](https://developers.openai.com/api/docs/guides/text)
or [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) outputs. Have the model call
your own [custom code](https://developers.openai.com/api/docs/guides/function-calling) or use built-in
[tools](https://developers.openai.com/api/docs/guides/tools) like [web search](https://developers.openai.com/api/docs/guides/tools-web-search)
or [file search](https://developers.openai.com/api/docs/guides/tools-file-search) to use your own data
as input for the model's response.




## OpenAPI

````yaml /openapi/en/openai-responses.json post /v1/responses
openapi: 3.1.0
info:
  title: OpenAI Responses
  version: v1
  description: >-
    Call GPT models with the OpenAI Responses protocol: text and image input,
    reasoning effort, streaming events, function calling and structured output.
servers:
  - url: https://api.dreamto.ai
security:
  - bearerAuth: []
tags:
  - name: Responses
paths:
  /v1/responses:
    post:
      tags:
        - Responses
      summary: Create a model response
      description: >
        Creates a model response. Provide
        [text](https://developers.openai.com/api/docs/guides/text) or

        [image](https://developers.openai.com/api/docs/guides/images-vision)
        inputs to generate
        [text](https://developers.openai.com/api/docs/guides/text)

        or
        [JSON](https://developers.openai.com/api/docs/guides/structured-outputs)
        outputs. Have the model call

        your own [custom
        code](https://developers.openai.com/api/docs/guides/function-calling) or
        use built-in

        [tools](https://developers.openai.com/api/docs/guides/tools) like [web
        search](https://developers.openai.com/api/docs/guides/tools-web-search)

        or [file
        search](https://developers.openai.com/api/docs/guides/tools-file-search)
        to use your own data

        as input for the model's response.
      operationId: createResponse
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateResponse'
            examples:
              Basic request:
                summary: Basic request
                description: '`input` can be a plain string.'
                value:
                  model: gpt-6.2-sol
                  input: Explain quantum computing in three sentences.
              Instructions and multi-turn input:
                summary: Instructions and multi-turn input
                description: >-
                  `instructions` is the system prompt; pass `input` as a message
                  array to include earlier turns.
                value:
                  model: gpt-6.2-sol
                  instructions: You are a concise, professional assistant.
                  input:
                    - role: user
                      content: Suggest a name for a coffee shop.
                    - role: assistant
                      content: How about "Morning Light Coffee"?
                    - role: user
                      content: Now add a tagline for that name.
              Streaming:
                summary: Streaming
                description: >-
                  With `stream: true` the API returns typed SSE events such as
                  `response.output_text.delta`, ending with
                  `response.completed`.
                value:
                  model: gpt-6.2-sol
                  stream: true
                  input: Write a four-line poem about autumn.
              Reasoning effort:
                summary: Reasoning effort
                description: '`reasoning.effort` controls how deeply the model thinks.'
                value:
                  model: gpt-6.2-astra
                  reasoning:
                    effort: high
                  input: >-
                    Prove that among any five integers there are three whose sum
                    is divisible by 3.
              Image input:
                summary: Image input
                description: >-
                  Use an `input_image` content item with an image URL or a
                  Base64 data URL.
                value:
                  model: gpt-6.1-terra
                  input:
                    - role: user
                      content:
                        - type: input_text
                          text: What is in this image?
                        - type: input_image
                          image_url: https://your-cdn.example.com/photo.jpg
              Function calling:
                summary: Function calling
                description: >-
                  The model returns a `function_call` item in `output` when it
                  needs outside data; send the result back as a
                  `function_call_output` item.
                value:
                  model: gpt-6.2-sol
                  input: What's the weather like in Hangzhou today?
                  tools:
                    - type: function
                      name: get_weather
                      description: Get the current weather for a city
                      parameters:
                        type: object
                        properties:
                          city:
                            type: string
                            description: City name, e.g. Hangzhou
                          unit:
                            type: string
                            enum:
                              - celsius
                              - fahrenheit
                        required:
                          - city
              Structured output:
                summary: Structured output
                description: '`text.format` makes the model answer in a JSON Schema.'
                value:
                  model: gpt-6.2-sol
                  input: >-
                    Extract the contact from this sentence: I'm Li Lei from
                    Galaxy Tech, lilei@example.com.
                  text:
                    format:
                      type: json_schema
                      name: contact
                      strict: true
                      schema:
                        type: object
                        properties:
                          name:
                            type: string
                          company:
                            type: string
                          email:
                            type: string
                        required:
                          - name
                          - company
                          - email
                        additionalProperties: false
      responses:
        '200':
          description: >-
            A Response object for a non-streaming request; with `stream: true`,
            server-sent events (`text/event-stream`), each a
            `ResponseStreamEvent`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/ResponseStreamEvent'
        '400':
          description: >-
            Invalid request: malformed JSON, a missing required field, or a
            parameter the chosen model does not support. Fix it as `message`
            says and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: invalid_request
                      http_status: 400
                      message: Invalid request.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: invalid_request_error
        '401':
          description: The API Key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: unauthorized
                      http_status: 401
                      message: Unauthorized.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: authentication_error
        '402':
          description: Insufficient balance; top up and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: insufficient_balance
                      http_status: 402
                      message: Insufficient balance.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: insufficient_balance_error
        '403':
          description: This API Key is not allowed to use the model.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: forbidden
                      http_status: 403
                      message: Access denied.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: permission_error
        '404':
          description: The model does not exist or is not available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: not_found
                      http_status: 404
                      message: The requested model was not found.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: invalid_request_error
        '429':
          description: Rate limit exceeded; back off and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: rate_limit_exceeded
                      http_status: 429
                      message: Rate limit exceeded. Please try again later.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: rate_limit_error
        '500':
          description: Internal error; retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: api_error
                      http_status: 500
                      message: Internal server error.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: api_error
        '503':
          description: Service temporarily unavailable or timed out; retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: service_unavailable
                      http_status: 503
                      message: Service temporarily unavailable. Please try again later.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: api_error
components:
  schemas:
    CreateResponse:
      allOf:
        - $ref: '#/components/schemas/CreateModelResponseProperties'
        - $ref: '#/components/schemas/ResponseProperties'
        - type: object
          properties:
            access_programs:
              $ref: '#/components/schemas/AccessProgramsParam'
            image:
              $ref: '#/components/schemas/ImageOptionsParam'
            prompt_cache_options:
              $ref: '#/components/schemas/ResponsePromptCacheOptionsParam'
            service_tier:
              $ref: '#/components/schemas/ServiceTierResponses'
            truncation:
              deprecated: true
              anyOf:
                - type: string
                  description: >
                    The truncation strategy to use for the model response.

                    - `auto`: If the input to this Response exceeds
                      the model's context window size, the model will truncate the
                      response to fit the context window by dropping items from the beginning of the conversation.
                      On some models, trimming can begin earlier because the API subtracts the model's
                      maximum output allowance from its input limit, even if you set a lower `max_output_tokens`.
                    - `disabled` (default): If the input size will exceed the
                    context window
                      size for a model, the request will fail with a 400 error.
                  enum:
                    - auto
                    - disabled
                  default: disabled
                - type: 'null'
            reasoning:
              anyOf:
                - $ref: '#/components/schemas/Reasoning'
                - type: 'null'
            input:
              $ref: '#/components/schemas/InputParam'
            include:
              anyOf:
                - type: array
                  description: >-
                    Specify additional output data to include in the model
                    response. Currently supported values are:

                    - `web_search_call.action.sources`: Include the sources of
                    the web search tool call.

                    - `code_interpreter_call.outputs`: Includes the outputs of
                    python code execution in code interpreter tool call items.

                    - `computer_call_output.output.image_url`: Include image
                    urls from the computer call output.

                    - `file_search_call.results`: Include the search results of
                    the file search tool call.

                    - `message.input_image.image_url`: Include image urls from
                    the input message.

                    - `message.output_text.logprobs`: Include logprobs with
                    assistant messages.

                    - `reasoning.encrypted_content`: Includes an encrypted
                    version of reasoning tokens in reasoning item outputs. This
                    enables reasoning items to be used in multi-turn
                    conversations when using the Responses API statelessly (like
                    when the `store` parameter is set to `false`, or when an
                    organization is enrolled in the zero data retention
                    program).
                  items:
                    $ref: '#/components/schemas/IncludeEnum'
                - type: 'null'
            parallel_tool_calls:
              anyOf:
                - type: boolean
                  description: |
                    Whether to allow the model to run tool calls in parallel.
                  default: true
                - type: 'null'
            store:
              anyOf:
                - type: boolean
                  description: >
                    Whether to store the generated model response for later
                    retrieval via

                    API.

                    Defaults to true when omitted.

                    If set to true, response data will be stored for at least 30
                    days, subject to the [data retention
                    exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses).
                  default: true
                - type: 'null'
            instructions:
              anyOf:
                - type: string
                  description: >
                    A system (or developer) message inserted into the model's
                    context.


                    When using along with `previous_response_id`, the
                    instructions from a previous

                    response will not be carried over to the next response. This
                    makes it simple

                    to swap out system (or developer) messages in new responses.
                - type: 'null'
            moderation:
              anyOf:
                - $ref: '#/components/schemas/ModerationParam'
                  description: >
                    Configuration for running moderation on the input and output
                    of this response.
                - type: 'null'
            stream:
              anyOf:
                - description: >
                    If set to true, the model response data will be streamed to
                    the client

                    as it is generated using [server-sent
                    events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).

                    See the [Streaming section
                    below](https://developers.openai.com/api/reference/resources/responses/streaming-events)

                    for more information.
                  type: boolean
                  default: false
                - type: 'null'
            stream_options:
              $ref: '#/components/schemas/ResponseStreamOptions'
            conversation:
              anyOf:
                - $ref: '#/components/schemas/ConversationParam'
                - type: 'null'
            context_management:
              anyOf:
                - type: array
                  example:
                    - type: compaction
                      compact_threshold: 1000
                  description: |
                    Context management configuration for this request.
                  minItems: 1
                  items:
                    $ref: '#/components/schemas/ContextManagementParam'
                - 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](https://developers.openai.com/api/docs/guides/reasoning).
                  type: integer
                  minimum: 16
                - type: 'null'
    Response:
      title: The response object
      allOf:
        - $ref: '#/components/schemas/ModelResponseProperties'
        - $ref: '#/components/schemas/ResponseProperties'
        - type: object
          properties:
            image:
              $ref: '#/components/schemas/ResolvedImageOptions'
            service_tier:
              $ref: '#/components/schemas/ServiceTierResponses'
            truncation:
              anyOf:
                - type: string
                  description: >
                    The truncation strategy to use for the model response.

                    - `auto`: If the input to this Response exceeds
                      the model's context window size, the model will truncate the
                      response to fit the context window by dropping items from the beginning of the conversation.
                      On some models, trimming can begin earlier because the API subtracts the model's
                      maximum output allowance from its input limit, even if you set a lower `max_output_tokens`.
                    - `disabled` (default): If the input size will exceed the
                    context window
                      size for a model, the request will fail with a 400 error.
                  enum:
                    - auto
                    - disabled
                  default: disabled
                - type: 'null'
            id:
              type: string
              description: |
                Unique identifier for this Response.
            object:
              type: string
              description: |
                The object type of this resource - always set to `response`.
              const: response
            status:
              type: string
              description: >
                The status of the response generation. One of `completed`,
                `failed`,

                `in_progress`, `cancelled`, `queued`, or `incomplete`.
              enum:
                - completed
                - failed
                - in_progress
                - cancelled
                - queued
                - incomplete
            access_programs:
              anyOf:
                - $ref: '#/components/schemas/AccessProgramsBody'
                - type: 'null'
            created_at:
              type: number
              format: unixtime
              description: |
                Unix timestamp (in seconds) of when this Response was created.
            completed_at:
              anyOf:
                - type: number
                  format: unixtime
                  description: >
                    Unix timestamp (in seconds) of when this Response was
                    completed.

                    Only present when the status is `completed`.
                - type: 'null'
            error:
              $ref: '#/components/schemas/ResponseError'
            incomplete_details:
              anyOf:
                - type: object
                  description: |
                    Details about why the response is incomplete.
                  properties:
                    reason:
                      type: string
                      description: >
                        The reason why the response is incomplete. `steered`
                        means

                        the response stopped at a safe output boundary after a

                        WebSocket `response.steer` event. The server can then
                        create

                        a successor response automatically with the queued
                        input.
                      enum:
                        - max_output_tokens
                        - max_messages
                        - content_filter
                        - steered
                - type: 'null'
            input_transformations:
              type: array
              description: Reasoning inputs withheld from the model, in input order.
              items:
                $ref: '#/components/schemas/ReasoningInputTransformation'
            output:
              type: array
              description: >
                An array of content items generated by the model.


                - The length and order of items in the `output` array is
                dependent
                  on the model's response.
                - Rather than accessing the first item in the `output` array and
                  assuming it's an `assistant` message with the content generated by
                  the model, you might consider using the `output_text` property where
                  supported in SDKs.
              items:
                $ref: '#/components/schemas/OutputItem'
            reasoning:
              anyOf:
                - $ref: '#/components/schemas/Reasoning'
                - type: 'null'
            instructions:
              anyOf:
                - description: >
                    A system (or developer) message inserted into the model's
                    context.


                    When using along with `previous_response_id`, the
                    instructions from a previous

                    response will not be carried over to the next response. This
                    makes it simple

                    to swap out system (or developer) messages in new responses.
                  oneOf:
                    - type: string
                      description: >
                        A text input to the model, equivalent to a text input
                        with the

                        `developer` role.
                    - type: array
                      title: Input item list
                      description: >
                        A list of one or many input items to the model,
                        containing

                        different content types.
                      items:
                        $ref: '#/components/schemas/InputItem'
                - type: 'null'
            output_text:
              anyOf:
                - type: string
                  description: >
                    SDK-only convenience property that contains the aggregated
                    text output

                    from all `output_text` items in the `output` array, if any
                    are present.

                    Supported in the Python and JavaScript SDKs.
                - type: 'null'
            usage:
              anyOf:
                - $ref: '#/components/schemas/ResponseUsage'
                - type: 'null'
            tool_usage:
              $ref: '#/components/schemas/ResponseToolUsage'
              description: >
                Usage reported by hosted tools, separate from base model
                `usage`. The field

                can be omitted when tool usage is unavailable. When present,
                tool families

                with no recorded usage have zero counts.


                `image_gen` sums available token counts across image generation
                calls.

                Calls with missing or incomplete usage records may be skipped.
                Output

                token details and cached input counts can be omitted. An omitted
                cache

                count means cache usage is unknown.


                `web_search.num_requests` counts billable searches. Discounted
                searches

                and actions such as opening a page are excluded. Use billing
                records to

                reconcile final charges.
            prompt_cache_options:
              $ref: '#/components/schemas/PromptCacheOptions'
            prompt_cache_diagnostics:
              $ref: '#/components/schemas/PromptCacheDiagnostics'
            moderation:
              anyOf:
                - $ref: '#/components/schemas/Moderation'
                  description: >
                    Moderation results for the response input and output, if
                    moderated completions were requested.
                - type: 'null'
            parallel_tool_calls:
              type: boolean
              description: |
                Whether to allow the model to run tool calls in parallel.
              default: true
            conversation:
              anyOf:
                - $ref: '#/components/schemas/ResponseConversation'
                  default: null
                - 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](https://developers.openai.com/api/docs/guides/reasoning).
                  type: integer
                - type: 'null'
          required:
            - access_programs
            - 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
        access_programs: null
        created_at: 1741476777
        status: completed
        completed_at: 1741476778
        error: null
        incomplete_details: null
        instructions: null
        max_output_tokens: null
        model: gpt-6.2-astra
        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: []
                logprobs: []
        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
        tool_usage:
          image_gen:
            input_tokens: 0
            input_tokens_details:
              text_tokens: 0
              image_tokens: 0
            output_tokens: 0
            output_tokens_details:
              text_tokens: 0
              image_tokens: 0
            total_tokens: 0
          web_search:
            num_requests: 0
        user: null
        metadata: {}
    ResponseStreamEvent:
      description: Event emitted while a response is streamed.
      anyOf:
        - $ref: '#/components/schemas/ResponseAudioDeltaEvent'
        - $ref: '#/components/schemas/ResponseAudioDoneEvent'
        - $ref: '#/components/schemas/ResponseAudioTranscriptDeltaEvent'
        - $ref: '#/components/schemas/ResponseAudioTranscriptDoneEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDeltaEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDoneEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCompletedEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallInProgressEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallInterpretingEvent'
        - $ref: '#/components/schemas/ResponseCompactionCompactingStreamingEvent'
        - $ref: '#/components/schemas/ResponseCompletedEvent'
        - $ref: '#/components/schemas/ResponseContentPartAddedEvent'
        - $ref: '#/components/schemas/ResponseContentPartDoneEvent'
        - $ref: '#/components/schemas/ResponseCreatedEvent'
        - $ref: '#/components/schemas/ResponseErrorEvent'
        - $ref: '#/components/schemas/ResponseFileSearchCallCompletedEvent'
        - $ref: '#/components/schemas/ResponseFileSearchCallInProgressEvent'
        - $ref: '#/components/schemas/ResponseFileSearchCallSearchingEvent'
        - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent'
        - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDoneEvent'
        - $ref: '#/components/schemas/ResponseShellCallCommandAddedStreamingEvent'
        - $ref: '#/components/schemas/ResponseShellCallCommandDeltaStreamingEvent'
        - $ref: '#/components/schemas/ResponseShellCallCommandDoneStreamingEvent'
        - $ref: >-
            #/components/schemas/ResponseShellCallOutputContentDeltaStreamingEvent
        - $ref: >-
            #/components/schemas/ResponseShellCallOutputContentDoneStreamingEvent
        - $ref: '#/components/schemas/ResponseInProgressEvent'
        - $ref: '#/components/schemas/ResponseFailedEvent'
        - $ref: '#/components/schemas/ResponseIncompleteEvent'
        - $ref: '#/components/schemas/ResponseOutputItemAddedEvent'
        - $ref: '#/components/schemas/ResponseOutputItemDoneEvent'
        - $ref: '#/components/schemas/ResponseReasoningSummaryPartAddedEvent'
        - $ref: '#/components/schemas/ResponseReasoningSummaryPartDoneEvent'
        - $ref: '#/components/schemas/ResponseReasoningSummaryTextDeltaEvent'
        - $ref: '#/components/schemas/ResponseReasoningSummaryTextDoneEvent'
        - $ref: '#/components/schemas/ResponseReasoningTextDeltaEvent'
        - $ref: '#/components/schemas/ResponseReasoningTextDoneEvent'
        - $ref: '#/components/schemas/ResponseRefusalDeltaEvent'
        - $ref: '#/components/schemas/ResponseRefusalDoneEvent'
        - $ref: '#/components/schemas/ResponseTextDeltaEvent'
        - $ref: '#/components/schemas/ResponseTextDoneEvent'
        - $ref: '#/components/schemas/ResponseWebSearchCallCompletedEvent'
        - $ref: '#/components/schemas/ResponseWebSearchCallInProgressEvent'
        - $ref: '#/components/schemas/ResponseWebSearchCallSearchingEvent'
        - $ref: '#/components/schemas/ResponseImageGenCallCompletedEvent'
        - $ref: '#/components/schemas/ResponseImageGenCallGeneratingEvent'
        - $ref: '#/components/schemas/ResponseImageGenCallInProgressEvent'
        - $ref: '#/components/schemas/ResponseImageGenCallPartialImageEvent'
        - $ref: '#/components/schemas/ResponseMCPCallArgumentsDeltaEvent'
        - $ref: '#/components/schemas/ResponseMCPCallArgumentsDoneEvent'
        - $ref: '#/components/schemas/ResponseMCPCallCompletedEvent'
        - $ref: '#/components/schemas/ResponseMCPCallFailedEvent'
        - $ref: '#/components/schemas/ResponseMCPCallInProgressEvent'
        - $ref: '#/components/schemas/ResponseMCPListToolsCompletedEvent'
        - $ref: '#/components/schemas/ResponseMCPListToolsFailedEvent'
        - $ref: '#/components/schemas/ResponseMCPListToolsInProgressEvent'
        - $ref: '#/components/schemas/ResponseOutputTextAnnotationAddedEvent'
        - $ref: '#/components/schemas/ResponseQueuedEvent'
        - $ref: '#/components/schemas/ResponseCustomToolCallInputDeltaEvent'
        - $ref: '#/components/schemas/ResponseCustomToolCallInputDoneEvent'
      discriminator:
        propertyName: type
    GatewayError:
      type: object
      description: Error response.
      properties:
        error:
          type: object
          description: Error details.
          properties:
            code:
              type: string
              description: >-
                Error code, for example `invalid_request`, `unauthorized`,
                `insufficient_balance` or `rate_limit_exceeded`. In a few
                parameter errors returned by the model side directly it is the
                numeric status code.
            http_status:
              type: integer
              description: >-
                Same as the HTTP status code of the response; a few errors
                returned by the model side directly omit it.
            message:
              type: string
              description: >-
                Error description. Branch on the status code and `code`, not on
                this text.
            request_id:
              type: string
              description: >-
                ID of this request, also returned in the `X-Request-Id` header;
                include it when reporting a problem. A few errors omit it, so
                prefer the header.
            type:
              type: string
              description: >-
                Error category, for example `invalid_request_error`,
                `authentication_error`, `rate_limit_error` or `api_error`; a few
                errors omit it.
          required:
            - code
            - message
      required:
        - error
    CreateModelResponseProperties:
      allOf:
        - $ref: '#/components/schemas/ModelResponseProperties'
        - type: object
          properties:
            top_logprobs:
              description: >
                An integer between 0 and 20 specifying the maximum number of
                most likely

                tokens to return at each token position, each with an associated
                log

                probability. In some cases, the number of returned tokens may be
                fewer than

                requested.
              type: integer
              minimum: 0
              maximum: 20
    ResponseProperties:
      type: object
      properties:
        previous_response_id:
          anyOf:
            - type: string
              description: >
                The unique ID of the previous response to the model. Use this to

                create multi-turn conversations. Learn more about

                [conversation
                state](https://developers.openai.com/api/docs/guides/conversation-state).
                Cannot be used in conjunction with `conversation`.
            - type: 'null'
        model:
          type: string
          description: >-
            ID of the model to use, for example `gpt-6.2-sol`. See
            [Models](/en/llm/openai-responses) for the available models.
          example: gpt-6.2-sol
        background:
          anyOf:
            - type: boolean
              description: >
                Whether to run the model response in the background.

                [Learn
                more](https://developers.openai.com/api/docs/guides/background).
              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.
              type: integer
            - type: 'null'
        text:
          $ref: '#/components/schemas/ResponseTextParam'
        tools:
          $ref: '#/components/schemas/ToolsArray'
        tool_choice:
          $ref: '#/components/schemas/ToolChoiceParam'
        prompt:
          $ref: '#/components/schemas/Prompt'
    AccessProgramsParam:
      properties:
        cyber:
          $ref: '#/components/schemas/CyberAccessProgramEnum'
          description: >-
            The Cyber access program to use for this request. Supported values
            are `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the
            API resolves the program from the model's Cyber tier and your
            organization and project access, subject to model-specific
            eligibility restrictions. By default, models without a Cyber tier
            use Standard. Blue-tier models use Daybreak Blue when authorized;
            otherwise they fall back to Standard unless the model requires
            Daybreak access. Red-tier models use Daybreak Red and require
            authorization. Requests that require unavailable Daybreak access
            return 403. An implicit Standard fallback is represented by null in
            the response's access_programs field, rather than an explicit
            Standard selection.
      additionalProperties: false
      type: object
      required: []
      description: Domain-specific access programs to use for this request.
    ImageOptionsParam:
      properties:
        context_compression:
          $ref: '#/components/schemas/ImageContextCompression'
          description: >-
            Controls image context optimization. Defaults to `auto`, which uses
            the model, transport, and input to select a policy. Use `enabled` to
            require compression support or `disabled` to turn it off.
      additionalProperties: false
      type: object
      required: []
      description: Request level image options.
    ResponsePromptCacheOptionsParam:
      properties:
        ttl:
          type: string
          enum:
            - 30m
            - 12h
          description: >-
            The minimum lifetime applied to every implicit and explicit cache
            breakpoint written by the request. Supported values are `30m` (the
            default) and `12h`. The backend may retain cache entries for longer.
        mode:
          $ref: '#/components/schemas/PromptCacheModeEnum'
          description: >-
            Controls whether OpenAI automatically creates an implicit cache
            breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates
            one implicit breakpoint and writes up to the latest three explicit
            breakpoints in the request. With `explicit`, OpenAI does not create
            an implicit breakpoint and writes up to the latest four explicit
            breakpoints. If there are no explicit breakpoints, the request does
            not use prompt caching.
        prewarm:
          type: boolean
          description: >-
            Prepares the prompt cache without generating output. Defaults to
            `false`. When set to `true`, overrides the `generate` field to
            `false`.
        comparison_response_id:
          anyOf:
            - type: string
              description: >-
                The ID of a response to compare when diagnosing prompt cache
                reuse. Supplying this field requests prompt cache diagnostics
                when the feature is enabled.
              example: resp_123
            - type: 'null'
      type: object
      required: []
      title: Prompt cache options
      description: >-
        Options for prompt caching. Supported for `gpt-5.6` and later models. By
        default, OpenAI automatically chooses one implicit cache breakpoint. You
        can add explicit breakpoints to content blocks with
        `prompt_cache_breakpoint`. Each request can write up to four
        breakpoints. For cache matching, OpenAI considers up to the latest 80
        breakpoints in the conversation, without a content-block lookback limit.
        Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl`
        defaults to `30m`. Supported lifetimes depend on the API. See the
        [prompt caching
        guide](https://developers.openai.com/api/docs/guides/prompt-caching) for
        current details.
    ServiceTierResponses:
      anyOf:
        - type: string
          description: |
            Specifies the processing type used for serving the request.
              - 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'.
              - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
              - If set to '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier.
              - To opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request.
              - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show `service_tier=ultrafast`.
              - When not set, the default behavior is 'auto'.

              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.
          enum:
            - auto
            - default
            - flex
            - scale
            - priority
            - fast
            - ultrafast
          default: auto
        - type: 'null'
    Reasoning:
      type: object
      description: >
        Configuration options for

        [reasoning
        models](https://developers.openai.com/api/docs/guides/reasoning).
      title: Reasoning
      properties:
        mode:
          $ref: '#/components/schemas/ReasoningModeEnum'
          description: |
            Controls the reasoning execution mode for the request.

            When returned on a response, this is the effective execution mode.
        effort:
          $ref: '#/components/schemas/ReasoningEffort'
        summary:
          anyOf:
            - type: string
              description: >
                A summary of the reasoning performed by the model. This can be

                useful for debugging and understanding the model's reasoning
                process.

                One of `auto`, `concise`, or `detailed`.


                `concise` is supported for `computer-use-preview` models and all
                reasoning models after `gpt-5`.
              enum:
                - auto
                - concise
                - detailed
            - type: 'null'
        context:
          anyOf:
            - type: string
              description: >
                Controls which reasoning items are rendered back to the model on
                later turns.

                If omitted or set to `auto`, the model determines the context
                mode. The

                `gpt-5.6` model family defaults to `all_turns`; earlier models
                default to

                `current_turn`.


                When returned on a response, this is the effective reasoning
                context mode

                used for the response.
              enum:
                - auto
                - current_turn
                - all_turns
            - type: 'null'
        generate_summary:
          anyOf:
            - type: string
              deprecated: true
              description: >
                **Deprecated:** use `summary` instead.


                A summary of the reasoning performed by the model. This can be

                useful for debugging and understanding the model's reasoning
                process.

                One of `auto`, `concise`, or `detailed`.
              enum:
                - auto
                - concise
                - detailed
            - type: 'null'
    InputParam:
      description: >
        Text, image, or file inputs to the model, used to generate a response.


        Learn more:

        - [Text inputs and
        outputs](https://developers.openai.com/api/docs/guides/text)

        - [Image
        inputs](https://developers.openai.com/api/docs/guides/images-vision)

        - [File
        inputs](https://developers.openai.com/api/docs/guides/file-inputs)

        - [Conversation
        state](https://developers.openai.com/api/docs/guides/conversation-state)

        - [Function
        calling](https://developers.openai.com/api/docs/guides/function-calling)
      oneOf:
        - type: string
          title: Text input
          description: |
            A text input to the model, equivalent to a text input with the
            `user` role.
        - type: array
          title: Input item list
          description: |
            A list of one or many input items to the model, containing
            different content types.
          items:
            $ref: '#/components/schemas/InputItem'
    IncludeEnum:
      type: string
      enum:
        - file_search_call.results
        - web_search_call.results
        - web_search_call.action.sources
        - message.input_image.image_url
        - computer_call_output.output.image_url
        - code_interpreter_call.outputs
        - reasoning.encrypted_content
        - message.output_text.logprobs
      description: >-
        Specify additional output data to include in the model response.
        Currently supported values are:

        - `web_search_call.results`: Include the search results of the web
        search tool call.

        - `web_search_call.action.sources`: Include the sources of the web
        search tool call.

        - `code_interpreter_call.outputs`: Includes the outputs of python code
        execution in code interpreter tool call items.

        - `computer_call_output.output.image_url`: Include image urls from the
        computer call output.

        - `file_search_call.results`: Include the search results of the file
        search tool call.

        - `message.input_image.image_url`: Include image urls from the input
        message.

        - `message.output_text.logprobs`: Include logprobs with assistant
        messages.

        - `reasoning.encrypted_content`: Includes an encrypted version of
        reasoning tokens in reasoning item outputs. This enables reasoning items
        to be used in multi-turn conversations when using the Responses API
        statelessly (like when the `store` parameter is set to `false`, or when
        an organization is enrolled in the zero data retention program).
    ModerationParam:
      properties:
        model:
          type: string
          description: >-
            The moderation model to use for moderated completions, e.g.
            'omni-moderation-latest'.
        policy:
          anyOf:
            - $ref: '#/components/schemas/ModerationPolicyParam'
              description: The policy to apply to moderated response input and output.
            - type: 'null'
      type: object
      required:
        - model
      description: >-
        Configuration for running moderation on the input and output of this
        response.
    ResponseStreamOptions:
      anyOf:
        - description: >
            Options for streaming responses. Only set this when you set `stream:
            true`.
          type: object
          properties:
            include_obfuscation:
              type: boolean
              description: >
                When true, stream obfuscation will be enabled. Stream
                obfuscation adds

                random characters to an `obfuscation` field on streaming delta
                events to

                normalize payload sizes as a mitigation to certain side-channel
                attacks.

                These obfuscation fields are included by default, but add a
                small amount

                of overhead to the data stream. You can set
                `include_obfuscation` to

                false to optimize for bandwidth if you trust the network links
                between

                your application and the OpenAI API.
        - type: 'null'
    ConversationParam:
      description: >
        The conversation that this response belongs to. Items from this
        conversation are prepended to `input_items` for this response request.

        Input items and output items from this response are automatically added
        to this conversation after this response completes.
      default: null
      oneOf:
        - type: string
          title: Conversation ID
          description: |
            The unique ID of the conversation.
        - $ref: '#/components/schemas/ConversationParam-2'
    ContextManagementParam:
      properties:
        type:
          type: string
          description: >-
            The context management entry type. Currently only 'compaction' is
            supported.
        compact_threshold:
          anyOf:
            - type: integer
              minimum: 1000
              description: >-
                Token threshold at which compaction should be triggered for this
                entry.
            - type: 'null'
      type: object
      required:
        - type
    ModelResponseProperties:
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/Metadata'
        top_logprobs:
          anyOf:
            - description: >
                An integer between 0 and 20 specifying the maximum number of
                most likely

                tokens to return at each token position, each with an associated
                log

                probability. In some cases, the number of returned tokens may be
                fewer than

                requested.
              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.

                We generally recommend altering this or `top_p` but not both.
            - 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,

                where the model considers the results of the tokens with top_p
                probability

                mass. So 0.1 means only the tokens comprising the top 10%
                probability mass

                are considered.


                We generally recommend altering this or `temperature` but not
                both.
            - type: 'null'
        user:
          type:
            - string
            - 'null'
          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.

            A stable identifier for your end-users.

            Used to boost cache hit rates by better bucketing similar requests
            and  to help OpenAI detect and prevent abuse. [Learn
            more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
        safety_identifier:
          anyOf:
            - type: string
              maxLength: 128
              example: safety-identifier-1234
              description: >
                A stable identifier used to help detect users of your
                application that may be violating OpenAI's usage policies.

                The IDs should be a string that uniquely identifies each user,
                with a maximum length of 128 characters. We recommend hashing
                their username or email address, in order to avoid sending us
                any identifying information. [Learn
                more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
            - 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](https://developers.openai.com/api/docs/guides/prompt-caching).
            - type: 'null'
        prompt_cache_retention:
          deprecated: true
          anyOf:
            - type: string
              enum:
                - in_memory
                - 24h
              description: >
                Deprecated. Use `prompt_cache_options.ttl` instead.


                The retention policy for the prompt cache. Set to `24h` to
                enable extended prompt caching, which keeps cached prefixes
                active for longer, up to a maximum of 24 hours. [Learn
                more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).

                This field expresses a maximum retention policy, while

                `prompt_cache_options.ttl` expresses a minimum cache lifetime.
                The two

                fields are independent and do not interact.

                For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is
                supported.


                For older models that support both `in_memory` and `24h`, the
                default depends on your organization's data retention policy:
                  - Organizations without ZDR enabled default to `24h`.
                  - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.
            - type: 'null'
    ResolvedImageOptions:
      properties:
        context_compression:
          $ref: '#/components/schemas/ResolvedImageContextCompressionEnum'
          description: Effective image context optimization policy.
      type: object
      required:
        - context_compression
    AccessProgramsBody:
      properties:
        cyber:
          $ref: '#/components/schemas/CyberAccessProgramEnum'
          description: The effective Cyber access program used for this response.
      type: object
      required:
        - cyber
    ResponseError:
      anyOf:
        - type: object
          description: >
            An error object returned when the model fails to generate a
            Response.
          properties:
            type:
              anyOf:
                - type: string
                - type: 'null'
              description: The original error type, or null if it was not recorded.
            param:
              anyOf:
                - type: string
                - type: 'null'
              description: >-
                The request parameter associated with the error, or null if none
                was recorded.
            code:
              $ref: '#/components/schemas/ResponseErrorCode'
            message:
              type: string
              description: |
                A human-readable description of the error.
            misalignment:
              $ref: '#/components/schemas/MisalignmentErrorDetailsResource'
          required:
            - code
            - message
        - type: 'null'
    ReasoningInputTransformation:
      properties:
        type:
          type: string
          enum:
            - reasoning
          default: reasoning
        id:
          type: string
          description: The original reasoning item ID.
        action:
          type: string
          enum:
            - removed
          default: removed
        reason:
          $ref: '#/components/schemas/InputRemovalReason'
      type: object
      required:
        - type
        - id
        - action
        - reason
    OutputItem:
      oneOf:
        - $ref: '#/components/schemas/OutputMessage'
        - $ref: '#/components/schemas/FileSearchToolCall'
        - $ref: '#/components/schemas/FunctionToolCall'
        - $ref: '#/components/schemas/FunctionToolCallOutputResource'
        - $ref: '#/components/schemas/WebSearchToolCall'
        - $ref: '#/components/schemas/ComputerToolCall'
        - $ref: '#/components/schemas/ComputerToolCallOutputResource'
        - $ref: '#/components/schemas/ReasoningItem'
        - $ref: '#/components/schemas/Program'
        - $ref: '#/components/schemas/ProgramOutput'
        - $ref: '#/components/schemas/ToolSearchCall'
        - $ref: '#/components/schemas/ToolSearchOutput'
        - $ref: '#/components/schemas/AdditionalTools'
        - $ref: '#/components/schemas/CompactionBody'
        - $ref: '#/components/schemas/ImageGenToolCall'
        - $ref: '#/components/schemas/CodeInterpreterToolCall'
        - $ref: '#/components/schemas/LocalShellToolCall'
        - $ref: '#/components/schemas/LocalShellToolCallOutput'
        - $ref: '#/components/schemas/FunctionShellCall'
        - $ref: '#/components/schemas/FunctionShellCallOutput'
        - $ref: '#/components/schemas/ApplyPatchToolCall'
        - $ref: '#/components/schemas/ApplyPatchToolCallOutput'
        - $ref: '#/components/schemas/MCPToolCall'
        - $ref: '#/components/schemas/MCPListTools'
        - $ref: '#/components/schemas/MCPApprovalRequest'
        - $ref: '#/components/schemas/MCPApprovalResponseResource'
        - $ref: '#/components/schemas/CustomToolCall'
        - $ref: '#/components/schemas/CustomToolCallOutputResource'
      discriminator:
        propertyName: type
    InputItem:
      oneOf:
        - $ref: '#/components/schemas/EasyInputMessage'
        - $ref: '#/components/schemas/Item'
          type: object
          title: Item
          description: |
            An item representing part of the context for the response to be
            generated by the model. Can contain text, images, and audio inputs,
            as well as previous assistant responses and tool call outputs.
        - $ref: '#/components/schemas/CompactionTriggerItemParam'
        - $ref: '#/components/schemas/ItemReferenceParam'
        - $ref: '#/components/schemas/ProgramItemParam'
        - $ref: '#/components/schemas/ProgramOutputItemParam'
      discriminator:
        propertyName: type
    ResponseUsage:
      type: object
      description: |
        Represents token usage details including input tokens, output tokens,
        a breakdown of output tokens, and the total tokens used.
      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.

                [More on prompt
                caching](https://developers.openai.com/api/docs/guides/prompt-caching).
            cache_write_tokens:
              type: integer
              description: The number of input tokens that were written to the cache.
            cache_write_tokens_details:
              $ref: '#/components/schemas/CacheWriteTokensDetails'
          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
    ResponseToolUsage:
      properties:
        image_gen:
          $ref: '#/components/schemas/ImageGenToolUsage'
          description: Aggregated usage statistics for image generation tool calls.
        web_search:
          $ref: '#/components/schemas/WebSearchUsage'
          description: Aggregated billable usage statistics for web search tool calls.
      type: object
      required:
        - image_gen
        - web_search
      title: Response tool usage
      description: >-
        Aggregated usage details for billable tools that ran while generating
        the response.
    PromptCacheOptions:
      properties:
        ttl:
          type: string
          enum:
            - 30m
            - 12h
          description: The minimum lifetime applied to each cache breakpoint.
        mode:
          $ref: '#/components/schemas/PromptCacheModeEnum'
          description: Whether implicit prompt-cache breakpoints were enabled.
        comparison_response_id:
          anyOf:
            - type: string
              description: >-
                The response ID supplied as the prompt cache diagnostics
                comparison.
            - type: 'null'
      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.
    PromptCacheDiagnostics:
      oneOf:
        - $ref: '#/components/schemas/PromptCacheMissDiagnosticsBody'
        - $ref: '#/components/schemas/PromptCacheHitDiagnosticsBody'
        - $ref: >-
            #/components/schemas/PromptCacheComparisonResponseNotFoundDiagnosticsBody
        - $ref: '#/components/schemas/PromptCacheUnavailableDiagnosticsBody'
      description: Prompt cache diagnostics requested for this response.
      discriminator:
        propertyName: type
    Moderation:
      properties:
        input:
          oneOf:
            - $ref: '#/components/schemas/ModerationResultBody'
            - $ref: '#/components/schemas/ModerationErrorBody'
          description: Moderation for the response input.
          discriminator:
            propertyName: type
        output:
          oneOf:
            - $ref: '#/components/schemas/ModerationResultBody'
            - $ref: '#/components/schemas/ModerationErrorBody'
          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.
    ResponseConversation:
      properties:
        id:
          type: string
          description: >-
            The unique ID of the conversation that this response was associated
            with.
      type: object
      required:
        - id
      title: Conversation
      description: >-
        The conversation that this response belonged to. Input items and output
        items from this response were automatically added to this conversation.
    ResponseAudioDeltaEvent:
      type: object
      description: Emitted when there is a partial audio response.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.audio.delta`.
          const: response.audio.delta
        sequence_number:
          type: integer
          description: |
            A sequence number for this chunk of the stream response.
        delta:
          type: string
          description: |
            A chunk of Base64 encoded response audio bytes.
      required:
        - type
        - delta
        - sequence_number
    ResponseAudioDoneEvent:
      type: object
      description: Emitted when the audio response is complete.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.audio.done`.
          const: response.audio.done
        sequence_number:
          type: integer
          description: |
            The sequence number of the delta.
      required:
        - type
        - sequence_number
        - response_id
    ResponseAudioTranscriptDeltaEvent:
      type: object
      description: Emitted when there is a partial transcript of audio.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.audio.transcript.delta`.
          const: response.audio.transcript.delta
        delta:
          type: string
          description: |
            The partial transcript of the audio response.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - response_id
        - delta
        - sequence_number
    ResponseAudioTranscriptDoneEvent:
      type: object
      description: Emitted when the full audio transcript is completed.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.audio.transcript.done`.
          const: response.audio.transcript.done
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - response_id
        - sequence_number
    ResponseCodeInterpreterCallCodeDeltaEvent:
      type: object
      description: Emitted when a partial code snippet is streamed by the code interpreter.
      properties:
        type:
          type: string
          description: >-
            The type of the event. Always
            `response.code_interpreter_call_code.delta`.
          const: response.code_interpreter_call_code.delta
        output_index:
          type: integer
          description: >-
            The index of the output item in the response for which the code is
            being streamed.
        item_id:
          type: string
          description: The unique identifier of the code interpreter tool call item.
        delta:
          type: string
          description: The partial code snippet being streamed by the code interpreter.
        sequence_number:
          type: integer
          description: The sequence number of this event, used to order streaming events.
      required:
        - type
        - output_index
        - item_id
        - delta
        - sequence_number
    ResponseCodeInterpreterCallCodeDoneEvent:
      type: object
      description: Emitted when the code snippet is finalized by the code interpreter.
      properties:
        type:
          type: string
          description: >-
            The type of the event. Always
            `response.code_interpreter_call_code.done`.
          const: response.code_interpreter_call_code.done
        output_index:
          type: integer
          description: >-
            The index of the output item in the response for which the code is
            finalized.
        item_id:
          type: string
          description: The unique identifier of the code interpreter tool call item.
        code:
          type: string
          description: The final code snippet output by the code interpreter.
        sequence_number:
          type: integer
          description: The sequence number of this event, used to order streaming events.
      required:
        - type
        - output_index
        - item_id
        - code
        - sequence_number
    ResponseCodeInterpreterCallCompletedEvent:
      type: object
      description: Emitted when the code interpreter call is completed.
      properties:
        type:
          type: string
          description: >-
            The type of the event. Always
            `response.code_interpreter_call.completed`.
          const: response.code_interpreter_call.completed
        output_index:
          type: integer
          description: >-
            The index of the output item in the response for which the code
            interpreter call is completed.
        item_id:
          type: string
          description: The unique identifier of the code interpreter tool call item.
        sequence_number:
          type: integer
          description: The sequence number of this event, used to order streaming events.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseCodeInterpreterCallInProgressEvent:
      type: object
      description: Emitted when a code interpreter call is in progress.
      properties:
        type:
          type: string
          description: >-
            The type of the event. Always
            `response.code_interpreter_call.in_progress`.
          const: response.code_interpreter_call.in_progress
        output_index:
          type: integer
          description: >-
            The index of the output item in the response for which the code
            interpreter call is in progress.
        item_id:
          type: string
          description: The unique identifier of the code interpreter tool call item.
        sequence_number:
          type: integer
          description: The sequence number of this event, used to order streaming events.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseCodeInterpreterCallInterpretingEvent:
      type: object
      description: >-
        Emitted when the code interpreter is actively interpreting the code
        snippet.
      properties:
        type:
          type: string
          description: >-
            The type of the event. Always
            `response.code_interpreter_call.interpreting`.
          const: response.code_interpreter_call.interpreting
        output_index:
          type: integer
          description: >-
            The index of the output item in the response for which the code
            interpreter is interpreting code.
        item_id:
          type: string
          description: The unique identifier of the code interpreter tool call item.
        sequence_number:
          type: integer
          description: The sequence number of this event, used to order streaming events.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseCompactionCompactingStreamingEvent:
      properties:
        type:
          type: string
          enum:
            - response.compaction.compacting
          description: The type of the event, always `response.compaction.compacting`.
          default: response.compaction.compacting
        sequence_number:
          type: integer
          description: The sequence number of the event that was emitted.
        output_index:
          type: integer
          description: The index of the compaction output item.
        item_id:
          type: string
          description: The ID of the compaction output item.
      type: object
      required:
        - type
        - sequence_number
        - output_index
        - item_id
      title: Response compaction compacting event
      description: >-
        Emitted when new summary content is sampled for a compaction trigger.
        Contains no summary content.
    ResponseCompletedEvent:
      type: object
      description: Emitted when the model response is complete.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.completed`.
          const: response.completed
        response:
          $ref: '#/components/schemas/Response'
          description: |
            Properties of the completed response.
        sequence_number:
          type: integer
          description: The sequence number for this event.
      required:
        - type
        - response
        - sequence_number
    ResponseContentPartAddedEvent:
      type: object
      description: Emitted when a new content part is added.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.content_part.added`.
          const: response.content_part.added
        item_id:
          type: string
          description: |
            The ID of the output item that the content part was added to.
        output_index:
          type: integer
          description: |
            The index of the output item that the content part was added to.
        content_index:
          type: integer
          description: |
            The index of the content part that was added.
        part:
          $ref: '#/components/schemas/OutputContent'
          description: |
            The content part that was added.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - item_id
        - output_index
        - content_index
        - part
        - sequence_number
    ResponseContentPartDoneEvent:
      type: object
      description: Emitted when a content part is done.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.content_part.done`.
          const: response.content_part.done
        item_id:
          type: string
          description: |
            The ID of the output item that the content part was added to.
        output_index:
          type: integer
          description: |
            The index of the output item that the content part was added to.
        content_index:
          type: integer
          description: |
            The index of the content part that is done.
        sequence_number:
          type: integer
          description: The sequence number of this event.
        part:
          $ref: '#/components/schemas/OutputContent'
          description: |
            The content part that is done.
      required:
        - type
        - item_id
        - output_index
        - content_index
        - part
        - sequence_number
    ResponseCreatedEvent:
      type: object
      description: |
        An event that is emitted when a response is created.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.created`.
          const: response.created
        response:
          $ref: '#/components/schemas/Response'
          description: |
            The response that was created.
        sequence_number:
          type: integer
          description: The sequence number for this event.
      required:
        - type
        - response
        - sequence_number
    ResponseErrorEvent:
      type: object
      description: Emitted when an error occurs.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `error`.
          const: error
        code:
          anyOf:
            - type: string
              description: |
                The error code.
            - type: 'null'
        message:
          type: string
          description: |
            The error message.
        param:
          anyOf:
            - type: string
              description: |
                The error parameter.
            - type: 'null'
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - code
        - message
        - param
        - sequence_number
    ResponseFileSearchCallCompletedEvent:
      type: object
      description: Emitted when a file search call is completed (results found).
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.file_search_call.completed`.
          const: response.file_search_call.completed
        output_index:
          type: integer
          description: |
            The index of the output item that the file search call is initiated.
        item_id:
          type: string
          description: |
            The ID of the output item that the file search call is initiated.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseFileSearchCallInProgressEvent:
      type: object
      description: Emitted when a file search call is initiated.
      properties:
        type:
          type: string
          description: >
            The type of the event. Always
            `response.file_search_call.in_progress`.
          const: response.file_search_call.in_progress
        output_index:
          type: integer
          description: |
            The index of the output item that the file search call is initiated.
        item_id:
          type: string
          description: |
            The ID of the output item that the file search call is initiated.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseFileSearchCallSearchingEvent:
      type: object
      description: Emitted when a file search is currently searching.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.file_search_call.searching`.
          const: response.file_search_call.searching
        output_index:
          type: integer
          description: |
            The index of the output item that the file search call is searching.
        item_id:
          type: string
          description: |
            The ID of the output item that the file search call is initiated.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseFunctionCallArgumentsDeltaEvent:
      type: object
      description: Emitted when there is a partial function-call arguments delta.
      properties:
        type:
          type: string
          description: >
            The type of the event. Always
            `response.function_call_arguments.delta`.
          const: response.function_call_arguments.delta
        item_id:
          type: string
          description: >
            The ID of the output item that the function-call arguments delta is
            added to.
        output_index:
          type: integer
          description: >
            The index of the output item that the function-call arguments delta
            is added to.
        sequence_number:
          type: integer
          description: The sequence number of this event.
        delta:
          type: string
          description: |
            The function-call arguments delta that is added.
      required:
        - type
        - item_id
        - output_index
        - delta
        - sequence_number
    ResponseFunctionCallArgumentsDoneEvent:
      type: object
      description: Emitted when function-call arguments are finalized.
      properties:
        type:
          type: string
          const: response.function_call_arguments.done
        item_id:
          type: string
          description: The ID of the item.
        output_index:
          type: integer
          description: The index of the output item.
        sequence_number:
          type: integer
          description: The sequence number of this event.
        arguments:
          type: string
          description: The function-call arguments.
      required:
        - type
        - item_id
        - output_index
        - arguments
        - sequence_number
    ResponseShellCallCommandAddedStreamingEvent:
      properties:
        type:
          type: string
          enum:
            - response.shell_call_command.added
          description: The type of the event, always `response.shell_call_command.added`.
          default: response.shell_call_command.added
        sequence_number:
          type: integer
          description: The sequence number of the event that was emitted.
        output_index:
          type: integer
          description: The index of the output item that was updated.
        command_index:
          type: integer
          description: The index of the shell command that was added.
        command:
          type: string
          description: The shell command that was added.
      type: object
      required:
        - type
        - sequence_number
        - output_index
        - command_index
        - command
      title: Response shell command added event
      description: >-
        A streaming event that indicated a shell command was added to a tool
        call.
    ResponseShellCallCommandDeltaStreamingEvent:
      properties:
        type:
          type: string
          enum:
            - response.shell_call_command.delta
          description: The type of the event, always `response.shell_call_command.delta`.
          default: response.shell_call_command.delta
        sequence_number:
          type: integer
          description: The sequence number of the event that was emitted.
        output_index:
          type: integer
          description: The index of the output item that was updated.
        command_index:
          type: integer
          description: The index of the shell command that was updated.
        delta:
          type: string
          description: The shell command delta that was appended.
        obfuscation:
          type: string
          description: An obfuscation string that was added to pad the event payload.
      type: object
      required:
        - type
        - sequence_number
        - output_index
        - command_index
        - delta
      title: Response shell command delta event
      description: >-
        A streaming event that indicated a shell command was incrementally
        updated.
    ResponseShellCallCommandDoneStreamingEvent:
      properties:
        type:
          type: string
          enum:
            - response.shell_call_command.done
          description: The type of the event, always `response.shell_call_command.done`.
          default: response.shell_call_command.done
        sequence_number:
          type: integer
          description: The sequence number of the event that was emitted.
        output_index:
          type: integer
          description: The index of the output item that was updated.
        command_index:
          type: integer
          description: The index of the shell command that was completed.
        command:
          type: string
          description: The final shell command that was emitted.
      type: object
      required:
        - type
        - sequence_number
        - output_index
        - command_index
        - command
      title: Response shell command done event
      description: A streaming event that indicated a shell command was completed.
    ResponseShellCallOutputContentDeltaStreamingEvent:
      properties:
        type:
          type: string
          enum:
            - response.shell_call_output_content.delta
          description: >-
            The type of the event, always
            `response.shell_call_output_content.delta`.
          default: response.shell_call_output_content.delta
        sequence_number:
          type: integer
          description: The sequence number of the event that was emitted.
        item_id:
          type: string
          description: The ID of the output item that was updated.
        output_index:
          type: integer
          description: The index of the output item that was updated.
        command_index:
          type: integer
          description: The index of the shell command that produced output.
        delta:
          $ref: '#/components/schemas/ShellCallOutputDelta'
          description: The stdout/stderr delta that was emitted.
      type: object
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - command_index
        - delta
      title: Response shell call output content delta event
      description: >-
        A streaming event that indicated shell call output was incrementally
        added.
    ResponseShellCallOutputContentDoneStreamingEvent:
      properties:
        type:
          type: string
          enum:
            - response.shell_call_output_content.done
          description: >-
            The type of the event, always
            `response.shell_call_output_content.done`.
          default: response.shell_call_output_content.done
        sequence_number:
          type: integer
          description: The sequence number of the event that was emitted.
        item_id:
          type: string
          description: The ID of the output item that was updated.
        output_index:
          type: integer
          description: The index of the output item that was updated.
        command_index:
          type: integer
          description: The index of the shell command that produced output.
        output:
          items:
            $ref: '#/components/schemas/FunctionShellCallOutputContent'
          type: array
          description: The output contents emitted for the shell command.
      type: object
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - command_index
        - output
      title: Response shell call output content done event
      description: A streaming event that indicated shell call output was completed.
    ResponseInProgressEvent:
      type: object
      description: Emitted when the response is in progress.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.in_progress`.
          const: response.in_progress
        response:
          $ref: '#/components/schemas/Response'
          description: |
            The response that is in progress.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - response
        - sequence_number
    ResponseFailedEvent:
      type: object
      description: |
        An event that is emitted when a response fails.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.failed`.
          const: response.failed
        sequence_number:
          type: integer
          description: The sequence number of this event.
        response:
          $ref: '#/components/schemas/Response'
          description: |
            The response that failed.
      required:
        - type
        - response
        - sequence_number
    ResponseIncompleteEvent:
      type: object
      description: >
        An event that is emitted when a response finishes as incomplete.


        Over WebSocket, steering can finish a response with

        `response.incomplete_details.reason` set to `steered`, followed
        automatically

        by a successor `response.created` that commits the queued steering
        input.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.incomplete`.
          const: response.incomplete
        response:
          $ref: '#/components/schemas/Response'
          description: |
            The response that was incomplete.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - response
        - sequence_number
    ResponseOutputItemAddedEvent:
      type: object
      description: Emitted when a new output item is added.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.output_item.added`.
          const: response.output_item.added
        output_index:
          type: integer
          description: |
            The index of the output item that was added.
        sequence_number:
          type: integer
          description: |
            The sequence number of this event.
        item:
          $ref: '#/components/schemas/OutputItem'
          description: >
            The output item that was added. For reasoning items,
            `encrypted_content`

            may be incomplete while the item is in progress. Use the reasoning
            item

            from the corresponding `response.output_item.done` event when
            passing it

            as input to a subsequent request.
      required:
        - type
        - output_index
        - item
        - sequence_number
    ResponseOutputItemDoneEvent:
      type: object
      description: Emitted when an output item is marked done.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.output_item.done`.
          const: response.output_item.done
        output_index:
          type: integer
          description: |
            The index of the output item that was marked done.
        sequence_number:
          type: integer
          description: |
            The sequence number of this event.
        item:
          $ref: '#/components/schemas/OutputItem'
          description: |
            The output item that was marked done.
      required:
        - type
        - output_index
        - item
        - sequence_number
    ResponseReasoningSummaryPartAddedEvent:
      type: object
      description: Emitted when a new reasoning summary part is added.
      properties:
        type:
          type: string
          description: >
            The type of the event. Always
            `response.reasoning_summary_part.added`.
          const: response.reasoning_summary_part.added
        item_id:
          type: string
          description: |
            The ID of the item this summary part is associated with.
        output_index:
          type: integer
          description: |
            The index of the output item this summary part is associated with.
        summary_index:
          type: integer
          description: |
            The index of the summary part within the reasoning summary.
        sequence_number:
          type: integer
          description: |
            The sequence number of this event.
        part:
          type: object
          description: |
            The summary part that was added.
          properties:
            type:
              type: string
              description: The type of the summary part. Always `summary_text`.
              const: summary_text
            text:
              type: string
              description: The text of the summary part.
          required:
            - type
            - text
      required:
        - type
        - item_id
        - output_index
        - summary_index
        - part
        - sequence_number
    ResponseReasoningSummaryPartDoneEvent:
      type: object
      description: Emitted when a reasoning summary part is completed.
      properties:
        type:
          type: string
          description: >
            The type of the event. Always
            `response.reasoning_summary_part.done`.
          const: response.reasoning_summary_part.done
        item_id:
          type: string
          description: |
            The ID of the item this summary part is associated with.
        output_index:
          type: integer
          description: |
            The index of the output item this summary part is associated with.
        summary_index:
          type: integer
          description: |
            The index of the summary part within the reasoning summary.
        status:
          type: string
          description: >
            The completion status of the summary part. Omitted when the part
            completed

            normally and set to `incomplete` when generation was interrupted.
          enum:
            - incomplete
        sequence_number:
          type: integer
          description: |
            The sequence number of this event.
        part:
          type: object
          description: |
            The completed summary part.
          properties:
            type:
              type: string
              description: The type of the summary part. Always `summary_text`.
              const: summary_text
            text:
              type: string
              description: The text of the summary part.
          required:
            - type
            - text
      required:
        - type
        - item_id
        - output_index
        - summary_index
        - part
        - sequence_number
    ResponseReasoningSummaryTextDeltaEvent:
      type: object
      description: Emitted when a delta is added to a reasoning summary text.
      properties:
        type:
          type: string
          description: >
            The type of the event. Always
            `response.reasoning_summary_text.delta`.
          const: response.reasoning_summary_text.delta
        item_id:
          type: string
          description: |
            The ID of the item this summary text delta is associated with.
        output_index:
          type: integer
          description: >
            The index of the output item this summary text delta is associated
            with.
        summary_index:
          type: integer
          description: |
            The index of the summary part within the reasoning summary.
        delta:
          type: string
          description: |
            The text delta that was added to the summary.
        sequence_number:
          type: integer
          description: |
            The sequence number of this event.
      required:
        - type
        - item_id
        - output_index
        - summary_index
        - delta
        - sequence_number
    ResponseReasoningSummaryTextDoneEvent:
      type: object
      description: Emitted when a reasoning summary text is completed.
      properties:
        type:
          type: string
          description: >
            The type of the event. Always
            `response.reasoning_summary_text.done`.
          const: response.reasoning_summary_text.done
        item_id:
          type: string
          description: |
            The ID of the item this summary text is associated with.
        output_index:
          type: integer
          description: |
            The index of the output item this summary text is associated with.
        summary_index:
          type: integer
          description: |
            The index of the summary part within the reasoning summary.
        text:
          type: string
          description: |
            The full text of the completed reasoning summary.
        sequence_number:
          type: integer
          description: |
            The sequence number of this event.
      required:
        - type
        - item_id
        - output_index
        - summary_index
        - text
        - sequence_number
    ResponseReasoningTextDeltaEvent:
      type: object
      description: Emitted when a delta is added to a reasoning text.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.reasoning_text.delta`.
          const: response.reasoning_text.delta
        item_id:
          type: string
          description: |
            The ID of the item this reasoning text delta is associated with.
        output_index:
          type: integer
          description: >
            The index of the output item this reasoning text delta is associated
            with.
        content_index:
          type: integer
          description: >
            The index of the reasoning content part this delta is associated
            with.
        delta:
          type: string
          description: |
            The text delta that was added to the reasoning content.
        sequence_number:
          type: integer
          description: |
            The sequence number of this event.
      required:
        - type
        - item_id
        - output_index
        - content_index
        - delta
        - sequence_number
    ResponseReasoningTextDoneEvent:
      type: object
      description: Emitted when a reasoning text is completed.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.reasoning_text.done`.
          const: response.reasoning_text.done
        item_id:
          type: string
          description: |
            The ID of the item this reasoning text is associated with.
        output_index:
          type: integer
          description: |
            The index of the output item this reasoning text is associated with.
        content_index:
          type: integer
          description: |
            The index of the reasoning content part.
        text:
          type: string
          description: |
            The full text of the completed reasoning content.
        sequence_number:
          type: integer
          description: |
            The sequence number of this event.
      required:
        - type
        - item_id
        - output_index
        - content_index
        - text
        - sequence_number
    ResponseRefusalDeltaEvent:
      type: object
      description: Emitted when there is a partial refusal text.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.refusal.delta`.
          const: response.refusal.delta
        item_id:
          type: string
          description: |
            The ID of the output item that the refusal text is added to.
        output_index:
          type: integer
          description: |
            The index of the output item that the refusal text is added to.
        content_index:
          type: integer
          description: |
            The index of the content part that the refusal text is added to.
        delta:
          type: string
          description: |
            The refusal text that is added.
        sequence_number:
          type: integer
          description: |
            The sequence number of this event.
      required:
        - type
        - item_id
        - output_index
        - content_index
        - delta
        - sequence_number
    ResponseRefusalDoneEvent:
      type: object
      description: Emitted when refusal text is finalized.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.refusal.done`.
          const: response.refusal.done
        item_id:
          type: string
          description: |
            The ID of the output item that the refusal text is finalized.
        output_index:
          type: integer
          description: |
            The index of the output item that the refusal text is finalized.
        content_index:
          type: integer
          description: |
            The index of the content part that the refusal text is finalized.
        refusal:
          type: string
          description: |
            The refusal text that is finalized.
        sequence_number:
          type: integer
          description: |
            The sequence number of this event.
      required:
        - type
        - item_id
        - output_index
        - content_index
        - refusal
        - sequence_number
    ResponseTextDeltaEvent:
      type: object
      description: Emitted when there is an additional text delta.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.output_text.delta`.
          const: response.output_text.delta
        item_id:
          type: string
          description: |
            The ID of the output item that the text delta was added to.
        output_index:
          type: integer
          description: |
            The index of the output item that the text delta was added to.
        content_index:
          type: integer
          description: |
            The index of the content part that the text delta was added to.
        delta:
          type: string
          description: |
            The text delta that was added.
        sequence_number:
          type: integer
          description: The sequence number for this event.
        logprobs:
          type: array
          description: |
            The log probabilities of the tokens in the delta.
          items:
            $ref: '#/components/schemas/ResponseLogProb'
      required:
        - type
        - item_id
        - output_index
        - content_index
        - delta
        - sequence_number
        - logprobs
    ResponseTextDoneEvent:
      type: object
      description: Emitted when text content is finalized.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.output_text.done`.
          const: response.output_text.done
        item_id:
          type: string
          description: |
            The ID of the output item that the text content is finalized.
        output_index:
          type: integer
          description: |
            The index of the output item that the text content is finalized.
        content_index:
          type: integer
          description: |
            The index of the content part that the text content is finalized.
        text:
          type: string
          description: |
            The text content that is finalized.
        sequence_number:
          type: integer
          description: The sequence number for this event.
        logprobs:
          type: array
          description: |
            The log probabilities of the tokens in the delta.
          items:
            $ref: '#/components/schemas/ResponseLogProb'
      required:
        - type
        - item_id
        - output_index
        - content_index
        - text
        - sequence_number
        - logprobs
    ResponseWebSearchCallCompletedEvent:
      type: object
      description: Emitted when a web search call is completed.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.web_search_call.completed`.
          const: response.web_search_call.completed
        output_index:
          type: integer
          description: >
            The index of the output item that the web search call is associated
            with.
        item_id:
          type: string
          description: |
            Unique ID for the output item associated with the web search call.
        sequence_number:
          type: integer
          description: The sequence number of the web search call being processed.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseWebSearchCallInProgressEvent:
      type: object
      description: Emitted when a web search call is initiated.
      properties:
        type:
          type: string
          description: >
            The type of the event. Always
            `response.web_search_call.in_progress`.
          const: response.web_search_call.in_progress
        output_index:
          type: integer
          description: >
            The index of the output item that the web search call is associated
            with.
        item_id:
          type: string
          description: |
            Unique ID for the output item associated with the web search call.
        sequence_number:
          type: integer
          description: The sequence number of the web search call being processed.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseWebSearchCallSearchingEvent:
      type: object
      description: Emitted when a web search call is executing.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `response.web_search_call.searching`.
          const: response.web_search_call.searching
        output_index:
          type: integer
          description: >
            The index of the output item that the web search call is associated
            with.
        item_id:
          type: string
          description: |
            Unique ID for the output item associated with the web search call.
        sequence_number:
          type: integer
          description: The sequence number of the web search call being processed.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseImageGenCallCompletedEvent:
      type: object
      title: ResponseImageGenCallCompletedEvent
      description: >
        Emitted when an image generation tool call has completed and the final
        image is available.
      properties:
        type:
          type: string
          const: response.image_generation_call.completed
          description: >-
            The type of the event. Always
            'response.image_generation_call.completed'.
        output_index:
          type: integer
          description: The index of the output item in the response's output array.
        sequence_number:
          type: integer
          description: The sequence number of this event.
        item_id:
          type: string
          description: The unique identifier of the image generation item being processed.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseImageGenCallGeneratingEvent:
      type: object
      title: ResponseImageGenCallGeneratingEvent
      description: >
        Emitted when an image generation tool call is actively generating an
        image (intermediate state).
      properties:
        type:
          type: string
          const: response.image_generation_call.generating
          description: >-
            The type of the event. Always
            'response.image_generation_call.generating'.
        output_index:
          type: integer
          description: The index of the output item in the response's output array.
        item_id:
          type: string
          description: The unique identifier of the image generation item being processed.
        sequence_number:
          type: integer
          description: The sequence number of the image generation item being processed.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseImageGenCallInProgressEvent:
      type: object
      title: ResponseImageGenCallInProgressEvent
      description: |
        Emitted when an image generation tool call is in progress.
      properties:
        type:
          type: string
          const: response.image_generation_call.in_progress
          description: >-
            The type of the event. Always
            'response.image_generation_call.in_progress'.
        output_index:
          type: integer
          description: The index of the output item in the response's output array.
        item_id:
          type: string
          description: The unique identifier of the image generation item being processed.
        sequence_number:
          type: integer
          description: The sequence number of the image generation item being processed.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseImageGenCallPartialImageEvent:
      type: object
      title: ResponseImageGenCallPartialImageEvent
      description: >
        Emitted when a partial image is available during image generation
        streaming.
      properties:
        type:
          type: string
          const: response.image_generation_call.partial_image
          description: >-
            The type of the event. Always
            'response.image_generation_call.partial_image'.
        output_index:
          type: integer
          description: The index of the output item in the response's output array.
        item_id:
          type: string
          description: The unique identifier of the image generation item being processed.
        sequence_number:
          type: integer
          description: The sequence number of the image generation item being processed.
        partial_image_index:
          type: integer
          description: >-
            0-based index for the partial image (backend is 1-based, but this is
            0-based for the user).
        partial_image_b64:
          type: string
          description: >-
            Base64-encoded partial image data, suitable for rendering as an
            image.
        size:
          type: string
          description: The image size that was used.
        quality:
          type: string
          description: The image quality that was used.
        background:
          type: string
          description: The background setting that was used.
        output_format:
          type: string
          description: The output format that was used.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
        - partial_image_index
        - partial_image_b64
    ResponseMCPCallArgumentsDeltaEvent:
      type: object
      title: ResponseMCPCallArgumentsDeltaEvent
      description: >
        Emitted when there is a delta (partial update) to the arguments of an
        MCP tool call.
      properties:
        type:
          type: string
          const: response.mcp_call_arguments.delta
          description: The type of the event. Always 'response.mcp_call_arguments.delta'.
        output_index:
          type: integer
          description: The index of the output item in the response's output array.
        item_id:
          type: string
          description: The unique identifier of the MCP tool call item being processed.
        delta:
          type: string
          description: >
            A JSON string containing the partial update to the arguments for the
            MCP tool call.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - output_index
        - item_id
        - delta
        - sequence_number
    ResponseMCPCallArgumentsDoneEvent:
      type: object
      title: ResponseMCPCallArgumentsDoneEvent
      description: |
        Emitted when the arguments for an MCP tool call are finalized.
      properties:
        type:
          type: string
          const: response.mcp_call_arguments.done
          description: The type of the event. Always 'response.mcp_call_arguments.done'.
        output_index:
          type: integer
          description: The index of the output item in the response's output array.
        item_id:
          type: string
          description: The unique identifier of the MCP tool call item being processed.
        arguments:
          type: string
          description: >
            A JSON string containing the finalized arguments for the MCP tool
            call.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - output_index
        - item_id
        - arguments
        - sequence_number
    ResponseMCPCallCompletedEvent:
      type: object
      title: ResponseMCPCallCompletedEvent
      description: |
        Emitted when an MCP  tool call has completed successfully.
      properties:
        type:
          type: string
          const: response.mcp_call.completed
          description: The type of the event. Always 'response.mcp_call.completed'.
        item_id:
          type: string
          description: The ID of the MCP tool call item that completed.
        output_index:
          type: integer
          description: The index of the output item that completed.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - item_id
        - output_index
        - sequence_number
    ResponseMCPCallFailedEvent:
      type: object
      title: ResponseMCPCallFailedEvent
      description: |
        Emitted when an MCP  tool call has failed.
      properties:
        type:
          type: string
          const: response.mcp_call.failed
          description: The type of the event. Always 'response.mcp_call.failed'.
        item_id:
          type: string
          description: The ID of the MCP tool call item that failed.
        output_index:
          type: integer
          description: The index of the output item that failed.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - item_id
        - output_index
        - sequence_number
    ResponseMCPCallInProgressEvent:
      type: object
      title: ResponseMCPCallInProgressEvent
      description: |
        Emitted when an MCP  tool call is in progress.
      properties:
        type:
          type: string
          const: response.mcp_call.in_progress
          description: The type of the event. Always 'response.mcp_call.in_progress'.
        sequence_number:
          type: integer
          description: The sequence number of this event.
        output_index:
          type: integer
          description: The index of the output item in the response's output array.
        item_id:
          type: string
          description: The unique identifier of the MCP tool call item being processed.
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseMCPListToolsCompletedEvent:
      type: object
      title: ResponseMCPListToolsCompletedEvent
      description: >
        Emitted when the list of available MCP tools has been successfully
        retrieved.
      properties:
        type:
          type: string
          const: response.mcp_list_tools.completed
          description: The type of the event. Always 'response.mcp_list_tools.completed'.
        item_id:
          type: string
          description: The ID of the MCP tool call item that produced this output.
        output_index:
          type: integer
          description: The index of the output item that was processed.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - item_id
        - output_index
        - sequence_number
    ResponseMCPListToolsFailedEvent:
      type: object
      title: ResponseMCPListToolsFailedEvent
      description: |
        Emitted when the attempt to list available MCP tools has failed.
      properties:
        type:
          type: string
          const: response.mcp_list_tools.failed
          description: The type of the event. Always 'response.mcp_list_tools.failed'.
        item_id:
          type: string
          description: The ID of the MCP tool call item that failed.
        output_index:
          type: integer
          description: The index of the output item that failed.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - item_id
        - output_index
        - sequence_number
    ResponseMCPListToolsInProgressEvent:
      type: object
      title: ResponseMCPListToolsInProgressEvent
      description: >
        Emitted when the system is in the process of retrieving the list of
        available MCP tools.
      properties:
        type:
          type: string
          const: response.mcp_list_tools.in_progress
          description: The type of the event. Always 'response.mcp_list_tools.in_progress'.
        item_id:
          type: string
          description: The ID of the MCP tool call item that is being processed.
        output_index:
          type: integer
          description: The index of the output item that is being processed.
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - item_id
        - output_index
        - sequence_number
    ResponseOutputTextAnnotationAddedEvent:
      type: object
      title: ResponseOutputTextAnnotationAddedEvent
      description: |
        Emitted when an annotation is added to output text content.
      properties:
        type:
          type: string
          const: response.output_text.annotation.added
          description: >-
            The type of the event. Always
            'response.output_text.annotation.added'.
        item_id:
          type: string
          description: >-
            The unique identifier of the item to which the annotation is being
            added.
        output_index:
          type: integer
          description: The index of the output item in the response's output array.
        content_index:
          type: integer
          description: The index of the content part within the output item.
        annotation_index:
          type: integer
          description: The index of the annotation within the content part.
        sequence_number:
          type: integer
          description: The sequence number of this event.
        annotation:
          anyOf:
            - $ref: '#/components/schemas/Annotation'
            - type: 'null'
          description: >-
            The annotation object being added. (See annotation schema for
            details.)
      required:
        - type
        - item_id
        - output_index
        - content_index
        - annotation_index
        - annotation
        - sequence_number
    ResponseQueuedEvent:
      type: object
      title: ResponseQueuedEvent
      description: |
        Emitted when a response is queued and waiting to be processed.
      properties:
        type:
          type: string
          const: response.queued
          description: The type of the event. Always 'response.queued'.
        response:
          $ref: '#/components/schemas/Response'
          description: The full response object that is queued.
        sequence_number:
          type: integer
          description: The sequence number for this event.
      required:
        - type
        - response
        - sequence_number
    ResponseCustomToolCallInputDeltaEvent:
      title: ResponseCustomToolCallInputDelta
      type: object
      description: >
        Event representing a delta (partial update) to the input of a custom
        tool call.
      properties:
        type:
          type: string
          const: response.custom_tool_call_input.delta
          description: The event type identifier.
        sequence_number:
          type: integer
          description: The sequence number of this event.
        output_index:
          type: integer
          description: The index of the output this delta applies to.
        item_id:
          type: string
          description: Unique identifier for the API item associated with this event.
        delta:
          type: string
          description: The incremental input data (delta) for the custom tool call.
      required:
        - type
        - output_index
        - item_id
        - delta
        - sequence_number
    ResponseCustomToolCallInputDoneEvent:
      title: ResponseCustomToolCallInputDone
      type: object
      description: |
        Event indicating that input for a custom tool call is complete.
      properties:
        type:
          type: string
          const: response.custom_tool_call_input.done
          description: The event type identifier.
        sequence_number:
          type: integer
          description: The sequence number of this event.
        output_index:
          type: integer
          description: The index of the output this event applies to.
        item_id:
          type: string
          description: Unique identifier for the API item associated with this event.
        input:
          type: string
          description: The complete input data for the custom tool call.
      required:
        - type
        - output_index
        - item_id
        - input
        - sequence_number
    ResponseTextParam:
      type: object
      description: >
        Configuration options for a text response from the model. Can be plain

        text or structured JSON data. Learn more:

        - [Text inputs and
        outputs](https://developers.openai.com/api/docs/guides/text)

        - [Structured
        Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
      properties:
        format:
          $ref: '#/components/schemas/TextResponseFormatConfiguration'
        verbosity:
          $ref: '#/components/schemas/Verbosity'
    ToolsArray:
      type: array
      description: >
        An array of tools the model may call while generating a response. You

        can specify which tool to use by setting the `tool_choice` parameter.


        We support the following categories of tools:

        - **Built-in tools**: Tools that are provided by OpenAI that extend the
          model's capabilities, like [web search](https://developers.openai.com/api/docs/guides/tools-web-search)
          or [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about
          [built-in tools](https://developers.openai.com/api/docs/guides/tools).
        - **MCP Tools**: Integrations with third-party systems via custom MCP
        servers
          or predefined connectors such as Google Drive and SharePoint. Learn more about
          [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
        - **Function calls (custom tools)**: Functions that are defined by you,
          enabling the model to call your own code with strongly typed arguments
          and outputs. Learn more about
          [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use
          custom tools to call your own code.
      items:
        $ref: '#/components/schemas/Tool'
    ToolChoiceParam:
      description: |
        How the model should select which tool (or tools) to use when generating
        a response. See the `tools` parameter to see how to specify which tools
        the model can call.
      oneOf:
        - $ref: '#/components/schemas/ToolChoiceOptions'
        - $ref: '#/components/schemas/ToolChoiceAllowed'
        - $ref: '#/components/schemas/ToolChoiceTypes'
        - $ref: '#/components/schemas/ToolChoiceFunction'
        - $ref: '#/components/schemas/ToolChoiceMCP'
        - $ref: '#/components/schemas/ToolChoiceCustom'
        - $ref: '#/components/schemas/SpecificProgrammaticToolCallingParam'
        - $ref: '#/components/schemas/SpecificApplyPatchParam'
        - $ref: '#/components/schemas/SpecificFunctionShellParam'
    Prompt:
      anyOf:
        - type: object
          description: >
            Reference to a prompt template and its variables.

            [Learn
            more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
          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: '#/components/schemas/ResponsePromptVariables'
        - type: 'null'
    CyberAccessProgramEnum:
      type: string
      enum:
        - standard
        - daybreak_blue
        - daybreak_red
    ImageContextCompression:
      type: string
      enum:
        - auto
        - enabled
        - disabled
    PromptCacheModeEnum:
      type: string
      enum:
        - implicit
        - explicit
    ReasoningModeEnum:
      anyOf:
        - type: string
        - type: string
          enum:
            - standard
            - pro
    ReasoningEffort:
      anyOf:
        - type: string
          enum:
            - none
            - minimal
            - low
            - medium
            - high
            - xhigh
            - max
          default: medium
          description: >
            Constrains effort on reasoning for reasoning models. Currently
            supported

            values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and
            `max`.

            Reducing reasoning effort can result in faster responses and fewer
            tokens

            used on reasoning in a response. Not all reasoning models support
            every

            value. See the

            [reasoning
            guide](https://developers.openai.com/api/docs/guides/reasoning)

            for model-specific support.
        - type: 'null'
    ModerationPolicyParam:
      properties:
        input:
          anyOf:
            - $ref: '#/components/schemas/ModerationConfigParam'
              description: The moderation policy for the response input.
            - type: 'null'
        output:
          anyOf:
            - $ref: '#/components/schemas/ModerationConfigParam'
              description: The moderation policy for the response output.
            - type: 'null'
      type: object
      required: []
      description: The policy to apply to moderated response input and output.
    ConversationParam-2:
      properties:
        id:
          type: string
          description: The unique ID of the conversation.
          example: conv_123
      type: object
      required:
        - id
      title: Conversation object
      description: The conversation that this response belongs to.
    Metadata:
      anyOf:
        - type: object
          description: >
            Set of 16 key-value pairs that can be attached to an object. This
            can be

            useful for storing additional information about the object in a
            structured

            format, and querying for objects via API or the dashboard.


            Keys are strings with a maximum length of 64 characters. Values are
            strings

            with a maximum length of 512 characters.
          additionalProperties:
            type: string
        - type: 'null'
    ResolvedImageContextCompressionEnum:
      type: string
      enum:
        - enabled
        - disabled
    ResponseErrorCode:
      type: string
      description: |
        The error code for the response.
      enum:
        - server_error
        - rate_limit_exceeded
        - invalid_prompt
        - data_residency_mismatch
        - bio_policy
        - misalignment_policy_violation
        - 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
    MisalignmentErrorDetailsResource:
      properties:
        review_target:
          anyOf:
            - not:
                pattern: '[^A-Za-z0-9._~:-]'
              type: string
              maxLength: 96
              minLength: 1
              pattern: ^[A-Za-z0-9._~:-]+$
              description: >-
                An opaque target for explicitly continuing this review, or null
                when unavailable.
            - type: 'null'
        error_type:
          $ref: '#/components/schemas/_MisalignmentErrorType'
          description: An optional classification; clients must accept additional values.
        detailed_explanation:
          type: string
          description: The public explanation for this block.
        steer:
          $ref: '#/components/schemas/_MisalignmentSteer'
          description: An optional public continuation instruction.
      type: object
      required: []
    InputRemovalReason:
      type: string
      enum:
        - organization_mismatch
        - end_user_mismatch
        - model_mismatch
        - prefix_mismatch
        - turn_boundary
    OutputMessage:
      type: object
      title: Output message
      description: |
        An output message from the model.
      properties:
        id:
          type: string
          description: |
            The unique ID of the output message.
        type:
          type: string
          description: |
            The type of the output message. Always `message`.
          const: message
        role:
          type: string
          description: |
            The role of the output message. Always `assistant`.
          const: assistant
        content:
          type: array
          description: |
            The content of the output message.
          items:
            $ref: '#/components/schemas/OutputMessageContent'
        phase:
          anyOf:
            - $ref: '#/components/schemas/MessagePhase'
            - type: 'null'
        status:
          type: string
          description: >
            The status of the message input. One of `in_progress`, `completed`,
            or

            `incomplete`. Populated when input items are returned via API.
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - id
        - type
        - role
        - content
        - status
    FileSearchToolCall:
      type: object
      title: File search tool call
      description: >
        The results of a file search tool call. See the

        [file search
        guide](https://developers.openai.com/api/docs/guides/tools-file-search)
        for more information.
      properties:
        id:
          type: string
          description: |
            The unique ID of the file search tool call.
        type:
          type: string
          enum:
            - file_search_call
          description: |
            The type of the file search tool call. Always `file_search_call`.
        status:
          type: string
          description: |
            The status of the file search tool call. One of `in_progress`,
            `searching`, `incomplete` or `failed`,
          enum:
            - in_progress
            - searching
            - completed
            - incomplete
            - failed
        queries:
          type: array
          items:
            type: string
          description: |
            The queries used to search for files.
        results:
          anyOf:
            - type: array
              description: |
                The results of the file search tool call.
              items:
                type: object
                properties:
                  file_id:
                    type: string
                    description: |
                      The unique ID of the file.
                  text:
                    type: string
                    description: |
                      The text that was retrieved from the file.
                  filename:
                    type: string
                    description: |
                      The name of the file.
                  attributes:
                    $ref: '#/components/schemas/VectorStoreFileAttributes'
                  score:
                    type: number
                    format: float
                    description: |
                      The relevance score of the file - a value between 0 and 1.
            - type: 'null'
      required:
        - id
        - type
        - status
        - queries
    FunctionToolCall:
      type: object
      title: Function tool call
      description: >
        A tool call to run a function. See the

        [function calling
        guide](https://developers.openai.com/api/docs/guides/function-calling)
        for more information.
      properties:
        id:
          type: string
          description: |
            The unique ID of the function tool call.
        type:
          type: string
          const: function_call
          description: |
            The type of the function tool call. Always `function_call`.
        call_id:
          type: string
          description: |
            The unique ID of the function tool call generated by the model.
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCaller'
            - type: 'null'
        namespace:
          type: string
          description: |
            The namespace of the function to run.
        name:
          type: string
          description: |
            The name of the function to run.
        arguments:
          type: string
          description: |
            A JSON string of the arguments to pass to the function.
        status:
          type: string
          description: |
            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.
          enum:
            - in_progress
            - completed
            - incomplete
        async:
          type: boolean
          description: |
            Whether the function tool call runs asynchronously.
      required:
        - type
        - call_id
        - name
        - arguments
    FunctionToolCallOutputResource:
      allOf:
        - $ref: '#/components/schemas/FunctionToolCallOutput'
        - type: object
          properties:
            id:
              type: string
              description: |
                The unique ID of the function call tool output.
            status:
              $ref: '#/components/schemas/FunctionCallOutputStatusEnum'
              description: |
                The status of the item. One of `in_progress`, `completed`, or
                `incomplete`. Populated when items are returned via API.
            created_by:
              type: string
              description: |
                The identifier of the actor that created the item.
          required:
            - id
            - status
    WebSearchToolCall:
      type: object
      title: Web search tool call
      description: >
        The results of a web search tool call. See the

        [web search
        guide](https://developers.openai.com/api/docs/guides/tools-web-search)
        for more information.
      properties:
        id:
          type: string
          description: |
            The unique ID of the web search tool call.
        type:
          type: string
          const: web_search_call
          description: |
            The type of the web search tool call. Always `web_search_call`.
        status:
          $ref: '#/components/schemas/WebSearchCallStatus'
          description: |
            The status of the web search tool call.
        action:
          type: object
          description: >
            An object describing the specific action taken in this web search
            call.

            Includes details on how the model used the web (search, open_page,
            find_in_page).
          oneOf:
            - $ref: '#/components/schemas/WebSearchActionSearch'
            - $ref: '#/components/schemas/WebSearchActionOpenPage'
            - $ref: '#/components/schemas/WebSearchActionFind'
          discriminator:
            propertyName: type
      required:
        - id
        - type
        - status
    ComputerToolCall:
      type: object
      title: Computer tool call
      description: >
        A tool call to a computer use tool. See the

        [computer use
        guide](https://developers.openai.com/api/docs/guides/tools-computer-use)
        for more information.
      properties:
        type:
          type: string
          description: The type of the computer call. Always `computer_call`.
          enum:
            - computer_call
          default: computer_call
        id:
          type: string
          description: The unique ID of the computer call.
        call_id:
          type: string
          description: |
            An identifier used when responding to the tool call with output.
        action:
          $ref: '#/components/schemas/ComputerAction'
        actions:
          $ref: '#/components/schemas/ComputerActionList'
        pending_safety_checks:
          type: array
          items:
            $ref: '#/components/schemas/ComputerCallSafetyCheckParam'
          description: |
            The pending safety checks for the computer call.
        status:
          type: string
          description: |
            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - type
        - id
        - call_id
        - pending_safety_checks
        - status
    ComputerToolCallOutputResource:
      allOf:
        - $ref: '#/components/schemas/ComputerToolCallOutput'
        - type: object
          properties:
            status:
              $ref: '#/components/schemas/ComputerCallOutputStatus'
              description: >
                The status of the message input. One of `in_progress`,
                `completed`, or

                `incomplete`. Populated when input items are returned via API.
            created_by:
              type: string
              description: |
                The identifier of the actor that created the item.
          required:
            - id
            - status
    ReasoningItem:
      type: object
      description: >
        A description of the chain of thought used by a reasoning model while
        generating

        a response. Be sure to include these items in your `input` to the
        Responses API

        for subsequent turns of a conversation if you are manually

        [managing
        context](https://developers.openai.com/api/docs/guides/conversation-state).
      title: Reasoning
      properties:
        type:
          type: string
          description: |
            The type of the object. Always `reasoning`.
          enum:
            - reasoning
        id:
          type: string
          description: |
            The unique identifier of the reasoning content.
        encrypted_content:
          anyOf:
            - type: string
              description: >
                The encrypted content of the reasoning item. This is populated
                by default

                for reasoning items returned by `POST /v1/responses` and
                WebSocket

                `response.create` requests.


                When streaming, use the completed reasoning item and its

                `encrypted_content` from the `response.output_item.done` event
                in

                subsequent requests. The `encrypted_content` in

                `response.output_item.added` may be incomplete. This is
                especially

                important when `store` is `false` or when using Zero Data
                Retention.
            - type: 'null'
        summary:
          type: array
          description: |
            Reasoning summary content.
          items:
            $ref: '#/components/schemas/SummaryTextContent'
        content:
          type: array
          description: |
            Reasoning text content.
          items:
            $ref: '#/components/schemas/ReasoningTextContent'
        status:
          type: string
          description: |
            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - id
        - summary
        - type
    Program:
      properties:
        type:
          type: string
          enum:
            - program
          description: The type of the item. Always `program`.
          default: program
        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
    ProgramOutput:
      properties:
        type:
          type: string
          enum:
            - program_output
          description: The type of the item. Always `program_output`.
          default: program_output
        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: '#/components/schemas/ProgramOutputStatus'
          description: The terminal status of the program output item.
      type: object
      required:
        - type
        - id
        - call_id
        - result
        - status
    ToolSearchCall:
      properties:
        type:
          type: string
          enum:
            - tool_search_call
          description: The type of the item. Always `tool_search_call`.
          default: tool_search_call
        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: '#/components/schemas/ToolSearchExecutionType'
          description: Whether tool search was executed by the server or by the client.
        arguments:
          description: Arguments used for the tool search call.
        status:
          $ref: '#/components/schemas/FunctionCallStatus'
          description: The status of the tool search call item that was recorded.
        created_by:
          type: string
          description: The identifier of the actor that created the item.
      type: object
      required:
        - type
        - id
        - call_id
        - execution
        - arguments
        - status
    ToolSearchOutput:
      properties:
        type:
          type: string
          enum:
            - tool_search_output
          description: The type of the item. Always `tool_search_output`.
          default: tool_search_output
        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: '#/components/schemas/ToolSearchExecutionType'
          description: Whether tool search was executed by the server or by the client.
        tools:
          items:
            $ref: '#/components/schemas/Tool'
          type: array
          description: The loaded tool definitions returned by tool search.
        status:
          $ref: '#/components/schemas/FunctionCallOutputStatusEnum'
          description: The status of the tool search output item that was recorded.
        created_by:
          type: string
          description: The identifier of the actor that created the item.
      type: object
      required:
        - type
        - id
        - call_id
        - execution
        - tools
        - status
    AdditionalTools:
      properties:
        type:
          type: string
          enum:
            - additional_tools
          description: The type of the item. Always `additional_tools`.
          default: additional_tools
        id:
          type: string
          description: The unique ID of the additional tools item.
        role:
          $ref: '#/components/schemas/MessageRole'
          description: The role that provided the additional tools.
        tools:
          items:
            $ref: '#/components/schemas/Tool'
          type: array
          description: The additional tool definitions made available at this item.
      type: object
      required:
        - type
        - id
        - role
        - tools
    CompactionBody:
      properties:
        type:
          type: string
          enum:
            - compaction
          description: The type of the item. Always `compaction`.
          default: compaction
        id:
          type: string
          description: The unique ID of the compaction item.
        encrypted_content:
          type: string
          description: The encrypted content that was produced by compaction.
        created_by:
          type: string
          description: The identifier of the actor that created the item.
      type: object
      required:
        - type
        - id
        - encrypted_content
      title: Compaction item
      description: >-
        A compaction item generated by the [`v1/responses/compact`
        API](https://developers.openai.com/api/reference/resources/responses/methods/compact).
    ImageGenToolCall:
      properties:
        type:
          type: string
          enum:
            - image_generation_call
          description: >-
            The type of the image generation call. Always
            `image_generation_call`.
        id:
          type: string
          description: The unique ID of the image generation call.
        status:
          type: string
          enum:
            - in_progress
            - completed
            - generating
            - failed
          description: The status of the image generation call.
        result:
          anyOf:
            - type: string
              description: The generated image encoded in base64.
            - type: 'null'
        error:
          $ref: '#/components/schemas/ImageGenToolCallError'
          description: Details of a moderation failure, when available.
        size:
          anyOf:
            - anyOf:
                - type: string
                - type: string
                  enum:
                    - 1024x1024
                    - 1024x1536
                    - 1536x1024
              description: >-
                The image dimensions as a `WIDTHxHEIGHT` string, for example
                `1536x864`.
            - type: 'null'
        quality:
          anyOf:
            - type: string
              enum:
                - low
                - medium
                - high
                - xhigh
                - max
                - auto
              description: >-
                The quality of the image generated by the image generation tool
                call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
            - type: 'null'
        action:
          anyOf:
            - $ref: '#/components/schemas/ImageGenActionEnum'
              description: The action used for image generation.
            - type: 'null'
        background:
          anyOf:
            - $ref: '#/components/schemas/ImageBackground'
              description: The background setting used for generation.
            - type: 'null'
        output_format:
          anyOf:
            - $ref: '#/components/schemas/ImageOutputFormat'
              description: The output format used for generation.
            - type: 'null'
        svg_usage:
          $ref: '#/components/schemas/SvgUsage'
        revised_prompt:
          anyOf:
            - type: string
              description: The prompt that was used after any model prompt rewriting.
            - type: 'null'
      type: object
      required:
        - type
        - id
        - status
        - result
      title: Image generation call
      description: An image generation request made by the model.
    CodeInterpreterToolCall:
      type: object
      title: Code interpreter tool call
      description: |
        A tool call to run code.
      properties:
        type:
          type: string
          enum:
            - code_interpreter_call
          default: code_interpreter_call
          description: >
            The type of the code interpreter tool call. Always
            `code_interpreter_call`.
        id:
          type: string
          description: |
            The unique ID of the code interpreter tool call.
        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`.
        container_id:
          type: string
          description: |
            The ID of the container used to run the code.
        code:
          anyOf:
            - type: string
              description: |
                The code to run, or null if not available.
            - type: 'null'
        outputs:
          anyOf:
            - type: array
              items:
                oneOf:
                  - $ref: '#/components/schemas/CodeInterpreterOutputLogs'
                  - $ref: '#/components/schemas/CodeInterpreterOutputImage'
                discriminator:
                  propertyName: type
              discriminator:
                propertyName: type
              description: >
                The outputs generated by the code interpreter, such as logs or
                images.

                Can be null if no outputs are available.
            - type: 'null'
      required:
        - type
        - id
        - status
        - container_id
        - code
        - outputs
    LocalShellToolCall:
      type: object
      title: Local shell call
      description: |
        A tool call to run a command on the local shell.
      properties:
        type:
          type: string
          enum:
            - local_shell_call
          description: |
            The type of the local shell call. Always `local_shell_call`.
        id:
          type: string
          description: |
            The unique ID of the local shell call.
        call_id:
          type: string
          description: |
            The unique ID of the local shell tool call generated by the model.
        action:
          $ref: '#/components/schemas/LocalShellExecAction'
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
          description: |
            The status of the local shell call.
      required:
        - type
        - id
        - call_id
        - action
        - status
    LocalShellToolCallOutput:
      type: object
      title: Local shell call output
      description: |
        The output of a local shell tool call.
      properties:
        type:
          type: string
          enum:
            - local_shell_call_output
          description: >
            The type of the local shell tool call output. Always
            `local_shell_call_output`.
        id:
          type: string
          description: |
            The unique ID of the local shell tool call generated by the model.
        output:
          type: string
          description: |
            A JSON string of the output of the local shell tool call.
        status:
          anyOf:
            - type: string
              enum:
                - in_progress
                - completed
                - incomplete
              description: >
                The status of the item. One of `in_progress`, `completed`, or
                `incomplete`.
            - type: 'null'
      required:
        - id
        - type
        - call_id
        - output
    FunctionShellCall:
      properties:
        type:
          type: string
          enum:
            - shell_call
          description: The type of the item. Always `shell_call`.
          default: shell_call
        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: '#/components/schemas/ToolCallCaller'
              description: The execution context that produced this tool call.
            - type: 'null'
        action:
          $ref: '#/components/schemas/FunctionShellAction'
          description: >-
            The shell commands and limits that describe how to run the tool
            call.
        status:
          $ref: '#/components/schemas/FunctionShellCallStatus'
          description: >-
            The status of the shell call. One of `in_progress`, `completed`, or
            `incomplete`.
        environment:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/LocalEnvironmentResource'
                - $ref: '#/components/schemas/ContainerReferenceResource'
              discriminator:
                propertyName: type
            - type: 'null'
        created_by:
          type: string
          description: The ID of the entity that created this tool call.
      type: object
      required:
        - type
        - id
        - call_id
        - action
        - status
        - environment
      title: Shell tool call
      description: >-
        A tool call that executes one or more shell commands in a managed
        environment.
    FunctionShellCallOutput:
      properties:
        type:
          type: string
          enum:
            - shell_call_output
          description: The type of the shell call output. Always `shell_call_output`.
          default: shell_call_output
        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: '#/components/schemas/ToolCallCaller'
              description: The execution context that produced this tool call.
            - type: 'null'
        status:
          $ref: '#/components/schemas/FunctionShellCallOutputStatusEnum'
          description: >-
            The status of the shell call output. One of `in_progress`,
            `completed`, or `incomplete`.
        output:
          items:
            $ref: '#/components/schemas/FunctionShellCallOutputContent'
          type: array
          description: An array of shell call output contents
        max_output_length:
          anyOf:
            - type: integer
              description: >-
                The maximum length of the shell command output. This is
                generated by the model and should be passed back with the raw
                output.
            - 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.
    ApplyPatchToolCall:
      properties:
        type:
          type: string
          enum:
            - apply_patch_call
          description: The type of the item. Always `apply_patch_call`.
          default: apply_patch_call
        id:
          type: string
          description: >-
            The unique ID of the apply patch tool call. Populated when this item
            is returned via API.
        call_id:
          type: string
          description: The unique ID of the apply patch tool call generated by the model.
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCaller'
              description: The execution context that produced this tool call.
            - type: 'null'
        status:
          $ref: '#/components/schemas/ApplyPatchCallStatus'
          description: >-
            The status of the apply patch tool call. One of `in_progress` or
            `completed`.
        operation:
          oneOf:
            - $ref: '#/components/schemas/ApplyPatchCreateFileOperation'
            - $ref: '#/components/schemas/ApplyPatchDeleteFileOperation'
            - $ref: '#/components/schemas/ApplyPatchUpdateFileOperation'
          title: Apply patch operation
          description: >-
            One of the create_file, delete_file, or update_file operations
            applied via apply_patch.
          discriminator:
            propertyName: type
        created_by:
          type: string
          description: The ID of the entity that created this tool call.
      type: object
      required:
        - type
        - id
        - call_id
        - status
        - operation
      title: Apply patch tool call
      description: >-
        A tool call that applies file diffs by creating, deleting, or updating
        files.
    ApplyPatchToolCallOutput:
      properties:
        type:
          type: string
          enum:
            - apply_patch_call_output
          description: The type of the item. Always `apply_patch_call_output`.
          default: apply_patch_call_output
        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: '#/components/schemas/ToolCallCaller'
              description: The execution context that produced this tool call.
            - type: 'null'
        status:
          $ref: '#/components/schemas/ApplyPatchCallOutputStatus'
          description: >-
            The status of the apply patch tool call output. One of `completed`
            or `failed`.
        output:
          anyOf:
            - type: string
              description: Optional textual output returned by the apply patch tool.
            - 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.
    MCPToolCall:
      type: object
      title: MCP tool call
      description: |
        An invocation of a tool on an MCP server.
      properties:
        type:
          type: string
          const: mcp_call
          description: |
            The type of the item. Always `mcp_call`.
        id:
          type: string
          description: |
            The unique ID of the tool call.
        server_label:
          type: string
          description: |
            The label of the MCP server running the tool.
        name:
          type: string
          description: |
            The name of the tool that was run.
        arguments:
          type: string
          description: |
            A JSON string of the arguments passed to the tool.
        output:
          anyOf:
            - type: string
              description: |
                The output from the tool call.
            - type: 'null'
        error:
          description: The error from the tool call, if any.
          anyOf:
            - $ref: '#/components/schemas/MCPToolCallError'
            - type: 'null'
        status:
          $ref: '#/components/schemas/MCPToolCallStatus'
          description: >
            The status of the tool call. One of `in_progress`, `completed`,
            `incomplete`, `calling`, or `failed`.
        approval_request_id:
          anyOf:
            - type: string
              description: >
                Unique identifier for the MCP tool call approval request.

                Include this value in a subsequent `mcp_approval_response` input
                to approve or reject the corresponding tool call.
            - type: 'null'
      required:
        - type
        - id
        - server_label
        - name
        - arguments
    MCPListTools:
      type: object
      title: MCP list tools
      description: |
        A list of tools available on an MCP server.
      properties:
        type:
          type: string
          const: mcp_list_tools
          description: |
            The type of the item. Always `mcp_list_tools`.
        id:
          type: string
          description: |
            The unique ID of the list.
        server_label:
          type: string
          description: |
            The label of the MCP server.
        tools:
          type: array
          items:
            $ref: '#/components/schemas/MCPListToolsTool'
          description: |
            The tools available on the server.
        error:
          anyOf:
            - type: string
              description: |
                Error message if the server could not list tools.
            - type: 'null'
      required:
        - type
        - id
        - server_label
        - tools
    MCPApprovalRequest:
      type: object
      title: MCP approval request
      description: |
        A request for human approval of a tool invocation.
      properties:
        type:
          type: string
          const: mcp_approval_request
          description: |
            The type of the item. Always `mcp_approval_request`.
        id:
          type: string
          description: |
            The unique ID of the approval request.
        server_label:
          type: string
          description: |
            The label of the MCP server making the request.
        name:
          type: string
          description: |
            The name of the tool to run.
        arguments:
          type: string
          description: |
            A JSON string of arguments for the tool.
      required:
        - type
        - id
        - server_label
        - name
        - arguments
    MCPApprovalResponseResource:
      type: object
      title: MCP approval response
      description: |
        A response to an MCP approval request.
      properties:
        type:
          type: string
          const: mcp_approval_response
          description: |
            The type of the item. Always `mcp_approval_response`.
        id:
          type: string
          description: |
            The unique ID of the approval response
        approval_request_id:
          type: string
          description: |
            The ID of the approval request being answered.
        approve:
          type: boolean
          description: |
            Whether the request was approved.
        reason:
          anyOf:
            - type: string
              description: |
                Optional reason for the decision.
            - type: 'null'
      required:
        - type
        - id
        - request_id
        - approve
        - approval_request_id
    CustomToolCall:
      type: object
      title: Custom tool call
      description: |
        A call to a custom tool created by the model.
      properties:
        type:
          type: string
          enum:
            - custom_tool_call
          description: |
            The type of the custom tool call. Always `custom_tool_call`.
        id:
          type: string
          description: |
            The unique ID of the custom tool call in the OpenAI platform.
        call_id:
          type: string
          description: >
            An identifier used to map this custom tool call to a tool call
            output.
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCaller'
            - type: 'null'
        namespace:
          type: string
          description: |
            The namespace of the custom tool being called.
        name:
          type: string
          description: |
            The name of the custom tool being called.
        input:
          type: string
          description: |
            The input for the custom tool call generated by the model.
        async:
          type: boolean
          description: |
            Whether the custom tool call runs asynchronously.
      required:
        - type
        - call_id
        - name
        - input
    CustomToolCallOutputResource:
      title: ResponseCustomToolCallOutputItem
      allOf:
        - $ref: '#/components/schemas/CustomToolCallOutput'
        - type: object
          properties:
            id:
              type: string
              description: |
                The unique ID of the custom tool call output item.
            status:
              $ref: '#/components/schemas/FunctionCallOutputStatusEnum'
              description: |
                The status of the item. One of `in_progress`, `completed`, or
                `incomplete`. Populated when items are returned via API.
            created_by:
              type: string
              description: |
                The identifier of the actor that created the item.
          required:
            - id
            - status
    EasyInputMessage:
      type: object
      title: Input message
      description: >
        A message input to the model with a role indicating instruction
        following

        hierarchy. Instructions given with the `developer` or `system` role take

        precedence over instructions given with the `user` role. Messages with
        the

        `assistant` role are presumed to have been generated by the model in
        previous

        interactions.
      properties:
        role:
          type: string
          description: >
            The role of the message input. One of `user`, `assistant`, `system`,
            or

            `developer`.
          enum:
            - user
            - assistant
            - system
            - developer
        content:
          description: >
            Text, image, or audio input to the model, used to generate a
            response.

            Can also contain previous assistant responses.
          oneOf:
            - type: string
              title: Text input
              description: |
                A text input to the model.
            - $ref: '#/components/schemas/InputMessageContentList'
        phase:
          anyOf:
            - $ref: '#/components/schemas/MessagePhase'
            - type: 'null'
        type:
          type: string
          description: |
            The type of the message input. Always `message`.
          enum:
            - message
      required:
        - role
        - content
    Item:
      type: object
      description: |
        Content item used to generate a response.
      oneOf:
        - $ref: '#/components/schemas/InputMessage'
        - $ref: '#/components/schemas/OutputMessage'
        - $ref: '#/components/schemas/FileSearchToolCall'
        - $ref: '#/components/schemas/ComputerToolCall'
        - $ref: '#/components/schemas/ComputerCallOutputItemParam'
        - $ref: '#/components/schemas/WebSearchToolCall'
        - $ref: '#/components/schemas/FunctionToolCall'
        - $ref: '#/components/schemas/FunctionCallOutputItemParam'
        - $ref: '#/components/schemas/ToolSearchCallItemParam'
        - $ref: '#/components/schemas/ToolSearchOutputItemParam'
        - $ref: '#/components/schemas/AdditionalToolsItemParam'
        - $ref: '#/components/schemas/ResponseConfigurationUpdateItemParam'
        - $ref: '#/components/schemas/ReasoningItem'
        - $ref: '#/components/schemas/CompactionSummaryItemParam'
        - $ref: '#/components/schemas/ImageGenToolCall'
        - $ref: '#/components/schemas/CodeInterpreterToolCall'
        - $ref: '#/components/schemas/LocalShellToolCall'
        - $ref: '#/components/schemas/LocalShellToolCallOutput'
        - $ref: '#/components/schemas/FunctionShellCallItemParam'
        - $ref: '#/components/schemas/FunctionShellCallOutputItemParam'
        - $ref: '#/components/schemas/ApplyPatchToolCallItemParam'
        - $ref: '#/components/schemas/ApplyPatchToolCallOutputItemParam'
        - $ref: '#/components/schemas/MCPListTools'
        - $ref: '#/components/schemas/MCPApprovalRequest'
        - $ref: '#/components/schemas/MCPApprovalResponse'
        - $ref: '#/components/schemas/MCPToolCall'
        - $ref: '#/components/schemas/CustomToolCallOutput'
        - $ref: '#/components/schemas/CustomToolCall'
      discriminator:
        propertyName: type
    CompactionTriggerItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: The unique ID of this compaction trigger.
              example: msg_123
            - type: 'null'
        type:
          type: string
          enum:
            - compaction_trigger
          description: The type of the item. Always `compaction_trigger`.
          default: compaction_trigger
      type: object
      required:
        - type
      title: Compaction trigger
      description: Compacts the current context. Must be the final input item.
    ItemReferenceParam:
      properties:
        type:
          anyOf:
            - type: string
              enum:
                - item_reference
              description: The type of item to reference. Always `item_reference`.
              default: item_reference
            - 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.
    ProgramItemParam:
      properties:
        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
        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
    ProgramOutputItemParam:
      properties:
        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
        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: '#/components/schemas/ProgramOutputItemStatus'
          description: The terminal status of the program output.
      type: object
      required:
        - id
        - type
        - call_id
        - result
        - status
    CacheWriteTokensDetails:
      properties:
        ttl_30m_tokens:
          type: integer
          description: The number of input tokens written with 30-minute retention.
        ttl_12h_tokens:
          type: integer
          description: The number of input tokens written with 12-hour retention.
      type: object
      required:
        - ttl_30m_tokens
        - ttl_12h_tokens
    ImageGenToolUsage:
      properties:
        input_tokens:
          type: integer
          description: The number of tokens (images and text) in the input prompt.
        total_tokens:
          type: integer
          description: >-
            The total number of tokens (images and text) used for the image
            generation.
        output_tokens:
          type: integer
          description: The number of output tokens generated by the model.
        output_tokens_details:
          $ref: '#/components/schemas/ImageGenOutputTokensDetails'
        input_tokens_details:
          $ref: '#/components/schemas/ImageGenInputUsageDetails'
        cached_tokens:
          type: integer
        cached_tokens_details:
          $ref: '#/components/schemas/CachedUsageDetails'
      type: object
      required:
        - input_tokens
        - total_tokens
        - output_tokens
        - input_tokens_details
      title: Image generation tool usage
      description: Token usage for image generation tool calls in a response.
    WebSearchUsage:
      properties:
        num_requests:
          type: integer
          description: The number of billable web search requests issued.
      type: object
      required:
        - num_requests
      title: Web search usage
      description: >-
        Usage details for web search requests that ran while generating the
        response.
    PromptCacheMissDiagnosticsBody:
      properties:
        type:
          type: string
          enum:
            - cache_miss
          default: cache_miss
        reason:
          $ref: '#/components/schemas/CacheMissReasonTypeEnum'
          description: The reason prompt cache reuse did not occur.
        cache_missed_tokens:
          type: integer
          description: >-
            The estimated number of input tokens affected after the first
            detected divergence.
        comparison_reusable_tokens:
          type: integer
          description: The raw token count of the reusable prefix in the compared response.
      type: object
      required:
        - type
        - reason
        - cache_missed_tokens
    PromptCacheHitDiagnosticsBody:
      properties:
        type:
          type: string
          enum:
            - cache_hit
          default: cache_hit
      type: object
      required:
        - type
    PromptCacheComparisonResponseNotFoundDiagnosticsBody:
      properties:
        type:
          type: string
          enum:
            - comparison_response_not_found
          default: comparison_response_not_found
      type: object
      required:
        - type
    PromptCacheUnavailableDiagnosticsBody:
      properties:
        type:
          type: string
          enum:
            - unavailable
          default: unavailable
      type: object
      required:
        - type
    ModerationResultBody:
      properties:
        type:
          type: string
          enum:
            - moderation_result
          description: >-
            The object type, which was always `moderation_result` for successful
            moderation results.
          default: moderation_result
        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.
        category_scores:
          additionalProperties:
            type: number
          type: object
          description: A dictionary of moderation categories to scores.
        category_applied_input_types:
          additionalProperties:
            items:
              $ref: '#/components/schemas/ModerationInputType'
            type: array
          type: object
          description: >-
            Which modalities of input are reflected by the score for each
            category.
      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.
    ModerationErrorBody:
      properties:
        type:
          type: string
          enum:
            - error
          description: The object type, which was always `error` for moderation failures.
          default: error
        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.
    OutputContent:
      oneOf:
        - $ref: '#/components/schemas/OutputTextContent'
        - $ref: '#/components/schemas/RefusalContent'
        - $ref: '#/components/schemas/ReasoningTextContent'
      discriminator:
        propertyName: type
    ShellCallOutputDelta:
      properties:
        stdout:
          type: string
          description: The stdout delta that was emitted.
        stderr:
          type: string
          description: The stderr delta that was emitted.
      type: object
      required: []
      title: Shell call output delta
      description: A delta of stdout/stderr emitted while a shell call was running.
    FunctionShellCallOutputContent:
      properties:
        stdout:
          type: string
          description: The standard output that was captured.
        stderr:
          type: string
          description: The standard error output that was captured.
        outcome:
          oneOf:
            - $ref: '#/components/schemas/FunctionShellCallOutputTimeoutOutcome'
            - $ref: '#/components/schemas/FunctionShellCallOutputExitOutcome'
          title: Shell call outcome
          description: >-
            Represents either an exit outcome (with an exit code) or a timeout
            outcome for a shell call output chunk.
          discriminator:
            propertyName: type
        created_by:
          type: string
          description: The identifier of the actor that created the item.
      type: object
      required:
        - stdout
        - stderr
        - outcome
      title: Shell call output content
      description: The content of a shell tool call output that was emitted.
    ResponseLogProb:
      type: object
      description: >
        A logprob is the logarithmic probability that the model assigns to
        producing 

        a particular token at a given position in the sequence. Less-negative
        (higher) 

        logprob values indicate greater model confidence in that token choice.
      properties:
        token:
          description: A possible text token.
          type: string
        logprob:
          description: |
            The log probability of this token.
          type: number
        top_logprobs:
          description: |
            The log probabilities of up to 20 of the most likely tokens.
          type: array
          items:
            type: object
            properties:
              token:
                description: A possible text token.
                type: string
              logprob:
                description: The log probability of this token.
                type: number
      required:
        - token
        - logprob
    Annotation:
      oneOf:
        - $ref: '#/components/schemas/FileCitationBody'
        - $ref: '#/components/schemas/UrlCitationBody'
        - $ref: '#/components/schemas/ContainerFileCitationBody'
        - $ref: '#/components/schemas/FilePath'
      description: An annotation that applies to a span of output text.
      discriminator:
        propertyName: type
    TextResponseFormatConfiguration:
      description: >
        An object specifying the format that the model must output.


        Configuring `{ "type": "json_schema" }` enables Structured Outputs,

        which ensures the model will match your supplied JSON schema. Learn more
        in the

        [Structured Outputs
        guide](https://developers.openai.com/api/docs/guides/structured-outputs).


        The default format is `{ "type": "text" }` with no additional options.


        **Not recommended for gpt-4o and newer models:**


        Setting to `{ "type": "json_object" }` enables the older JSON mode,
        which

        ensures the message the model generates is valid JSON. Using
        `json_schema`

        is preferred for models that support it.
      oneOf:
        - $ref: '#/components/schemas/ResponseFormatText'
        - $ref: '#/components/schemas/TextResponseFormatJsonSchema'
        - $ref: '#/components/schemas/ResponseFormatJsonObject'
      discriminator:
        propertyName: type
    Verbosity:
      anyOf:
        - type: string
          enum:
            - low
            - medium
            - high
          default: medium
          description: >
            Constrains the verbosity of the model's response. Lower values will
            result in

            more concise responses, while higher values will result in more
            verbose responses.

            Currently supported values are `low`, `medium`, and `high`. The
            default is

            `medium`.
        - type: 'null'
    Tool:
      description: |
        A tool that can be used to generate a response.
      discriminator:
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/FunctionTool'
        - $ref: '#/components/schemas/FileSearchTool'
        - $ref: '#/components/schemas/ComputerTool'
        - $ref: '#/components/schemas/ComputerUsePreviewTool'
        - $ref: '#/components/schemas/WebSearchTool'
        - $ref: '#/components/schemas/MCPTool'
        - $ref: '#/components/schemas/CodeInterpreterTool'
        - $ref: '#/components/schemas/ProgrammaticToolCallingParam'
        - $ref: '#/components/schemas/ImageGenTool'
        - $ref: '#/components/schemas/LocalShellToolParam'
        - $ref: '#/components/schemas/FunctionShellToolParam'
        - $ref: '#/components/schemas/CustomToolParam'
        - $ref: '#/components/schemas/NamespaceToolParam'
        - $ref: '#/components/schemas/ToolSearchToolParam'
        - $ref: '#/components/schemas/WebSearchPreviewTool'
        - $ref: '#/components/schemas/ApplyPatchToolParam'
    ToolChoiceOptions:
      type: string
      title: Tool choice mode
      description: >
        Controls which (if any) tool is called by the model.


        `none` means the model will not call any tool and instead generates a
        message.


        `auto` means the model can pick between generating a message or calling
        one or

        more tools.


        `required` means the model must call one or more tools.
      enum:
        - none
        - auto
        - required
    ToolChoiceAllowed:
      type: object
      title: Allowed tools
      description: |
        Constrains the tools available to the model to a pre-defined set.
      properties:
        type:
          type: string
          enum:
            - allowed_tools
          description: Allowed tool configuration type. Always `allowed_tools`.
        mode:
          type: string
          enum:
            - auto
            - required
          description: >
            Constrains the tools available to the model to a pre-defined set.


            `auto` allows the model to pick from among the allowed tools and
            generate a

            message.


            `required` requires the model to call one or more of the allowed
            tools.
        tools:
          type: array
          description: |
            A list of tool definitions that the model should be allowed to call.

            For the Responses API, the list of tool definitions might look like:
            ```json
            [
              { "type": "function", "name": "get_weather" },
              { "type": "mcp", "server_label": "deepwiki" },
              { "type": "image_generation" }
            ]
            ```
          items:
            type: object
            description: |
              A tool definition that the model should be allowed to call.
            additionalProperties: true
      required:
        - type
        - mode
        - tools
    ToolChoiceTypes:
      type: object
      title: Hosted tool
      description: >
        Indicates that the model should use a built-in tool to generate a
        response.

        [Learn more about built-in
        tools](https://developers.openai.com/api/docs/guides/tools).
      properties:
        type:
          type: string
          description: >
            The type of hosted tool the model should to use. Learn more about

            [built-in
            tools](https://developers.openai.com/api/docs/guides/tools).


            Allowed values are:

            - `file_search`

            - `web_search_preview`

            - `computer`

            - `computer_use_preview`

            - `computer_use`

            - `code_interpreter`

            - `image_generation`
          enum:
            - file_search
            - web_search_preview
            - computer
            - computer_use_preview
            - computer_use
            - web_search_preview_2025_03_11
            - image_generation
            - code_interpreter
      required:
        - type
    ToolChoiceFunction:
      type: object
      title: Function tool
      description: |
        Use this option to force the model to call a specific function.
      properties:
        type:
          type: string
          enum:
            - function
          description: For function calling, the type is always `function`.
        name:
          type: string
          description: The name of the function to call.
      required:
        - type
        - name
    ToolChoiceMCP:
      type: object
      title: MCP tool
      description: >
        Use this option to force the model to call a specific tool on a remote
        MCP server.
      properties:
        type:
          type: string
          enum:
            - mcp
          description: For MCP tools, the type is always `mcp`.
        server_label:
          type: string
          description: |
            The label of the MCP server to use.
        name:
          anyOf:
            - type: string
              description: |
                The name of the tool to call on the server.
            - type: 'null'
      required:
        - type
        - server_label
    ToolChoiceCustom:
      type: object
      title: Custom tool
      description: |
        Use this option to force the model to call a specific custom tool.
      properties:
        type:
          type: string
          enum:
            - custom
          description: For custom tool calling, the type is always `custom`.
        name:
          type: string
          description: The name of the custom tool to call.
      required:
        - type
        - name
    SpecificProgrammaticToolCallingParam:
      properties:
        type:
          type: string
          enum:
            - programmatic_tool_calling
          description: The tool to call. Always `programmatic_tool_calling`.
          default: programmatic_tool_calling
      type: object
      required:
        - type
    SpecificApplyPatchParam:
      properties:
        type:
          type: string
          enum:
            - apply_patch
          description: The tool to call. Always `apply_patch`.
          default: apply_patch
      type: object
      required:
        - type
      title: Specific apply patch tool choice
      description: >-
        Forces the model to call the apply_patch tool when executing a tool
        call.
    SpecificFunctionShellParam:
      properties:
        type:
          type: string
          enum:
            - shell
          description: The tool to call. Always `shell`.
          default: shell
      type: object
      required:
        - type
      title: Specific shell tool choice
      description: Forces the model to call the shell tool when a tool call is required.
    ResponsePromptVariables:
      anyOf:
        - type: object
          title: Prompt Variables
          description: |
            Optional map of values to substitute in for variables in your
            prompt. The substitution values can either be strings, or other
            Response input types like images or files.
          additionalProperties:
            oneOf:
              - type: string
              - $ref: '#/components/schemas/InputTextContent'
              - $ref: '#/components/schemas/InputImageContent'
              - $ref: '#/components/schemas/InputFileContent'
        - type: 'null'
    ModerationConfigParam:
      properties:
        mode:
          $ref: '#/components/schemas/ModerationMode'
      type: object
      required:
        - mode
      description: The moderation policy for the response input.
    _MisalignmentErrorType:
      anyOf:
        - type: string
        - type: string
          enum:
            - potentially_unintended_data_transfer
            - potentially_unintended_data_access
            - potentially_unintended_destructive_activity
            - other
    _MisalignmentSteer:
      properties:
        message:
          type: string
          description: The public continuation instruction.
      type: object
      required:
        - message
    OutputMessageContent:
      oneOf:
        - $ref: '#/components/schemas/OutputTextContent'
        - $ref: '#/components/schemas/RefusalContent'
      discriminator:
        propertyName: type
    MessagePhase:
      type: string
      description: >
        Labels an `assistant` message as intermediate commentary (`commentary`)
        or the final answer (`final_answer`).

        For models like `gpt-5.3-codex` and beyond, when sending follow-up
        requests, preserve and resend

        phase on all assistant messages — dropping it can degrade performance.
        Not used for user messages.
      enum:
        - commentary
        - final_answer
    VectorStoreFileAttributes:
      anyOf:
        - type: object
          description: >
            Set of 16 key-value pairs that can be attached to an object. This
            can be

            useful for storing additional information about the object in a
            structured

            format, and querying for objects via API or the dashboard. Keys are
            strings

            with a maximum length of 64 characters. Values are strings with a
            maximum

            length of 512 characters, booleans, or numbers.
          maxProperties: 16
          propertyNames:
            type: string
            maxLength: 64
          additionalProperties:
            oneOf:
              - type: string
                maxLength: 512
              - type: number
              - type: boolean
        - type: 'null'
    ToolCallCaller:
      oneOf:
        - $ref: '#/components/schemas/DirectToolCallCaller'
        - $ref: '#/components/schemas/ProgramToolCallCaller'
      description: The execution context that produced this tool call.
      discriminator:
        propertyName: type
    FunctionToolCallOutput:
      type: object
      title: Function tool call output
      description: |
        The output of a function tool call.
      properties:
        id:
          type: string
          description: >
            The unique ID of the function tool call output. Populated when this
            item

            is returned via API.
        type:
          type: string
          const: function_call_output
          description: >
            The type of the function tool call output. Always
            `function_call_output`.
        call_id:
          type: string
          description: |
            The unique ID of the function tool call generated by the model.
        name:
          type: string
          description: |
            The name of the tool that produced the output.
        namespace:
          type: string
          description: |
            The namespace of the tool that produced the output.
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCallerParam'
            - type: 'null'
        output:
          description: |
            The output from the function call generated by your code.
            Can be a string or an list of output content.
          oneOf:
            - type: string
              description: |
                A string of the output of the function call.
              title: string output
            - type: array
              items:
                $ref: '#/components/schemas/FunctionAndCustomToolCallOutput'
              title: output content list
              description: |
                Text, image, or file output of the function call.
        status:
          type: string
          description: |
            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - type
        - output
    FunctionCallOutputStatusEnum:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
    WebSearchCallStatus:
      type: string
      enum:
        - in_progress
        - searching
        - completed
        - failed
        - incomplete
    WebSearchActionSearch:
      type: object
      title: Search action
      description: |
        Action type "search" - Performs a web search query.
      properties:
        type:
          type: string
          const: search
          description: |
            The action type.
        query:
          type: string
          deprecated: true
          description: |
            The search query.
        queries:
          type: array
          title: Search queries
          description: |
            The search queries.
          items:
            type: string
            description: |
              A search query.
        sources:
          type: array
          title: Web search sources
          description: |
            The sources used in the search.
          items:
            type: object
            title: Web search source
            description: |
              A source used in the search.
            properties:
              type:
                type: string
                const: url
                description: |
                  The type of source. Always `url`.
              url:
                type: string
                format: uri
                description: |
                  The URL of the source.
            required:
              - type
              - url
      required:
        - type
    WebSearchActionOpenPage:
      type: object
      title: Open page action
      description: |
        Action type "open_page" - Opens a specific URL from search results.
      properties:
        type:
          type: string
          const: open_page
          description: |
            The action type.
        url:
          description: |
            The URL opened by the model.
          anyOf:
            - type: string
              format: uri
            - type: 'null'
      required:
        - type
    WebSearchActionFind:
      type: object
      title: Find action
      description: |
        Action type "find_in_page": Searches for a pattern within a loaded page.
      properties:
        type:
          type: string
          const: find_in_page
          description: |
            The action type.
        url:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
          description: |
            The URL of the page searched for the pattern, when available.
        pattern:
          type: string
          description: |
            The pattern or text to search for within the page.
      required:
        - type
        - pattern
    ComputerAction:
      oneOf:
        - $ref: '#/components/schemas/ClickParam'
        - $ref: '#/components/schemas/DoubleClickAction'
        - $ref: '#/components/schemas/DragParam'
        - $ref: '#/components/schemas/KeyPressAction'
        - $ref: '#/components/schemas/MoveParam'
        - $ref: '#/components/schemas/ScreenshotParam'
        - $ref: '#/components/schemas/ScrollParam'
        - $ref: '#/components/schemas/TypeParam'
        - $ref: '#/components/schemas/WaitParam'
      discriminator:
        propertyName: type
    ComputerActionList:
      title: Computer Action List
      type: array
      description: |
        Flattened batched actions for `computer_use`. Each action includes an
        `type` discriminator and action-specific fields.
      items:
        $ref: '#/components/schemas/ComputerAction'
    ComputerCallSafetyCheckParam:
      properties:
        id:
          type: string
          description: The ID of the pending safety check.
        code:
          anyOf:
            - type: string
              description: The type of the pending safety check.
            - 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.
    ComputerToolCallOutput:
      type: object
      title: Computer tool call output
      description: |
        The output of a computer tool call.
      properties:
        type:
          type: string
          description: >
            The type of the computer tool call output. Always
            `computer_call_output`.
          const: computer_call_output
          default: computer_call_output
        id:
          type: string
          description: |
            The ID of the computer tool call output.
        call_id:
          type: string
          description: |
            The ID of the computer tool call that produced the output.
        acknowledged_safety_checks:
          type: array
          description: >
            The safety checks reported by the API that have been acknowledged by
            the

            developer.
          items:
            $ref: '#/components/schemas/ComputerCallSafetyCheckParam'
        output:
          $ref: '#/components/schemas/ComputerScreenshotImage'
        status:
          type: string
          description: >
            The status of the message input. One of `in_progress`, `completed`,
            or

            `incomplete`. Populated when input items are returned via API.
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - type
        - call_id
        - output
    ComputerCallOutputStatus:
      type: string
      enum:
        - completed
        - incomplete
        - failed
    SummaryTextContent:
      properties:
        type:
          type: string
          enum:
            - summary_text
          description: The type of the object. Always `summary_text`.
          default: summary_text
        text:
          type: string
          description: A summary of the reasoning output from the model so far.
      type: object
      required:
        - type
        - text
      title: Summary text
      description: A summary text from the model.
    ReasoningTextContent:
      properties:
        type:
          type: string
          enum:
            - reasoning_text
          description: The type of the reasoning text. Always `reasoning_text`.
          default: reasoning_text
        text:
          type: string
          description: The reasoning text from the model.
      type: object
      required:
        - type
        - text
      title: Reasoning text
      description: Reasoning text from the model.
    ProgramOutputStatus:
      type: string
      enum:
        - completed
        - incomplete
    ToolSearchExecutionType:
      type: string
      enum:
        - server
        - client
    FunctionCallStatus:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
    MessageRole:
      type: string
      enum:
        - unknown
        - user
        - assistant
        - system
        - critic
        - discriminator
        - developer
        - tool
    ImageGenToolCallError:
      properties:
        code:
          anyOf:
            - type: string
              description: The error code.
            - type: 'null'
        type:
          type: string
          description: The error type.
        message:
          type: string
          description: A description of the error.
        param:
          anyOf:
            - type: string
              description: The related request parameter.
            - type: 'null'
        moderation_details:
          $ref: '#/components/schemas/ImageGenToolCallModerationDetails'
          description: Public details for a `moderation_blocked` error, when available.
      type: object
      required:
        - code
        - type
        - message
        - param
    ImageGenActionEnum:
      type: string
      enum:
        - generate
        - edit
        - auto
    ImageBackground:
      type: string
      enum:
        - transparent
        - opaque
        - auto
    ImageOutputFormat:
      type: string
      enum:
        - png
        - webp
        - jpeg
        - gif
        - svg
    SvgUsage:
      properties:
        model:
          type: string
        input_tokens:
          type: integer
        output_tokens:
          type: integer
        total_tokens:
          type: integer
        reasoning_tokens:
          type: integer
      type: object
      required:
        - model
        - input_tokens
        - output_tokens
        - total_tokens
        - reasoning_tokens
    CodeInterpreterOutputLogs:
      properties:
        type:
          type: string
          enum:
            - logs
          description: The type of the output. Always `logs`.
          default: logs
        logs:
          type: string
          description: The logs output from the code interpreter.
      type: object
      required:
        - type
        - logs
      title: Code interpreter output logs
      description: The logs output from the code interpreter.
    CodeInterpreterOutputImage:
      properties:
        type:
          type: string
          enum:
            - image
          description: The type of the output. Always `image`.
          default: image
        url:
          type: string
          format: uri
          description: The URL of the image output from the code interpreter.
      type: object
      required:
        - type
        - url
      title: Code interpreter output image
      description: The image output from the code interpreter.
    LocalShellExecAction:
      properties:
        type:
          type: string
          enum:
            - exec
          description: The type of the local shell action. Always `exec`.
          default: exec
        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.
        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.
    FunctionShellAction:
      properties:
        commands:
          items:
            type: string
            description: A list of commands to run.
          type: array
        timeout_ms:
          anyOf:
            - type: integer
              description: Optional timeout in milliseconds for the commands.
            - 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.
    FunctionShellCallStatus:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
    LocalEnvironmentResource:
      properties:
        type:
          type: string
          enum:
            - local
          description: The environment type. Always `local`.
          default: local
      type: object
      required:
        - type
      title: Local Environment
      description: Represents the use of a local environment to perform shell actions.
    ContainerReferenceResource:
      properties:
        type:
          type: string
          enum:
            - container_reference
          description: The environment type. Always `container_reference`.
          default: container_reference
        container_id:
          type: string
      type: object
      required:
        - type
        - container_id
      title: Container Reference
      description: Represents a container created with /v1/containers.
    FunctionShellCallOutputStatusEnum:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
    ApplyPatchCallStatus:
      type: string
      enum:
        - in_progress
        - completed
    ApplyPatchCreateFileOperation:
      properties:
        type:
          type: string
          enum:
            - create_file
          description: Create a new file with the provided diff.
          default: create_file
        path:
          type: string
          description: Path of the file to create.
        diff:
          type: string
          description: Diff to apply.
      type: object
      required:
        - type
        - path
        - diff
      title: Apply patch create file operation
      description: Instruction describing how to create a file via the apply_patch tool.
    ApplyPatchDeleteFileOperation:
      properties:
        type:
          type: string
          enum:
            - delete_file
          description: Delete the specified file.
          default: delete_file
        path:
          type: string
          description: Path of the file to delete.
      type: object
      required:
        - type
        - path
      title: Apply patch delete file operation
      description: Instruction describing how to delete a file via the apply_patch tool.
    ApplyPatchUpdateFileOperation:
      properties:
        type:
          type: string
          enum:
            - update_file
          description: Update an existing file with the provided diff.
          default: update_file
        path:
          type: string
          description: Path of the file to update.
        diff:
          type: string
          description: Diff to apply.
      type: object
      required:
        - type
        - path
        - diff
      title: Apply patch update file operation
      description: Instruction describing how to update a file via the apply_patch tool.
    ApplyPatchCallOutputStatus:
      type: string
      enum:
        - completed
        - failed
    MCPToolCallError:
      oneOf:
        - $ref: '#/components/schemas/MCPProtocolError'
        - $ref: '#/components/schemas/MCPToolExecutionError'
        - $ref: '#/components/schemas/HTTPError'
      discriminator:
        propertyName: type
    MCPToolCallStatus:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
        - calling
        - failed
    MCPListToolsTool:
      type: object
      title: MCP list tools tool
      description: |
        A tool available on an MCP server.
      properties:
        name:
          type: string
          description: |
            The name of the tool.
        description:
          anyOf:
            - type: string
              description: |
                The description of the tool.
            - type: 'null'
        input_schema:
          type: object
          description: |
            The JSON schema describing the tool's input.
        annotations:
          anyOf:
            - type: object
              description: |
                Additional annotations about the tool.
            - type: 'null'
      required:
        - name
        - input_schema
    CustomToolCallOutput:
      type: object
      title: Custom tool call output
      description: >
        The output of a custom tool call from your code, being sent back to the
        model.
      properties:
        type:
          type: string
          enum:
            - custom_tool_call_output
          description: >
            The type of the custom tool call output. Always
            `custom_tool_call_output`.
        id:
          type: string
          description: |
            The unique ID of the custom tool call output in the OpenAI platform.
        call_id:
          type: string
          description: >
            The call ID, used to map this custom tool call output to a custom
            tool call.
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCallerParam'
            - type: 'null'
        output:
          description: |
            The output from the custom tool call generated by your code.
            Can be a string or an list of output content.
          oneOf:
            - type: string
              description: |
                A string of the output of the custom tool call.
              title: string output
            - type: array
              items:
                $ref: '#/components/schemas/FunctionAndCustomToolCallOutput'
              title: output content list
              description: |
                Text, image, or file output of the custom tool call.
      required:
        - type
        - call_id
        - output
    InputMessageContentList:
      type: array
      title: Input item content list
      description: >
        A list of one or many input items to the model, containing different
        content 

        types.
      items:
        $ref: '#/components/schemas/InputContent'
    InputMessage:
      type: object
      title: Input message
      description: >
        A message input to the model with a role indicating instruction
        following

        hierarchy. Instructions given with the `developer` or `system` role take

        precedence over instructions given with the `user` role.
      properties:
        type:
          type: string
          description: |
            The type of the message input. Always set to `message`.
          const: message
        role:
          type: string
          description: >
            The role of the message input. One of `user`, `system`, or
            `developer`.
          enum:
            - user
            - system
            - developer
        status:
          type: string
          description: |
            The status of item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.
          enum:
            - in_progress
            - completed
            - incomplete
        content:
          $ref: '#/components/schemas/InputMessageContentList'
      required:
        - role
        - content
    ComputerCallOutputItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: The ID of the computer tool call output.
              example: cuo_123
            - 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
        output:
          $ref: '#/components/schemas/ComputerScreenshotImage'
        acknowledged_safety_checks:
          anyOf:
            - items:
                $ref: '#/components/schemas/ComputerCallSafetyCheckParam'
              type: array
              description: >-
                The safety checks reported by the API that have been
                acknowledged by the developer.
            - type: 'null'
        status:
          anyOf:
            - $ref: '#/components/schemas/FunctionCallItemStatus'
              description: >-
                The status of the message input. One of `in_progress`,
                `completed`, or `incomplete`. Populated when input items are
                returned via API.
            - type: 'null'
      type: object
      required:
        - call_id
        - type
        - output
      title: Computer tool call output
      description: The output of a computer tool call.
    FunctionCallOutputItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: >-
                The unique ID of the function tool call output. Populated when
                this item is returned via API.
              example: fc_123
            - type: 'null'
        call_id:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 1
              description: The unique ID of the function tool call generated by the model.
            - type: 'null'
        type:
          type: string
          enum:
            - function_call_output
          description: >-
            The type of the function tool call output. Always
            `function_call_output`.
          default: function_call_output
        output:
          oneOf:
            - type: string
              maxLength: 10485760
              description: A JSON string of the output of the function tool call.
            - items:
                oneOf:
                  - $ref: '#/components/schemas/InputTextContentParam'
                  - $ref: '#/components/schemas/InputImageContentParamAutoParam'
                  - $ref: '#/components/schemas/InputFileContentParam'
                description: A piece of message content, such as text, an image, or a file.
                discriminator:
                  propertyName: type
              type: array
              description: >-
                An array of content outputs (text, image, file) for the function
                tool call.
          description: Text, image, or file output of the function tool call.
        name:
          anyOf:
            - type: string
              maxLength: 128
              minLength: 1
              description: The name of the tool that produced the output.
            - type: 'null'
        namespace:
          anyOf:
            - type: string
              maxLength: 128
              minLength: 1
              pattern: ^[a-zA-Z0-9_-]+$
              description: The namespace of the tool that produced the output.
            - type: 'null'
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCallerParam'
              description: The execution context that produced this tool call.
            - type: 'null'
        status:
          anyOf:
            - $ref: '#/components/schemas/FunctionCallItemStatus'
              description: >-
                The status of the item. One of `in_progress`, `completed`, or
                `incomplete`. Populated when items are returned via API.
            - type: 'null'
      type: object
      required:
        - type
        - output
      title: Function tool call output
      description: The output of a function tool call.
    ToolSearchCallItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: The unique ID of this tool search call.
              example: tsc_123
            - 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
        execution:
          $ref: '#/components/schemas/ToolSearchExecutionType'
          description: Whether tool search was executed by the server or by the client.
        arguments:
          $ref: '#/components/schemas/EmptyModelParam'
          description: The arguments supplied to the tool search call.
        status:
          anyOf:
            - $ref: '#/components/schemas/FunctionCallItemStatus'
              description: The status of the tool search call.
            - type: 'null'
      type: object
      required:
        - type
        - arguments
    ToolSearchOutputItemParam:
      properties:
        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
        execution:
          $ref: '#/components/schemas/ToolSearchExecutionType'
          description: Whether tool search was executed by the server or by the client.
        tools:
          items:
            $ref: '#/components/schemas/ToolSearchOutputTool'
          type: array
          description: The loaded tool definitions returned by the tool search output.
        status:
          anyOf:
            - $ref: '#/components/schemas/FunctionCallItemStatus'
              description: The status of the tool search output.
            - type: 'null'
      type: object
      required:
        - type
        - tools
    AdditionalToolsItemParam:
      properties:
        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
        role:
          type: string
          enum:
            - developer
          description: >-
            The role that provided the additional tools. Only `developer` is
            supported.
          default: developer
        tools:
          items:
            $ref: '#/components/schemas/Tool'
          type: array
          description: A list of additional tools made available at this item.
      type: object
      required:
        - type
        - role
        - tools
    ResponseConfigurationUpdateItemParam:
      type: object
      description: >
        An update to the conversation's response configuration. Supply
        reasoning,

        text, or both. Each setting stays in effect until a later update
        replaces it.
      properties:
        id:
          anyOf:
            - type: string
              description: The unique ID of the configuration update item.
              example: cnfu_123
            - type: 'null'
        type:
          type: string
          const: configuration_update
          description: The item type. Always `configuration_update`.
          default: configuration_update
        reasoning:
          type: object
          description: Updates to reasoning configuration. Only effort is supported.
          properties:
            effort:
              $ref: '#/components/schemas/ReasoningEffort'
              description: >
                The reasoning effort to use for subsequent responses until
                another

                configuration update replaces it.
        text:
          type: object
          description: The text output configuration for subsequent responses.
          properties:
            format:
              description: >-
                Use a JSON schema for structured output or text to return to
                plain text.
              oneOf:
                - $ref: '#/components/schemas/ResponseFormatText'
                - $ref: '#/components/schemas/TextResponseFormatJsonSchema'
              discriminator:
                propertyName: type
          required:
            - format
      required:
        - type
    CompactionSummaryItemParam:
      properties:
        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
        encrypted_content:
          type: string
          maxLength: 104857600
          description: The encrypted content of the compaction summary.
      type: object
      required:
        - type
        - encrypted_content
      title: Compaction item
      description: >-
        A compaction item generated by the [`v1/responses/compact`
        API](https://developers.openai.com/api/reference/resources/responses/methods/compact).
    FunctionShellCallItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: >-
                The unique ID of the shell tool call. Populated when this item
                is returned via API.
              example: sh_123
            - 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: '#/components/schemas/ToolCallCallerParam'
              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
        action:
          $ref: '#/components/schemas/FunctionShellActionParam'
          description: >-
            The shell commands and limits that describe how to run the tool
            call.
        status:
          anyOf:
            - $ref: '#/components/schemas/FunctionShellCallItemStatus'
              description: >-
                The status of the shell call. One of `in_progress`, `completed`,
                or `incomplete`.
            - type: 'null'
        environment:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/LocalEnvironmentParam'
                - $ref: '#/components/schemas/ContainerReferenceParam'
              description: The environment to execute the shell commands in.
              discriminator:
                propertyName: type
            - type: 'null'
      type: object
      required:
        - call_id
        - type
        - action
      title: Shell tool call
      description: A tool representing a request to execute one or more shell commands.
    FunctionShellCallOutputItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: >-
                The unique ID of the shell tool call output. Populated when this
                item is returned via API.
              example: sho_123
            - 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: '#/components/schemas/ToolCallCallerParam'
              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
        output:
          items:
            $ref: '#/components/schemas/FunctionShellCallOutputContentParam'
          type: array
          description: >-
            Captured chunks of stdout and stderr output, along with their
            associated outcomes.
        status:
          anyOf:
            - $ref: '#/components/schemas/FunctionShellCallItemStatus'
              description: The status of the shell call output.
            - type: 'null'
        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.
    ApplyPatchToolCallItemParam:
      properties:
        type:
          type: string
          enum:
            - apply_patch_call
          description: The type of the item. Always `apply_patch_call`.
          default: apply_patch_call
        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: '#/components/schemas/ToolCallCallerParam'
              description: The execution context that produced this tool call.
            - type: 'null'
        status:
          $ref: '#/components/schemas/ApplyPatchCallStatusParam'
          description: >-
            The status of the apply patch tool call. One of `in_progress` or
            `completed`.
        operation:
          $ref: '#/components/schemas/ApplyPatchOperationParam'
          description: >-
            The specific create, delete, or update instruction for the
            apply_patch tool call.
      type: object
      required:
        - type
        - call_id
        - status
        - operation
      title: Apply patch tool call
      description: >-
        A tool call representing a request to create, delete, or update files
        using diff patches.
    ApplyPatchToolCallOutputItemParam:
      properties:
        type:
          type: string
          enum:
            - apply_patch_call_output
          description: The type of the item. Always `apply_patch_call_output`.
          default: apply_patch_call_output
        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: '#/components/schemas/ToolCallCallerParam'
              description: The execution context that produced this tool call.
            - type: 'null'
        status:
          $ref: '#/components/schemas/ApplyPatchCallOutputStatusParam'
          description: >-
            The status of the apply patch tool call output. One of `completed`
            or `failed`.
        output:
          anyOf:
            - type: string
              maxLength: 10485760
              description: >-
                Optional human-readable log text from the apply patch tool
                (e.g., patch results or errors).
            - 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.
    MCPApprovalResponse:
      type: object
      title: MCP approval response
      description: |
        A response to an MCP approval request.
      properties:
        type:
          type: string
          const: mcp_approval_response
          description: |
            The type of the item. Always `mcp_approval_response`.
        id:
          anyOf:
            - type: string
              description: |
                The unique ID of the approval response
            - type: 'null'
        approval_request_id:
          type: string
          description: |
            The ID of the approval request being answered.
        approve:
          type: boolean
          description: |
            Whether the request was approved.
        reason:
          anyOf:
            - type: string
              description: |
                Optional reason for the decision.
            - type: 'null'
      required:
        - type
        - request_id
        - approve
        - approval_request_id
    ProgramOutputItemStatus:
      type: string
      enum:
        - completed
        - incomplete
    ImageGenOutputTokensDetails:
      properties:
        image_tokens:
          type: integer
          description: The number of image output tokens generated by the model.
        text_tokens:
          type: integer
          description: The number of text output tokens generated by the model.
      type: object
      required:
        - image_tokens
        - text_tokens
      title: Image generation output token details
      description: The output token details for the image generation.
    ImageGenInputUsageDetails:
      properties:
        text_tokens:
          type: integer
          description: The number of text tokens in the input prompt.
        image_tokens:
          type: integer
          description: The number of image tokens in the input prompt.
      type: object
      required:
        - text_tokens
        - image_tokens
      title: Input usage details
      description: The input tokens detailed information for the image generation.
    CachedUsageDetails:
      properties:
        cached_text_tokens:
          type: integer
        cached_image_tokens:
          type: integer
      type: object
      required:
        - cached_text_tokens
        - cached_image_tokens
    CacheMissReasonTypeEnum:
      type: string
      enum:
        - model_changed
        - prompt_cache_key_changed
        - tools_changed
        - text_format_changed
        - reasoning_effort_changed
        - verbosity_changed
        - context_compacted
        - input_changed
        - service_tier_changed
    ModerationInputType:
      type: string
      enum:
        - text
        - image
    OutputTextContent:
      properties:
        type:
          type: string
          enum:
            - output_text
          description: The type of the output text. Always `output_text`.
          default: output_text
        text:
          type: string
          description: The text output from the model.
        annotations:
          items:
            $ref: '#/components/schemas/Annotation'
          type: array
          description: The annotations of the text output.
        logprobs:
          items:
            $ref: '#/components/schemas/LogProb'
          type: array
      type: object
      required:
        - type
        - text
        - annotations
        - logprobs
      title: Output text
      description: A text output from the model.
    RefusalContent:
      properties:
        type:
          type: string
          enum:
            - refusal
          description: The type of the refusal. Always `refusal`.
          default: refusal
        refusal:
          type: string
          description: The refusal explanation from the model.
      type: object
      required:
        - type
        - refusal
      title: Refusal
      description: A refusal from the model.
    FunctionShellCallOutputTimeoutOutcome:
      properties:
        type:
          type: string
          enum:
            - timeout
          description: The outcome type. Always `timeout`.
          default: timeout
      type: object
      required:
        - type
      title: Shell call timeout outcome
      description: Indicates that the shell call exceeded its configured time limit.
    FunctionShellCallOutputExitOutcome:
      properties:
        type:
          type: string
          enum:
            - exit
          description: The outcome type. Always `exit`.
          default: exit
        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.
    FileCitationBody:
      properties:
        type:
          type: string
          enum:
            - file_citation
          description: The type of the file citation. Always `file_citation`.
          default: file_citation
        file_id:
          type: string
          description: The ID of the file.
        index:
          type: integer
          description: The index in the output text at which to insert the file citation.
        filename:
          type: string
          description: The filename of the file cited.
      type: object
      required:
        - type
        - file_id
        - index
        - filename
      title: File citation
      description: A citation to a file.
    UrlCitationBody:
      properties:
        type:
          type: string
          enum:
            - url_citation
          description: The type of the URL citation. Always `url_citation`.
          default: url_citation
        url:
          type: string
          format: uri
          description: The URL of the web resource.
        start_index:
          type: integer
          description: The index of the first character of the URL citation in the message.
        end_index:
          type: integer
          description: The index of the last character of the URL citation in the message.
        title:
          type: string
          description: The title of the web resource.
      type: object
      required:
        - type
        - url
        - start_index
        - end_index
        - title
      title: URL citation
      description: A citation for a web resource used to generate a model response.
    ContainerFileCitationBody:
      properties:
        type:
          type: string
          enum:
            - container_file_citation
          description: >-
            The type of the container file citation. Always
            `container_file_citation`.
          default: container_file_citation
        container_id:
          type: string
          description: The ID of the container file.
        file_id:
          type: string
          description: The ID of the file.
        start_index:
          type: integer
          description: >-
            The index of the first character of the container file citation in
            the message.
        end_index:
          type: integer
          description: >-
            The index of the last character of the container file citation in
            the message.
        filename:
          type: string
          description: The filename of the container file cited.
      type: object
      required:
        - type
        - container_id
        - file_id
        - start_index
        - end_index
        - filename
      title: Container file citation
      description: A citation for a container file used to generate a model response.
    FilePath:
      type: object
      title: File path
      description: |
        A path to a file.
      properties:
        type:
          type: string
          description: |
            The type of the file path. Always `file_path`.
          enum:
            - file_path
        file_id:
          type: string
          description: |
            The ID of the file.
        index:
          type: integer
          description: |
            The index of the file in the list of files.
      required:
        - type
        - file_id
        - index
    ResponseFormatText:
      type: object
      title: Text
      description: |
        Default response format. Used to generate text responses.
      properties:
        type:
          type: string
          description: The type of response format being defined. Always `text`.
          const: text
      required:
        - type
    TextResponseFormatJsonSchema:
      type: object
      title: JSON schema
      description: >
        JSON Schema response format. Used to generate structured JSON responses.

        Learn more about [Structured
        Outputs](https://developers.openai.com/api/docs/guides/structured-outputs).
      properties:
        type:
          type: string
          description: The type of response format being defined. Always `json_schema`.
          enum:
            - json_schema
        description:
          type: string
          description: >
            A description of what the response format is for, used by the model
            to

            determine how to respond in the format.
        name:
          type: string
          description: |
            The name of the response format. Must be a-z, A-Z, 0-9, or contain
            underscores and dashes, with a maximum length of 64.
        schema:
          $ref: '#/components/schemas/ResponseFormatJsonSchemaSchema'
        strict:
          anyOf:
            - type: boolean
              default: false
              description: >
                Whether to enable strict schema adherence when generating the
                output.

                If set to true, the model will always follow the exact schema
                defined

                in the `schema` field. Only a subset of JSON Schema is supported
                when

                `strict` is `true`. To learn more, read the [Structured Outputs

                guide](https://developers.openai.com/api/docs/guides/structured-outputs).
            - type: 'null'
      required:
        - type
        - schema
        - name
    ResponseFormatJsonObject:
      type: object
      title: JSON object
      description: >
        JSON object response format. An older method of generating JSON
        responses.

        Using `json_schema` is recommended for models that support it. Note that
        the

        model will not generate JSON without a system or user message
        instructing it

        to do so.
      properties:
        type:
          type: string
          description: The type of response format being defined. Always `json_object`.
          const: json_object
      required:
        - type
    FunctionTool:
      properties:
        type:
          type: string
          enum:
            - function
          description: The type of the function tool. Always `function`.
          default: function
        name:
          type: string
          description: The name of the function to call.
        async:
          type: boolean
        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.
            - type: 'null'
        output_schema:
          anyOf:
            - additionalProperties: {}
              type: object
              description: >-
                A JSON schema object describing the JSON value encoded in string
                outputs for this function.
            - 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: '#/components/schemas/CallableToolAllowedCaller'
              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://developers.openai.com/api/docs/guides/function-calling).
    FileSearchTool:
      properties:
        type:
          type: string
          enum:
            - file_search
          description: The type of the file search tool. Always `file_search`.
          default: file_search
        vector_store_ids:
          items:
            type: string
          type: array
          description: The IDs of the vector stores to search.
        max_num_results:
          type: integer
          description: >-
            The maximum number of results to return. This number should be
            between 1 and 50 inclusive.
        ranking_options:
          $ref: '#/components/schemas/RankingOptions'
          description: Ranking options for search.
        filters:
          anyOf:
            - $ref: '#/components/schemas/Filters'
              description: A filter to apply.
            - type: 'null'
      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://developers.openai.com/api/docs/guides/tools-file-search).
    ComputerTool:
      properties:
        type:
          type: string
          enum:
            - computer
          description: The type of the computer tool. Always `computer`.
          default: computer
      type: object
      required:
        - type
      title: Computer
      description: >-
        A tool that controls a virtual computer. Learn more about the [computer
        tool](https://developers.openai.com/api/docs/guides/tools-computer-use).
    ComputerUsePreviewTool:
      properties:
        type:
          type: string
          enum:
            - computer_use_preview
          description: The type of the computer use tool. Always `computer_use_preview`.
          default: computer_use_preview
        environment:
          $ref: '#/components/schemas/ComputerEnvironment'
          description: The type of computer environment to control.
        display_width:
          type: integer
          description: The width of the computer display.
        display_height:
          type: integer
          description: The height of the computer display.
      type: object
      required:
        - type
        - environment
        - display_width
        - display_height
      title: Computer use preview
      description: >-
        A tool that controls a virtual computer. Learn more about the [computer
        tool](https://developers.openai.com/api/docs/guides/tools-computer-use).
    WebSearchTool:
      type: object
      title: Web search
      description: >
        Search the Internet for sources related to the prompt. Learn more about
        the

        [web search
        tool](https://developers.openai.com/api/docs/guides/tools-web-search).
      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
        external_web_access:
          type: boolean
          default: true
          description: >-
            Allow live internet access for web search. Defaults to true when
            omitted. When false, the web search tool runs in offline/cache-only
            mode and will not fetch new external content.
        filters:
          anyOf:
            - type: object
              description: |
                Filters for the search.
              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.

                        Subdomains of the provided domains are allowed as well.


                        Example: `["pubmed.ncbi.nlm.nih.gov"]`
                      items:
                        type: string
                        description: Allowed domain for the search.
                      default: []
                    - type: 'null'
            - type: 'null'
        user_location:
          $ref: '#/components/schemas/WebSearchApproximateLocation'
          description: >
            The approximate location of the user. If omitted or null, defaults
            to the

            United States. To avoid this fallback, pass `{"type":
            "approximate"}` without

            location fields. To localize results, provide the relevant location
            fields.
        search_context_size:
          type: string
          enum:
            - low
            - medium
            - high
          default: medium
          description: >-
            High level guidance for the amount of context window space to use
            for the search. One of `low`, `medium`, or `high`. `medium` is the
            default.
      required:
        - type
    MCPTool:
      type: object
      title: MCP tool
      description: >
        Give the model access to additional tools via remote Model Context
        Protocol

        (MCP) servers. [Learn more about
        MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
      properties:
        type:
          type: string
          const: mcp
          description: The type of the MCP tool. Always `mcp`.
        server_label:
          type: string
          description: |
            A label for this MCP server, used to identify it in tool calls.
        server_url:
          type: string
          format: uri
          description: |
            The URL for the MCP server. One of `server_url`, `connector_id`, or
            `tunnel_id` must be provided.
        connector_id:
          type: string
          deprecated: true
          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

            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn
            more

            about service connectors
            [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).


            This field is deprecated for models released after September 1,
            2026.

            Use `server_url` to connect to a remote MCP server, or `tunnel_id`
            to

            connect through a Secure MCP Tunnel.


            Currently supported `connector_id` values are:


            - Dropbox: `connector_dropbox`

            - Gmail: `connector_gmail`

            - Google Calendar: `connector_googlecalendar`

            - Google Drive: `connector_googledrive`

            - Microsoft Teams: `connector_microsoftteams`

            - Outlook Calendar: `connector_outlookcalendar`

            - Outlook Email: `connector_outlookemail`

            - SharePoint: `connector_sharepoint`
        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

            `server_url`, `connector_id`, or `tunnel_id` must be provided.
        authorization:
          type: string
          description: >
            An OAuth access token that can be used with a remote MCP server,
            either

            with a custom MCP server URL or a service connector. Your
            application

            must handle the OAuth authorization flow and provide the token here.
        server_description:
          type: string
          description: >
            Optional description of the MCP server, used to provide more
            context.
        headers:
          anyOf:
            - type: object
              additionalProperties:
                type: string
              description: >
                Optional HTTP headers to send to the MCP server. Use for
                authentication

                or other purposes.
            - type: 'null'
        allowed_tools:
          anyOf:
            - description: |
                List of allowed tool names or a filter object.
              oneOf:
                - type: array
                  title: MCP allowed tools
                  description: A string array of allowed tool names
                  items:
                    type: string
                - $ref: '#/components/schemas/MCPToolFilter'
            - type: 'null'
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              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

                    `always`, `never`, or a filter object associated with tools

                    that require approval.
                  properties:
                    always:
                      $ref: '#/components/schemas/MCPToolFilter'
                    never:
                      $ref: '#/components/schemas/MCPToolFilter'
                  additionalProperties: false
                - type: string
                  title: MCP tool approval setting
                  description: >
                    Specify a single approval policy for all tools. One of
                    `always` or

                    `never`. When set to `always`, all tools will require
                    approval. When

                    set to `never`, all tools will not require approval.
                  enum:
                    - always
                    - never
              default: always
            - type: 'null'
        defer_loading:
          type: boolean
          description: |
            Whether this MCP tool is deferred and discovered via tool search.
      required:
        - type
        - server_label
    CodeInterpreterTool:
      type: object
      title: Code interpreter
      description: |
        A tool that runs Python code to help generate a response to a prompt.
      properties:
        type:
          type: string
          enum:
            - code_interpreter
          description: |
            The type of the code interpreter tool. Always `code_interpreter`.
        container:
          description: >
            The code interpreter container. Can be a container ID or an object
            that

            specifies uploaded file IDs to make available to your code, along
            with an

            optional `memory_limit` setting.
          oneOf:
            - type: string
              description: The container ID.
            - $ref: '#/components/schemas/AutoCodeInterpreterToolParam'
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              description: The tool invocation context(s).
            - type: 'null'
      required:
        - type
        - container
    ProgrammaticToolCallingParam:
      properties:
        type:
          type: string
          enum:
            - programmatic_tool_calling
          description: The type of the tool. Always `programmatic_tool_calling`.
          default: programmatic_tool_calling
      type: object
      required:
        - type
    ImageGenTool:
      type: object
      title: Image generation tool
      description: |
        A tool that generates images using the GPT image models.
      properties:
        type:
          type: string
          enum:
            - image_generation
          description: |
            The type of the image generation tool. Always `image_generation`.
        model:
          anyOf:
            - type: string
            - type: string
              enum:
                - gpt-image-1
                - gpt-image-1-mini
                - gpt-image-2
                - gpt-image-2-2026-04-21
                - gpt-image-2.5-sunburst
                - gpt-image-2.5-sunburst-2026-09-08
                - gpt-image-2.5-flare
                - gpt-image-2.5-flare-2026-09-08
                - gpt-image-2.6-sunburst
                - gpt-image-2.6-flare
                - gpt-image-1.5
                - chatgpt-image-latest
              description: |
                The image generation model to use. One of `gpt-image-1-mini`,
                `gpt-image-1.5`, `gpt-image-2`,
                `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
                `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
                `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
                `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default:
                `gpt-image-2.6-sunburst`.

                `gpt-image-1` was shut down on October 23, 2026. Use
                `gpt-image-2.5-sunburst` or `gpt-image-2.5-flare` instead.
              default: gpt-image-2.6-sunburst
        complexity:
          type: string
          enum:
            - low
            - medium
            - high
          description: >
            Computation spent planning the image, independently of rendering
            quality.

            Overrides the outer response's `reasoning.effort` for image
            generation.

            When omitted, inherits a supported outer reasoning effort or uses
            the

            image model's configured default.

            For SVG output, controls the reference image, not the SVG author's

            reasoning.
        quality:
          type: string
          enum:
            - low
            - medium
            - high
            - xhigh
            - max
            - auto
          description: >
            The quality of the generated image. The GPT image models support
            `low`,

            `medium`, and `high`. `gpt-image-2.5-sunburst` and
            `gpt-image-2.5-flare`,

            including their `2026-09-08` snapshots, also support `xhigh` and
            `max`.

            Default: `auto`.
          default: auto
        size:
          anyOf:
            - type: string
            - type: string
              enum:
                - 1024x1024
                - 1024x1536
                - 1536x1024
                - auto
          description: >-
            The size of the generated images. For `gpt-image-2`,
            `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
            `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
            `gpt-image-2.5-flare-2026-09-08`, 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.
          default: auto
        output_format:
          type: string
          enum:
            - png
            - webp
            - jpeg
            - gif
            - svg
          description: >
            The output format of the generated image. One of `png`, `webp`,
            `jpeg`,

            `gif`, or `svg`. Default: `png`. GIF and SVG output require a model

            that supports the selected format. GIF output does not support

            partial image streaming (`partial_images` greater than `0`),

            `input_image_mask`, or custom `output_compression`.

            Responses lifecycle events can still be streamed for GIF output.
          default: png
        frame_count:
          type: integer
          minimum: 2
          maximum: 16
          default: 9
          description: >
            Number of GIF frames. Requires `output_format` to be `gif`. Default:
            9.
        frame_duration_ms:
          type: integer
          minimum: 20
          maximum: 2000
          default: 200
          description: |
            Duration of each GIF frame in milliseconds, rounded to 10 ms.
            Requires `output_format` to be `gif`. Default: 200.
        svg:
          $ref: '#/components/schemas/SvgParam'
          description: |
            SVG author model settings. Requires `output_format` to be `svg`.
            When SVG model selection is enabled, omitting this object uses the
            outer response model. Otherwise, the default SVG author is used and
            explicit model overrides are unavailable.
        output_compression:
          type: integer
          minimum: 0
          maximum: 100
          description: |
            Compression level for the output image. Default: 100.
          default: 100
        moderation:
          type: string
          enum:
            - auto
            - low
          description: |
            Moderation level for the generated image. Default: `auto`.
          default: auto
        background:
          type: string
          enum:
            - transparent
            - opaque
            - auto
          description: >
            Set the background of the generated image. One of `transparent`,
            `opaque`,

            or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
            including

            their `2026-09-08` snapshots, support `opaque` and `transparent`

            backgrounds. Transparent backgrounds are available for supported GPT
            Image

            models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support
            is in

            preview. When using `transparent`, set the output format to `png` or
            `webp`.

            Default: `auto`.
          default: auto
        input_fidelity:
          anyOf:
            - $ref: '#/components/schemas/InputFidelity'
            - type: 'null'
        input_image_mask:
          type: object
          description: |
            Optional mask for inpainting. Contains `image_url`
            (string, optional) and `file_id` (string, optional).
          properties:
            image_url:
              type: string
              description: |
                Base64-encoded mask image.
            file_id:
              type: string
              description: |
                File ID for the mask image.
          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.
          default: 0
        action:
          $ref: '#/components/schemas/ImageGenActionEnum'
          description: >
            Whether to generate a new image or edit an existing image. Default:
            `auto`.
      required:
        - type
    LocalShellToolParam:
      properties:
        type:
          type: string
          enum:
            - local_shell
          description: The type of the local shell tool. Always `local_shell`.
          default: local_shell
      type: object
      required:
        - type
      title: Local shell tool
      description: >-
        A tool that allows the model to execute shell commands in a local
        environment.
    FunctionShellToolParam:
      properties:
        type:
          type: string
          enum:
            - shell
          description: The type of the shell tool. Always `shell`.
          default: shell
        environment:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ContainerAutoParam'
                - $ref: '#/components/schemas/LocalEnvironmentParam'
                - $ref: '#/components/schemas/ContainerReferenceParam'
              discriminator:
                propertyName: type
            - type: 'null'
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              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.
    CustomToolParam:
      properties:
        type:
          type: string
          enum:
            - custom
          description: The type of the custom tool. Always `custom`.
          default: custom
        name:
          type: string
          description: The name of the custom tool, used to identify it in tool calls.
        async:
          type: boolean
          description: >-
            Whether the tool response can be returned asynchronously versus
            immediately returned on next response creation.
        description:
          type: string
          description: >-
            Optional description of the custom tool, used to provide more
            context.
        format:
          oneOf:
            - $ref: '#/components/schemas/CustomTextFormatParam'
            - $ref: '#/components/schemas/CustomGrammarFormatParam'
          description: The input format for the custom tool. Default is unconstrained text.
          discriminator:
            propertyName: type
        defer_loading:
          type: boolean
          description: Whether this tool should be deferred and discovered via tool search.
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              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](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)
    NamespaceToolParam:
      properties:
        type:
          type: string
          enum:
            - namespace
          description: The type of the tool. Always `namespace`.
          default: namespace
        name:
          type: string
          minLength: 1
          description: The namespace name used in tool calls (for example, `crm`).
        description:
          type: string
          description: A description of the namespace shown to the model.
        tools:
          items:
            oneOf:
              - $ref: '#/components/schemas/FunctionToolParam'
              - $ref: '#/components/schemas/CustomToolParam'
            description: A function or custom tool that belongs to a namespace.
            discriminator:
              propertyName: type
          type: array
          minItems: 1
          description: The function/custom tools available inside this namespace.
      type: object
      required:
        - type
        - name
        - description
        - tools
      title: Namespace
      description: Groups function/custom tools under a shared namespace.
    ToolSearchToolParam:
      properties:
        type:
          type: string
          enum:
            - tool_search
          description: The type of the tool. Always `tool_search`.
          default: tool_search
        execution:
          $ref: '#/components/schemas/ToolSearchExecutionType'
          description: Whether tool search is executed by the server or by the client.
        description:
          anyOf:
            - type: string
              description: >-
                Description shown to the model for a client-executed tool search
                tool.
            - type: 'null'
        parameters:
          anyOf:
            - $ref: '#/components/schemas/EmptyModelParam'
              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.
    WebSearchPreviewTool:
      properties:
        type:
          type: string
          enum:
            - web_search_preview
            - web_search_preview_2025_03_11
          description: >-
            The type of the web search tool. One of `web_search_preview` or
            `web_search_preview_2025_03_11`.
          default: web_search_preview
        user_location:
          anyOf:
            - $ref: '#/components/schemas/ApproximateLocation'
              description: >-
                The approximate location of the user. If omitted or null,
                defaults to the United States. To avoid this fallback, pass
                `{"type": "approximate"}` without location fields. To localize
                results, provide the relevant location fields.
            - type: 'null'
        search_context_size:
          $ref: '#/components/schemas/SearchContextSize'
          description: >-
            High level guidance for the amount of context window space to use
            for the search. One of `low`, `medium`, or `high`. `medium` is the
            default.
        search_content_types:
          items:
            $ref: '#/components/schemas/SearchContentType'
          type: array
      type: object
      required:
        - type
      title: Web search preview
      description: >-
        This tool searches the web for relevant results to use in a response.
        Learn more about the [web search
        tool](https://developers.openai.com/api/docs/guides/tools-web-search).
    ApplyPatchToolParam:
      properties:
        type:
          type: string
          enum:
            - apply_patch
          description: The type of the tool. Always `apply_patch`.
          default: apply_patch
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              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.
    InputTextContent:
      properties:
        type:
          type: string
          enum:
            - input_text
          description: The type of the input item. Always `input_text`.
          default: input_text
        text:
          type: string
          description: The text input to the model.
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpointConfig'
      type: object
      required:
        - type
        - text
      title: Input text
      description: A text input to the model.
    InputImageContent:
      properties:
        type:
          type: string
          enum:
            - input_image
          description: The type of the input item. Always `input_image`.
          default: input_image
        image_url:
          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: '#/components/schemas/ImageDetail'
          description: >-
            The detail level of the image to be sent to the model. One of
            `high`, `low`, `auto`, or `original`. Defaults to `auto`.
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpointConfig'
      type: object
      required:
        - type
        - detail
      title: Input image
      description: >-
        An image input to the model. Learn about [image
        inputs](https://developers.openai.com/api/docs/guides/images-vision).
    InputFileContent:
      properties:
        type:
          type: string
          enum:
            - input_file
          description: The type of the input item. Always `input_file`.
          default: input_file
        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.
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpointConfig'
        file_url:
          type: string
          format: uri
          description: The URL of the file to be sent to the model.
        detail:
          $ref: '#/components/schemas/FileInputDetail'
          description: >-
            The detail level of the file to be sent to the model. Use `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.
    ModerationMode:
      type: string
      enum:
        - score
        - block
    DirectToolCallCaller:
      properties:
        type:
          type: string
          enum:
            - direct
          default: direct
      type: object
      required:
        - type
    ProgramToolCallCaller:
      properties:
        type:
          type: string
          enum:
            - program
          default: program
        caller_id:
          type: string
          description: The call ID of the program item that produced this tool call.
      type: object
      required:
        - type
        - caller_id
    ToolCallCallerParam:
      oneOf:
        - $ref: '#/components/schemas/DirectToolCallCallerParam'
        - $ref: '#/components/schemas/ProgramToolCallCallerParam'
      description: The execution context that produced this tool call.
      discriminator:
        propertyName: type
    FunctionAndCustomToolCallOutput:
      oneOf:
        - $ref: '#/components/schemas/InputTextContent'
        - $ref: '#/components/schemas/InputImageContent'
        - $ref: '#/components/schemas/InputFileContent'
      discriminator:
        propertyName: type
    ClickParam:
      properties:
        type:
          type: string
          enum:
            - click
          description: >-
            Specifies the event type. For a click action, this property is
            always `click`.
          default: click
        button:
          $ref: '#/components/schemas/ClickButtonType'
          description: >-
            Indicates which mouse button was pressed during the click. One of
            `left`, `right`, `wheel`, `back`, or `forward`.
        x:
          type: integer
          description: The x-coordinate where the click occurred.
        'y':
          type: integer
          description: The y-coordinate where the click occurred.
        keys:
          anyOf:
            - items:
                type: string
              type: array
              description: The keys being held while clicking.
            - type: 'null'
      type: object
      required:
        - type
        - button
        - x
        - 'y'
      title: Click
      description: A click action.
    DoubleClickAction:
      properties:
        type:
          type: string
          enum:
            - double_click
          description: >-
            Specifies the event type. For a double click action, this property
            is always set to `double_click`.
          default: double_click
        x:
          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.
    DragParam:
      properties:
        type:
          type: string
          enum:
            - drag
          description: >-
            Specifies the event type. For a drag action, this property is always
            set to `drag`.
          default: drag
        path:
          items:
            $ref: '#/components/schemas/CoordParam'
          type: array
          description: >-
            An array of coordinates representing the path of the drag action.
            Coordinates will appear as an array of objects, eg

            ```

            [
              { x: 100, y: 200 },
              { x: 200, y: 300 }
            ]

            ```
        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.
    KeyPressAction:
      properties:
        type:
          type: string
          enum:
            - keypress
          description: >-
            Specifies the event type. For a keypress action, this property is
            always set to `keypress`.
          default: keypress
        keys:
          items:
            type: string
            description: One of the keys the model is requesting to be pressed.
          type: array
          description: >-
            The combination of keys the model is requesting to be pressed. This
            is an array of strings, each representing a key.
      type: object
      required:
        - type
        - keys
      title: KeyPress
      description: A collection of keypresses the model would like to perform.
    MoveParam:
      properties:
        type:
          type: string
          enum:
            - move
          description: >-
            Specifies the event type. For a move action, this property is always
            set to `move`.
          default: move
        x:
          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.
    ScreenshotParam:
      properties:
        type:
          type: string
          enum:
            - screenshot
          description: >-
            Specifies the event type. For a screenshot action, this property is
            always set to `screenshot`.
          default: screenshot
      type: object
      required:
        - type
      title: Screenshot
      description: A screenshot action.
    ScrollParam:
      properties:
        type:
          type: string
          enum:
            - scroll
          description: >-
            Specifies the event type. For a scroll action, this property is
            always set to `scroll`.
          default: scroll
        x:
          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.
    TypeParam:
      properties:
        type:
          type: string
          enum:
            - type
          description: >-
            Specifies the event type. For a type action, this property is always
            set to `type`.
          default: type
        text:
          type: string
          description: The text to type.
      type: object
      required:
        - type
        - text
      title: Type
      description: An action to type in text.
    WaitParam:
      properties:
        type:
          type: string
          enum:
            - wait
          description: >-
            Specifies the event type. For a wait action, this property is always
            set to `wait`.
          default: wait
      type: object
      required:
        - type
      title: Wait
      description: A wait action.
    ComputerScreenshotImage:
      type: object
      description: |
        A computer screenshot image used with the computer use tool.
      properties:
        type:
          type: string
          const: computer_screenshot
          default: computer_screenshot
          description: >
            Specifies the event type. For a computer screenshot, this property
            is 

            always set to `computer_screenshot`.
        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
    ImageGenToolCallModerationDetails:
      properties:
        moderation_stage:
          type: string
          enum:
            - input
            - output
            - unknown
          description: The stage where moderation blocked the image generation call.
        categories:
          items:
            type: string
          type: array
          description: >-
            Public moderation categories. New category values may be added over
            time.
      type: object
      required:
        - moderation_stage
        - categories
    MCPProtocolError:
      properties:
        type:
          type: string
          enum:
            - mcp_protocol_error
          default: mcp_protocol_error
        code:
          type: integer
        message:
          type: string
      type: object
      required:
        - type
        - code
        - message
    MCPToolExecutionError:
      properties:
        type:
          type: string
          enum:
            - mcp_tool_execution_error
          default: mcp_tool_execution_error
        content: {}
      type: object
      required:
        - type
        - content
    HTTPError:
      properties:
        type:
          type: string
          enum:
            - http_error
          default: http_error
        code:
          type: integer
        message:
          type: string
      type: object
      required:
        - type
        - code
        - message
    InputContent:
      oneOf:
        - $ref: '#/components/schemas/InputTextContent'
        - $ref: '#/components/schemas/InputImageContent'
        - $ref: '#/components/schemas/InputFileContent'
      discriminator:
        propertyName: type
    FunctionCallItemStatus:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
    InputTextContentParam:
      properties:
        type:
          type: string
          enum:
            - input_text
          description: The type of the input item. Always `input_text`.
          default: input_text
        text:
          type: string
          maxLength: 10485760
          description: The text input to the model.
        prompt_cache_breakpoint:
          anyOf:
            - $ref: '#/components/schemas/PromptCacheBreakpointParam'
            - type: 'null'
      type: object
      required:
        - type
        - text
      title: Input text
      description: A text input to the model.
    InputImageContentParamAutoParam:
      properties:
        type:
          type: string
          enum:
            - input_image
          description: The type of the input item. Always `input_image`.
          default: input_image
        image_url:
          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: '#/components/schemas/DetailEnum'
              description: >-
                The detail level of the image to be sent to the model. One of
                `high`, `low`, `auto`, or `original`. Defaults to `auto`.
            - type: 'null'
        prompt_cache_breakpoint:
          anyOf:
            - $ref: '#/components/schemas/PromptCacheBreakpointParam'
            - type: 'null'
      type: object
      required:
        - type
      title: Input image
      description: >-
        An image input to the model. Learn about [image
        inputs](https://developers.openai.com/api/docs/guides/images-vision)
    InputFileContentParam:
      properties:
        type:
          type: string
          enum:
            - input_file
          description: The type of the input item. Always `input_file`.
          default: input_file
        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: '#/components/schemas/FileDetailEnum'
          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: '#/components/schemas/PromptCacheBreakpointParam'
            - type: 'null'
      type: object
      required:
        - type
      title: Input file
      description: A file input to the model.
    EmptyModelParam:
      properties: {}
      type: object
      required: []
    ToolSearchOutputTool:
      description: |
        A tool definition returned by a tool search output.
      discriminator:
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/FunctionTool'
        - $ref: '#/components/schemas/FileSearchTool'
        - $ref: '#/components/schemas/ComputerTool'
        - $ref: '#/components/schemas/ComputerUsePreviewTool'
        - $ref: '#/components/schemas/WebSearchTool'
        - $ref: '#/components/schemas/MCPTool'
        - $ref: '#/components/schemas/CodeInterpreterTool'
        - $ref: '#/components/schemas/ProgrammaticToolCallingParam'
        - $ref: '#/components/schemas/ImageGenTool'
        - $ref: '#/components/schemas/LocalShellToolParam'
        - $ref: '#/components/schemas/FunctionShellToolParam'
        - $ref: '#/components/schemas/CustomToolParam'
        - $ref: '#/components/schemas/ToolSearchOutputNamespaceToolParam'
        - $ref: '#/components/schemas/ToolSearchToolParam'
        - $ref: '#/components/schemas/WebSearchPreviewTool'
        - $ref: '#/components/schemas/ApplyPatchToolParam'
    FunctionShellActionParam:
      properties:
        commands:
          items:
            type: string
          type: array
          description: Ordered shell commands for the execution environment to run.
        timeout_ms:
          anyOf:
            - type: integer
              description: >-
                Maximum wall-clock time in milliseconds to allow the shell
                commands to run.
            - 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.
    FunctionShellCallItemStatus:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
      title: Shell call status
      description: Status values reported for shell tool calls.
    LocalEnvironmentParam:
      properties:
        type:
          type: string
          enum:
            - local
          description: Use a local computer environment.
          default: local
        skills:
          items:
            $ref: '#/components/schemas/LocalSkillParam'
          type: array
          maxItems: 200
          description: An optional list of skills.
      type: object
      required:
        - type
    ContainerReferenceParam:
      properties:
        type:
          type: string
          enum:
            - container_reference
          description: References a container created with the /v1/containers endpoint
          default: container_reference
        container_id:
          type: string
          description: The ID of the referenced container.
          example: cntr_123
      type: object
      required:
        - type
        - container_id
    FunctionShellCallOutputContentParam:
      properties:
        stdout:
          type: string
          maxLength: 10485760
          description: Captured stdout output for the shell call.
        stderr:
          type: string
          maxLength: 10485760
          description: Captured stderr output for the shell call.
        outcome:
          $ref: '#/components/schemas/FunctionShellCallOutputOutcomeParam'
          description: The exit or timeout outcome associated with this shell call.
      type: object
      required:
        - stdout
        - stderr
        - outcome
      title: Shell output content
      description: Captured stdout and stderr for a portion of a shell tool call output.
    ApplyPatchCallStatusParam:
      type: string
      enum:
        - in_progress
        - completed
      title: Apply patch call status
      description: Status values reported for apply_patch tool calls.
    ApplyPatchOperationParam:
      oneOf:
        - $ref: '#/components/schemas/ApplyPatchCreateFileOperationParam'
        - $ref: '#/components/schemas/ApplyPatchDeleteFileOperationParam'
        - $ref: '#/components/schemas/ApplyPatchUpdateFileOperationParam'
      title: Apply patch operation
      description: >-
        One of the create_file, delete_file, or update_file operations supplied
        to the apply_patch tool.
      discriminator:
        propertyName: type
    ApplyPatchCallOutputStatusParam:
      type: string
      enum:
        - completed
        - failed
      title: Apply patch call output status
      description: Outcome values reported for apply_patch tool call outputs.
    LogProb:
      properties:
        token:
          type: string
        logprob:
          type: number
        bytes:
          items:
            type: integer
          type: array
        top_logprobs:
          items:
            $ref: '#/components/schemas/TopLogProb'
          type: array
      type: object
      required:
        - token
        - logprob
        - bytes
        - top_logprobs
      title: Log probability
      description: The log probability of a token.
    ResponseFormatJsonSchemaSchema:
      type: object
      title: JSON schema
      description: |
        The schema for the response format, described as a JSON Schema object.
        Learn how to build JSON schemas [here](https://json-schema.org/).
      additionalProperties: true
    CallableToolAllowedCaller:
      type: string
      enum:
        - direct
        - programmatic
    RankingOptions:
      properties:
        ranker:
          $ref: '#/components/schemas/RankerVersionType'
          description: The ranker to use for the file search.
        score_threshold:
          type: number
          description: >-
            The score threshold for the file search, a number between 0 and 1.
            Numbers closer to 1 will attempt to return only the most relevant
            results, but may return fewer results.
        hybrid_search:
          $ref: '#/components/schemas/HybridSearchOptions'
          description: >-
            Weights that control how reciprocal rank fusion balances semantic
            embedding matches versus sparse keyword matches when hybrid search
            is enabled.
      type: object
      required: []
    Filters:
      anyOf:
        - $ref: '#/components/schemas/ComparisonFilter'
        - $ref: '#/components/schemas/CompoundFilter'
    ComputerEnvironment:
      type: string
      enum:
        - windows
        - mac
        - linux
        - ubuntu
        - browser
    WebSearchApproximateLocation:
      anyOf:
        - type: object
          title: Web search approximate location
          description: |
            The approximate location of the user.
          properties:
            type:
              type: string
              const: approximate
              description: The type of location approximation. Always `approximate`.
              default: approximate
            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'
    MCPToolFilter:
      type: object
      title: MCP tool filter
      description: |
        A filter object to specify which tools are allowed.
      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

            MCP server is [annotated with
            `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

            it will match this filter.
      required: []
      additionalProperties: false
    AutoCodeInterpreterToolParam:
      properties:
        type:
          type: string
          enum:
            - auto
          description: Always `auto`.
          default: auto
        file_ids:
          items:
            type: string
            example: file-123
          type: array
          maxItems: 50
          description: An optional list of uploaded files to make available to your code.
        memory_limit:
          anyOf:
            - $ref: '#/components/schemas/ContainerMemoryLimit'
              description: The memory limit for the code interpreter container.
            - type: 'null'
        network_policy:
          oneOf:
            - $ref: '#/components/schemas/ContainerNetworkPolicyDisabledParam'
            - $ref: '#/components/schemas/ContainerNetworkPolicyAllowlistParam'
          description: Network access policy for the container.
          discriminator:
            propertyName: type
      type: object
      required:
        - type
      title: CodeInterpreterToolAuto
      description: >-
        Configuration for a code interpreter container. Optionally specify the
        IDs of the files to run the code on.
    SvgParam:
      properties:
        model:
          type: string
          minLength: 1
        reasoning:
          anyOf:
            - $ref: '#/components/schemas/SvgReasoningParam'
              description: >-
                Reasoning effort for SVG authoring. When omitted, uses the
                author model's default in both Images and Responses.
            - type: 'null'
      type: object
      required: []
    InputFidelity:
      type: string
      enum:
        - high
        - low
      description: >-
        Control how much effort the model will exert to match the style and
        features, especially facial features, of input images. Supports `high`
        and `low` on `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`.
        For `gpt-image-2`, omit this parameter. Defaults to `low` on supported
        models.
    ContainerAutoParam:
      properties:
        type:
          type: string
          enum:
            - container_auto
          description: Automatically creates a container for this request
          default: container_auto
        file_ids:
          items:
            type: string
            example: file-123
          type: array
          maxItems: 50
          description: An optional list of uploaded files to make available to your code.
        memory_limit:
          anyOf:
            - $ref: '#/components/schemas/ContainerMemoryLimit'
              description: The memory limit for the container.
            - type: 'null'
        network_policy:
          oneOf:
            - $ref: '#/components/schemas/ContainerNetworkPolicyDisabledParam'
            - $ref: '#/components/schemas/ContainerNetworkPolicyAllowlistParam'
          description: Network access policy for the container.
          discriminator:
            propertyName: type
        skills:
          items:
            oneOf:
              - $ref: '#/components/schemas/SkillReferenceParam'
              - $ref: '#/components/schemas/InlineSkillParam'
            discriminator:
              propertyName: type
          type: array
          maxItems: 200
          description: An optional list of skills referenced by id or inline data.
      type: object
      required:
        - type
    CustomTextFormatParam:
      properties:
        type:
          type: string
          enum:
            - text
          description: Unconstrained text format. Always `text`.
          default: text
      type: object
      required:
        - type
      title: Text format
      description: Unconstrained free-form text.
    CustomGrammarFormatParam:
      properties:
        type:
          type: string
          enum:
            - grammar
          description: Grammar format. Always `grammar`.
          default: grammar
        syntax:
          $ref: '#/components/schemas/GrammarSyntax1'
          description: The syntax of the grammar definition. One of `lark` or `regex`.
        definition:
          type: string
          description: The grammar definition.
      type: object
      required:
        - type
        - syntax
        - definition
      title: Grammar format
      description: A grammar defined by the user.
    FunctionToolParam:
      properties:
        name:
          type: string
          maxLength: 128
          minLength: 1
          pattern: ^[a-zA-Z0-9_-]+$
        description:
          anyOf:
            - type: string
            - type: 'null'
        parameters:
          anyOf:
            - $ref: '#/components/schemas/EmptyModelParam'
            - 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
        async:
          type: boolean
          description: >-
            Whether the tool response can be returned asynchronously versus
            immediately returned on next response creation.
        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.
            - type: 'null'
        defer_loading:
          type: boolean
          description: >-
            Whether this function should be deferred and discovered via tool
            search.
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              description: The tool invocation context(s).
            - type: 'null'
      type: object
      required:
        - name
        - type
    ApproximateLocation:
      properties:
        type:
          type: string
          enum:
            - approximate
          description: The type of location approximation. Always `approximate`.
          default: approximate
        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
    SearchContextSize:
      type: string
      enum:
        - low
        - medium
        - high
    SearchContentType:
      type: string
      enum:
        - text
        - image
    PromptCacheBreakpointConfig:
      properties:
        mode:
          type: string
          enum:
            - explicit
          description: The breakpoint mode. Always `explicit`.
          default: explicit
        ttl:
          type: string
          enum:
            - 30m
            - 12h
          description: >-
            The minimum lifetime of this cache breakpoint. Defaults to the
            request TTL.
      type: object
      required:
        - mode
      title: Prompt cache breakpoint
      description: >-
        Marks the exact end of a reusable prompt prefix. When `ttl` is omitted,
        the breakpoint inherits the request's `prompt_cache_options.ttl`; the
        boundary is not rounded to a token block.
    ImageDetail:
      type: string
      enum:
        - low
        - high
        - auto
        - original
    FileInputDetail:
      type: string
      enum:
        - auto
        - low
        - high
    DirectToolCallCallerParam:
      properties:
        type:
          type: string
          enum:
            - direct
          description: The caller type. Always `direct`.
          default: direct
      type: object
      required:
        - type
    ProgramToolCallCallerParam:
      properties:
        type:
          type: string
          enum:
            - program
          description: The caller type. Always `program`.
          default: program
        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
    ClickButtonType:
      type: string
      enum:
        - left
        - right
        - wheel
        - back
        - forward
    CoordParam:
      properties:
        x:
          type: integer
          description: The x-coordinate.
        'y':
          type: integer
          description: The y-coordinate.
      type: object
      required:
        - x
        - 'y'
      title: Coordinate
      description: 'An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.'
    PromptCacheBreakpointParam:
      properties:
        mode:
          type: string
          enum:
            - explicit
          description: The breakpoint mode. Always `explicit`.
          default: explicit
        ttl:
          type: string
          enum:
            - 30m
            - 12h
          description: >-
            The minimum lifetime of this cache breakpoint. Defaults to the
            request TTL.
      type: object
      required:
        - mode
      title: Prompt cache breakpoint
      description: >-
        Marks the exact end of a reusable prompt prefix. When `ttl` is omitted,
        the breakpoint inherits the request's `prompt_cache_options.ttl`; the
        boundary is not rounded to a token block.
    DetailEnum:
      type: string
      enum:
        - low
        - high
        - auto
        - original
    FileDetailEnum:
      type: string
      enum:
        - auto
        - low
        - high
    ToolSearchOutputNamespaceToolParam:
      properties:
        type:
          type: string
          enum:
            - namespace
          description: The type of the tool. Always `namespace`.
          default: namespace
        name:
          type: string
          minLength: 1
          description: The namespace name used in tool calls (for example, `crm`).
        description:
          type: string
          description: A description of the namespace shown to the model.
        tools:
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolSearchOutputFunctionToolParam'
              - $ref: '#/components/schemas/CustomToolParam'
            description: A function or custom tool loaded into a namespace by tool search.
            discriminator:
              propertyName: type
          type: array
          minItems: 1
          description: The function/custom tools loaded inside this namespace.
      type: object
      required:
        - type
        - name
        - description
        - tools
      title: Namespace
      description: Groups function/custom tools under a shared namespace.
    LocalSkillParam:
      properties:
        name:
          type: string
          description: The name of the skill.
        description:
          type: string
          description: The description of the skill.
        path:
          type: string
          description: The path to the directory containing the skill.
      type: object
      required:
        - name
        - description
        - path
    FunctionShellCallOutputOutcomeParam:
      oneOf:
        - $ref: '#/components/schemas/FunctionShellCallOutputTimeoutOutcomeParam'
        - $ref: '#/components/schemas/FunctionShellCallOutputExitOutcomeParam'
      title: Shell call outcome
      description: The exit or timeout outcome associated with this shell call.
      discriminator:
        propertyName: type
    ApplyPatchCreateFileOperationParam:
      properties:
        type:
          type: string
          enum:
            - create_file
          description: The operation type. Always `create_file`.
          default: create_file
        path:
          type: string
          minLength: 1
          description: Path of the file to create relative to the workspace root.
        diff:
          type: string
          maxLength: 10485760
          description: Unified diff content to apply when creating the file.
      type: object
      required:
        - type
        - path
        - diff
      title: Apply patch create file operation
      description: Instruction for creating a new file via the apply_patch tool.
    ApplyPatchDeleteFileOperationParam:
      properties:
        type:
          type: string
          enum:
            - delete_file
          description: The operation type. Always `delete_file`.
          default: delete_file
        path:
          type: string
          minLength: 1
          description: Path of the file to delete relative to the workspace root.
      type: object
      required:
        - type
        - path
      title: Apply patch delete file operation
      description: Instruction for deleting an existing file via the apply_patch tool.
    ApplyPatchUpdateFileOperationParam:
      properties:
        type:
          type: string
          enum:
            - update_file
          description: The operation type. Always `update_file`.
          default: update_file
        path:
          type: string
          minLength: 1
          description: Path of the file to update relative to the workspace root.
        diff:
          type: string
          maxLength: 10485760
          description: Unified diff content to apply to the existing file.
      type: object
      required:
        - type
        - path
        - diff
      title: Apply patch update file operation
      description: Instruction for updating an existing file via the apply_patch tool.
    TopLogProb:
      properties:
        token:
          type: string
        logprob:
          type: number
        bytes:
          items:
            type: integer
          type: array
      type: object
      required:
        - token
        - logprob
        - bytes
      title: Top log probability
      description: The top log probability of a token.
    RankerVersionType:
      type: string
      enum:
        - auto
        - default-2024-11-15
    HybridSearchOptions:
      properties:
        embedding_weight:
          type: number
          description: The weight of the embedding in the reciprocal ranking fusion.
        text_weight:
          type: number
          description: The weight of the text in the reciprocal ranking fusion.
      type: object
      required:
        - embedding_weight
        - text_weight
    ComparisonFilter:
      type: object
      additionalProperties: false
      title: Comparison Filter
      description: >
        A filter used to compare a specified attribute key to a given value
        using a defined comparison operation.
      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`.

            - `eq`: equals

            - `ne`: not equal

            - `gt`: greater than

            - `gte`: greater than or equal

            - `lt`: less than

            - `lte`: less than or equal

            - `in`: in

            - `nin`: not in
        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
    CompoundFilter:
      type: object
      additionalProperties: false
      title: Compound Filter
      description: Combine multiple filters using `and` or `or`.
      properties:
        type:
          type: string
          description: 'Type of operation: `and` or `or`.'
          enum:
            - and
            - or
        filters:
          type: array
          description: >-
            Array of filters to combine. Items can be `ComparisonFilter` or
            `CompoundFilter`.
          items:
            oneOf:
              - $ref: '#/components/schemas/ComparisonFilter'
              - $ref: '#/components/schemas/CompoundFilter'
            discriminator:
              propertyName: type
      required:
        - type
        - filters
    ContainerMemoryLimit:
      type: string
      enum:
        - 1g
        - 4g
        - 16g
        - 64g
    ContainerNetworkPolicyDisabledParam:
      properties:
        type:
          type: string
          enum:
            - disabled
          description: Disable outbound network access. Always `disabled`.
          default: disabled
      type: object
      required:
        - type
    ContainerNetworkPolicyAllowlistParam:
      properties:
        type:
          type: string
          enum:
            - allowlist
          description: >-
            Allow outbound network access only to specified domains. Always
            `allowlist`.
          default: allowlist
        allowed_domains:
          items:
            type: string
          type: array
          minItems: 1
          description: A list of allowed domains when type is `allowlist`.
        domain_secrets:
          items:
            $ref: '#/components/schemas/ContainerNetworkPolicyDomainSecretParam'
          type: array
          minItems: 1
          description: Optional domain-scoped secrets for allowlisted domains.
      type: object
      required:
        - type
        - allowed_domains
    SvgReasoningParam:
      properties:
        effort:
          oneOf:
            - $ref: '#/components/schemas/ReasoningEffortEnum'
              description: >-
                Controls how much effort the model should spend on reasoning for
                this request.
      type: object
      required: []
      description: >-
        Reasoning effort for SVG authoring. When omitted, uses the author
        model's default in both Images and Responses.
    SkillReferenceParam:
      properties:
        type:
          type: string
          enum:
            - skill_reference
          description: References a skill created with the /v1/skills endpoint.
          default: skill_reference
        skill_id:
          type: string
          maxLength: 64
          minLength: 1
          description: The ID of the referenced skill.
        version:
          type: string
          description: >-
            Optional skill version. Use a positive integer or 'latest'. Omit for
            default.
      type: object
      required:
        - type
        - skill_id
    InlineSkillParam:
      properties:
        type:
          type: string
          enum:
            - inline
          description: Defines an inline skill for this request.
          default: inline
        name:
          type: string
          description: The name of the skill.
        description:
          type: string
          description: The description of the skill.
        source:
          $ref: '#/components/schemas/InlineSkillSourceParam'
          description: Inline skill payload
      type: object
      required:
        - type
        - name
        - description
        - source
    GrammarSyntax1:
      type: string
      enum:
        - lark
        - regex
    ToolSearchOutputFunctionToolParam:
      properties:
        name:
          type: string
          maxLength: 128
          minLength: 1
          pattern: ^(?![\s\S]*[\r\n])[a-zA-Z0-9_.-]+$
          description: The name of the loaded function tool.
        description:
          anyOf:
            - type: string
            - type: 'null'
        parameters:
          anyOf:
            - $ref: '#/components/schemas/EmptyModelParam'
            - 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
        async:
          type: boolean
          description: >-
            Whether the tool response can be returned asynchronously versus
            immediately returned on next response creation.
        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.
            - type: 'null'
        defer_loading:
          type: boolean
          description: >-
            Whether this function should be deferred and discovered via tool
            search.
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              description: The tool invocation context(s).
            - type: 'null'
      type: object
      required:
        - name
        - type
    FunctionShellCallOutputTimeoutOutcomeParam:
      properties:
        type:
          type: string
          enum:
            - timeout
          description: The outcome type. Always `timeout`.
          default: timeout
      type: object
      required:
        - type
      title: Shell call timeout outcome
      description: Indicates that the shell call exceeded its configured time limit.
    FunctionShellCallOutputExitOutcomeParam:
      properties:
        type:
          type: string
          enum:
            - exit
          description: The outcome type. Always `exit`.
          default: exit
        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.
    ContainerNetworkPolicyDomainSecretParam:
      properties:
        domain:
          type: string
          minLength: 1
          description: The domain associated with the secret.
        name:
          type: string
          minLength: 1
          description: The name of the secret to inject for the domain.
        value:
          type: string
          maxLength: 10485760
          minLength: 1
          description: The secret value to inject for the domain.
      type: object
      required:
        - domain
        - name
        - value
    ReasoningEffortEnum:
      type: string
      enum:
        - none
        - minimal
        - low
        - medium
        - high
        - xhigh
        - max
    InlineSkillSourceParam:
      properties:
        type:
          type: string
          enum:
            - base64
          description: The type of the inline skill source. Must be `base64`.
          default: base64
        media_type:
          type: string
          enum:
            - application/zip
          description: >-
            The media type of the inline skill payload. Must be
            `application/zip`.
          default: application/zip
        data:
          type: string
          maxLength: 70254592
          minLength: 1
          description: Base64-encoded skill zip bundle.
      type: object
      required:
        - type
        - media_type
        - data
      description: Inline skill payload
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send your DreamTo API Key in the `Authorization` header: `Authorization:
        Bearer <API Key>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.