> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-docs-prisma-airs-updates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create response



## OpenAPI

````yaml https://raw.githubusercontent.com/PaloAltoNetworks/openapi/refs/heads/main/openapi.yaml post /responses
openapi: 3.0.0
info:
  title: Prisma AIRS AI Gateway API
  version: 3.0.0
  description: ''
servers:
  - url: https://aigw.portkey.ai/v1
    description: Managed
  - url: https://self-hosted-gateway-url.example.com/v1
    description: Self-hosted -- replace with your own gateway host
security:
  - Authorization: []
tags:
  - name: Assistants
    description: ''
  - name: Audio
    description: ''
  - name: Batch
    description: ''
  - name: Chat
    description: ''
  - name: Completions
    description: ''
  - name: Embeddings
    description: ''
  - name: Files
    description: ''
  - name: Fine-Tuning
    description: ''
  - name: Images
    description: ''
  - name: Model Pricing
    description: ''
  - name: Models
    description: ''
  - name: Moderations
    description: ''
  - name: OCR
    description: ''
  - name: Realtime
    description: ''
  - name: Rerank
    description: ''
  - name: Responses
    description: ''
  - name: Vector Stores
    description: ''
  - name: Configs
    description: ''
  - name: Guardrails
    description: ''
  - name: Integrations
    description: ''
  - name: Integrations > Models
    description: ''
  - name: Integrations > Workspaces
    description: ''
  - name: Providers
    description: ''
  - name: Secret References
    description: ''
  - name: MCP Integrations
    description: ''
  - name: MCP Integrations > Capabilities
    description: ''
  - name: MCP Integrations > Metadata
    description: ''
  - name: MCP Integrations > Workspaces
    description: ''
  - name: MCP Servers
    description: ''
  - name: MCP Servers > Capabilities
    description: ''
  - name: MCP Servers > Connections
    description: ''
  - name: MCP Servers > User Access
    description: ''
  - name: API Keys
    description: ''
  - name: Deployments
    description: ''
  - name: Org Guardrails
    description: ''
  - name: Rate Limit Policies
    description: ''
  - name: Usage Limit Policies
    description: ''
  - name: Analytics > Graphs
    description: ''
  - name: Analytics > Groups
    description: ''
  - name: Analytics > Summary
    description: ''
  - name: Feedback
    description: ''
  - name: Logs
    description: ''
paths:
  /responses:
    post:
      tags:
        - Responses
      operationId: createResponse
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateResponse'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/ResponseStreamEvent'
components:
  schemas:
    CreateResponse:
      allOf:
        - $ref: '#/components/schemas/CreateModelResponseProperties'
        - $ref: '#/components/schemas/ResponseProperties'
        - type: object
          properties:
            input:
              x-oaiExpandable: true
              oneOf:
                - type: string
                  title: Text input
                - type: array
                  title: Input item list
                  items:
                    $ref: '#/components/schemas/InputItem'
                    x-oaiExpandable: true
            include:
              type: array
              items:
                $ref: '#/components/schemas/Includable'
                x-oaiExpandable: true
              nullable: true
            parallel_tool_calls:
              type: boolean
              default: true
              nullable: true
            store:
              type: boolean
              default: true
              nullable: true
            stream:
              type: boolean
              default: false
              nullable: true
          required:
            - model
            - input
    Response:
      allOf:
        - $ref: '#/components/schemas/ModelResponseProperties'
        - $ref: '#/components/schemas/ResponseProperties'
        - type: object
          properties:
            id:
              type: string
            object:
              type: string
              enum:
                - response
              x-stainless-const: true
            status:
              type: string
              enum:
                - completed
                - failed
                - in_progress
                - incomplete
            created_at:
              type: number
            error:
              $ref: '#/components/schemas/ResponseError'
            incomplete_details:
              type: object
              nullable: true
              properties:
                reason:
                  type: string
                  enum:
                    - max_output_tokens
                    - content_filter
            output:
              type: array
              x-oaiExpandable: true
              items:
                $ref: '#/components/schemas/OutputItem'
                x-oaiExpandable: true
            output_text:
              type: string
              nullable: true
              x-oaiSupportedSDKs:
                - python
                - javascript
            usage:
              $ref: '#/components/schemas/ResponseUsage'
            parallel_tool_calls:
              type: boolean
              default: true
          required:
            - id
            - object
            - created_at
            - error
            - incomplete_details
            - instructions
            - model
            - tools
            - output
            - parallel_tool_calls
            - metadata
            - tool_choice
            - temperature
            - top_p
    ResponseStreamEvent:
      anyOf:
        - $ref: '#/components/schemas/ResponseAudioDeltaEvent'
        - $ref: '#/components/schemas/ResponseAudioDoneEvent'
        - $ref: '#/components/schemas/ResponseAudioTranscriptDeltaEvent'
        - $ref: '#/components/schemas/ResponseAudioTranscriptDoneEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDeltaEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDoneEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCompletedEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallInProgressEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallInterpretingEvent'
        - $ref: '#/components/schemas/ResponseCompletedEvent'
        - $ref: '#/components/schemas/ResponseContentPartAddedEvent'
        - $ref: '#/components/schemas/ResponseContentPartDoneEvent'
        - $ref: '#/components/schemas/ResponseCreatedEvent'
        - $ref: '#/components/schemas/ResponseErrorEvent'
        - $ref: '#/components/schemas/ResponseFileSearchCallCompletedEvent'
        - $ref: '#/components/schemas/ResponseFileSearchCallInProgressEvent'
        - $ref: '#/components/schemas/ResponseFileSearchCallSearchingEvent'
        - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent'
        - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDoneEvent'
        - $ref: '#/components/schemas/ResponseInProgressEvent'
        - $ref: '#/components/schemas/ResponseFailedEvent'
        - $ref: '#/components/schemas/ResponseIncompleteEvent'
        - $ref: '#/components/schemas/ResponseOutputItemAddedEvent'
        - $ref: '#/components/schemas/ResponseOutputItemDoneEvent'
        - $ref: '#/components/schemas/ResponseRefusalDeltaEvent'
        - $ref: '#/components/schemas/ResponseRefusalDoneEvent'
        - $ref: '#/components/schemas/ResponseTextAnnotationDeltaEvent'
        - $ref: '#/components/schemas/ResponseTextDeltaEvent'
        - $ref: '#/components/schemas/ResponseTextDoneEvent'
        - $ref: '#/components/schemas/ResponseWebSearchCallCompletedEvent'
        - $ref: '#/components/schemas/ResponseWebSearchCallInProgressEvent'
        - $ref: '#/components/schemas/ResponseWebSearchCallSearchingEvent'
      discriminator:
        propertyName: type
    CreateModelResponseProperties:
      allOf:
        - $ref: '#/components/schemas/ModelResponseProperties'
    ResponseProperties:
      type: object
      properties:
        previous_response_id:
          type: string
          nullable: true
        model:
          $ref: '#/components/schemas/ModelIdsResponses'
        reasoning:
          $ref: '#/components/schemas/Reasoning'
          nullable: true
        max_output_tokens:
          type: integer
          nullable: true
        instructions:
          type: string
          nullable: true
        text:
          type: object
          properties:
            format:
              $ref: '#/components/schemas/TextResponseFormatConfiguration'
        tools:
          type: array
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          x-oaiExpandable: true
          oneOf:
            - $ref: '#/components/schemas/ToolChoiceOptions'
            - $ref: '#/components/schemas/ToolChoiceTypes'
            - $ref: '#/components/schemas/ToolChoiceFunction'
        truncation:
          type: string
          enum:
            - auto
            - disabled
          nullable: true
          default: disabled
    InputItem:
      oneOf:
        - $ref: '#/components/schemas/EasyInputMessage'
        - $ref: '#/components/schemas/Item'
          type: object
          title: Item
        - $ref: '#/components/schemas/ItemReference'
      discriminator:
        propertyName: type
    Includable:
      type: string
      enum:
        - file_search_call.results
        - message.input_image.image_url
        - computer_call_output.output.image_url
    ModelResponseProperties:
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/Metadata'
        temperature:
          type: number
          minimum: 0
          maximum: 2
          default: 1
          nullable: true
        top_p:
          type: number
          minimum: 0
          maximum: 1
          default: 1
          nullable: true
        user:
          type: string
    ResponseError:
      type: object
      nullable: true
      properties:
        code:
          $ref: '#/components/schemas/ResponseErrorCode'
        message:
          type: string
      required:
        - code
        - message
    OutputItem:
      anyOf:
        - $ref: '#/components/schemas/OutputMessage'
        - $ref: '#/components/schemas/FileSearchToolCall'
        - $ref: '#/components/schemas/FunctionToolCall'
        - $ref: '#/components/schemas/WebSearchToolCall'
        - $ref: '#/components/schemas/ComputerToolCall'
        - $ref: '#/components/schemas/ReasoningItem'
      x-oaiExpandable: true
      discriminator:
        propertyName: type
    ResponseUsage:
      type: object
      properties:
        input_tokens:
          type: integer
        input_tokens_details:
          type: object
          properties:
            cached_tokens:
              type: integer
          required:
            - cached_tokens
        output_tokens:
          type: integer
        output_tokens_details:
          type: object
          properties:
            reasoning_tokens:
              type: integer
          required:
            - reasoning_tokens
        total_tokens:
          type: integer
      required:
        - input_tokens
        - input_tokens_details
        - output_tokens
        - output_tokens_details
        - total_tokens
    ResponseAudioDeltaEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.audio.delta
          x-stainless-const: true
        delta:
          type: string
      required:
        - type
        - delta
    ResponseAudioDoneEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.audio.done
          x-stainless-const: true
      required:
        - type
        - response_id
    ResponseAudioTranscriptDeltaEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.audio.transcript.delta
          x-stainless-const: true
        delta:
          type: string
      required:
        - type
        - response_id
        - delta
    ResponseAudioTranscriptDoneEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.audio.transcript.done
          x-stainless-const: true
      required:
        - type
        - response_id
    ResponseCodeInterpreterCallCodeDeltaEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.code_interpreter_call.code.delta
          x-stainless-const: true
        output_index:
          type: integer
        delta:
          type: string
      required:
        - type
        - response_id
        - output_index
        - delta
    ResponseCodeInterpreterCallCodeDoneEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.code_interpreter_call.code.done
          x-stainless-const: true
        output_index:
          type: integer
        code:
          type: string
      required:
        - type
        - response_id
        - output_index
        - code
    ResponseCodeInterpreterCallCompletedEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.code_interpreter_call.completed
          x-stainless-const: true
        output_index:
          type: integer
        code_interpreter_call:
          $ref: '#/components/schemas/CodeInterpreterToolCall'
      required:
        - type
        - response_id
        - output_index
        - code_interpreter_call
    ResponseCodeInterpreterCallInProgressEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.code_interpreter_call.in_progress
          x-stainless-const: true
        output_index:
          type: integer
        code_interpreter_call:
          $ref: '#/components/schemas/CodeInterpreterToolCall'
      required:
        - type
        - response_id
        - output_index
        - code_interpreter_call
    ResponseCodeInterpreterCallInterpretingEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.code_interpreter_call.interpreting
          x-stainless-const: true
        output_index:
          type: integer
        code_interpreter_call:
          $ref: '#/components/schemas/CodeInterpreterToolCall'
      required:
        - type
        - response_id
        - output_index
        - code_interpreter_call
    ResponseCompletedEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.completed
          x-stainless-const: true
        response:
          $ref: '#/components/schemas/Response'
      required:
        - type
        - response
    ResponseContentPartAddedEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.content_part.added
          x-stainless-const: true
        item_id:
          type: string
        output_index:
          type: integer
        content_index:
          type: integer
        part:
          $ref: '#/components/schemas/OutputContent'
          x-oaiExpandable: true
      required:
        - type
        - item_id
        - output_index
        - content_index
        - part
    ResponseContentPartDoneEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.content_part.done
          x-stainless-const: true
        item_id:
          type: string
        output_index:
          type: integer
        content_index:
          type: integer
        part:
          $ref: '#/components/schemas/OutputContent'
          x-oaiExpandable: true
      required:
        - type
        - item_id
        - output_index
        - content_index
        - part
    ResponseCreatedEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.created
          x-stainless-const: true
        response:
          $ref: '#/components/schemas/Response'
      required:
        - type
        - response
    ResponseErrorEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - error
          x-stainless-const: true
        code:
          type: string
          nullable: true
        message:
          type: string
        param:
          type: string
          nullable: true
      required:
        - type
        - code
        - message
        - param
    ResponseFileSearchCallCompletedEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.file_search_call.completed
          x-stainless-const: true
        output_index:
          type: integer
        item_id:
          type: string
      required:
        - type
        - output_index
        - item_id
    ResponseFileSearchCallInProgressEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.file_search_call.in_progress
          x-stainless-const: true
        output_index:
          type: integer
        item_id:
          type: string
      required:
        - type
        - output_index
        - item_id
    ResponseFileSearchCallSearchingEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.file_search_call.searching
          x-stainless-const: true
        output_index:
          type: integer
        item_id:
          type: string
      required:
        - type
        - output_index
        - item_id
    ResponseFunctionCallArgumentsDeltaEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.function_call_arguments.delta
          x-stainless-const: true
        item_id:
          type: string
        output_index:
          type: integer
        delta:
          type: string
      required:
        - type
        - item_id
        - output_index
        - delta
    ResponseFunctionCallArgumentsDoneEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.function_call_arguments.done
          x-stainless-const: true
        item_id:
          type: string
        output_index:
          type: integer
        arguments:
          type: string
      required:
        - type
        - item_id
        - output_index
        - arguments
    ResponseInProgressEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.in_progress
          x-stainless-const: true
        response:
          $ref: '#/components/schemas/Response'
      required:
        - type
        - response
    ResponseFailedEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.failed
          x-stainless-const: true
        response:
          $ref: '#/components/schemas/Response'
      required:
        - type
        - response
    ResponseIncompleteEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.incomplete
          x-stainless-const: true
        response:
          $ref: '#/components/schemas/Response'
      required:
        - type
        - response
    ResponseOutputItemAddedEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.output_item.added
          x-stainless-const: true
        output_index:
          type: integer
        item:
          $ref: '#/components/schemas/OutputItem'
          x-oaiExpandable: true
      required:
        - type
        - output_index
        - item
    ResponseOutputItemDoneEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.output_item.done
          x-stainless-const: true
        output_index:
          type: integer
        item:
          $ref: '#/components/schemas/OutputItem'
          x-oaiExpandable: true
      required:
        - type
        - output_index
        - item
    ResponseRefusalDeltaEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.refusal.delta
          x-stainless-const: true
        item_id:
          type: string
        output_index:
          type: integer
        content_index:
          type: integer
        delta:
          type: string
      required:
        - type
        - item_id
        - output_index
        - content_index
        - delta
    ResponseRefusalDoneEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.refusal.done
          x-stainless-const: true
        item_id:
          type: string
        output_index:
          type: integer
        content_index:
          type: integer
        refusal:
          type: string
      required:
        - type
        - item_id
        - output_index
        - content_index
        - refusal
    ResponseTextAnnotationDeltaEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.output_text.annotation.added
          x-stainless-const: true
        item_id:
          type: string
        output_index:
          type: integer
        content_index:
          type: integer
        annotation_index:
          type: integer
        annotation:
          $ref: '#/components/schemas/Annotation'
      required:
        - type
        - item_id
        - output_index
        - content_index
        - annotation_index
        - annotation
    ResponseTextDeltaEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.output_text.delta
          x-stainless-const: true
        item_id:
          type: string
        output_index:
          type: integer
        content_index:
          type: integer
        delta:
          type: string
      required:
        - type
        - item_id
        - output_index
        - content_index
        - delta
    ResponseTextDoneEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.output_text.done
          x-stainless-const: true
        item_id:
          type: string
        output_index:
          type: integer
        content_index:
          type: integer
        text:
          type: string
      required:
        - type
        - item_id
        - output_index
        - content_index
        - text
    ResponseWebSearchCallCompletedEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.web_search_call.completed
          x-stainless-const: true
        output_index:
          type: integer
        item_id:
          type: string
      required:
        - type
        - output_index
        - item_id
    ResponseWebSearchCallInProgressEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.web_search_call.in_progress
          x-stainless-const: true
        output_index:
          type: integer
        item_id:
          type: string
      required:
        - type
        - output_index
        - item_id
    ResponseWebSearchCallSearchingEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - response.web_search_call.searching
          x-stainless-const: true
        output_index:
          type: integer
        item_id:
          type: string
      required:
        - type
        - output_index
        - item_id
    ModelIdsResponses:
      anyOf:
        - type: string
          enum:
            - o1-pro
            - o1-pro-2025-03-19
            - computer-use-preview
            - computer-use-preview-2025-03-11
    Reasoning:
      type: object
      title: Reasoning
      x-oaiExpandable: true
      properties:
        effort:
          $ref: '#/components/schemas/ReasoningEffort'
        generate_summary:
          type: string
          enum:
            - concise
            - detailed
          nullable: true
    TextResponseFormatConfiguration:
      oneOf:
        - $ref: '#/components/schemas/ResponseFormatText'
        - $ref: '#/components/schemas/TextResponseFormatJsonSchema'
        - $ref: '#/components/schemas/ResponseFormatJsonObject'
      x-oaiExpandable: true
    Tool:
      oneOf:
        - $ref: '#/components/schemas/FileSearchTool'
        - $ref: '#/components/schemas/FunctionTool'
        - $ref: '#/components/schemas/ComputerTool'
        - $ref: '#/components/schemas/WebSearchTool'
      x-oaiExpandable: true
    ToolChoiceOptions:
      type: string
      title: Tool choice mode
      enum:
        - none
        - auto
        - required
    ToolChoiceTypes:
      type: object
      title: Hosted tool
      properties:
        type:
          type: string
          enum:
            - file_search
            - web_search_preview
            - computer_use_preview
            - web_search_preview_2025_03_11
      required:
        - type
    ToolChoiceFunction:
      type: object
      title: Function tool
      properties:
        type:
          type: string
          enum:
            - function
          x-stainless-const: true
        name:
          type: string
      required:
        - type
        - name
    EasyInputMessage:
      type: object
      title: Input message
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
            - system
            - developer
        content:
          x-oaiExpandable: true
          oneOf:
            - type: string
              title: Text input
            - $ref: '#/components/schemas/InputMessageContentList'
        type:
          type: string
          enum:
            - message
          x-stainless-const: true
      required:
        - role
        - content
    Item:
      type: object
      oneOf:
        - $ref: '#/components/schemas/InputMessage'
        - $ref: '#/components/schemas/OutputMessage'
        - $ref: '#/components/schemas/FileSearchToolCall'
        - $ref: '#/components/schemas/ComputerToolCall'
        - $ref: '#/components/schemas/ComputerToolCallOutput'
        - $ref: '#/components/schemas/WebSearchToolCall'
        - $ref: '#/components/schemas/FunctionToolCall'
        - $ref: '#/components/schemas/FunctionToolCallOutput'
        - $ref: '#/components/schemas/ReasoningItem'
      x-oaiExpandable: true
      discriminator:
        propertyName: type
    ItemReference:
      type: object
      title: Item reference
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - item_reference
          x-stainless-const: true
      required:
        - id
        - type
    Metadata:
      type: object
      additionalProperties:
        type: string
      x-oaiTypeLabel: map
      nullable: true
    ResponseErrorCode:
      type: string
      enum:
        - server_error
        - rate_limit_exceeded
        - invalid_prompt
        - vector_store_timeout
        - invalid_image
        - invalid_image_format
        - invalid_base64_image
        - invalid_image_url
        - image_too_large
        - image_too_small
        - image_parse_error
        - image_content_policy_violation
        - invalid_image_mode
        - image_file_too_large
        - unsupported_image_media_type
        - empty_image_file
        - failed_to_download_image
        - image_file_not_found
    OutputMessage:
      type: object
      title: Output message
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - message
          x-stainless-const: true
        role:
          type: string
          enum:
            - assistant
          x-stainless-const: true
        content:
          type: array
          x-oaiExpandable: true
          items:
            $ref: '#/components/schemas/OutputContent'
            x-oaiExpandable: true
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - id
        - type
        - role
        - content
        - status
    FileSearchToolCall:
      type: object
      title: File search tool call
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - file_search_call
          x-stainless-const: true
        status:
          type: string
          enum:
            - in_progress
            - searching
            - completed
            - incomplete
            - failed
        queries:
          type: array
          items:
            type: string
        results:
          type: array
          items:
            type: object
            properties:
              file_id:
                type: string
              text:
                type: string
              filename:
                type: string
              attributes:
                $ref: '#/components/schemas/VectorStoreFileAttributes'
              score:
                type: number
                format: float
          nullable: true
      required:
        - id
        - type
        - status
        - queries
    FunctionToolCall:
      type: object
      title: Function tool call
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - function_call
          x-stainless-const: true
        call_id:
          type: string
        name:
          type: string
        arguments:
          type: string
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - type
        - call_id
        - name
        - arguments
    WebSearchToolCall:
      type: object
      title: Web search tool call
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - web_search_call
          x-stainless-const: true
        status:
          type: string
          enum:
            - in_progress
            - searching
            - completed
            - failed
      required:
        - id
        - type
        - status
    ComputerToolCall:
      type: object
      title: Computer tool call
      properties:
        type:
          type: string
          enum:
            - computer_call
          default: computer_call
        id:
          type: string
        call_id:
          type: string
        action:
          $ref: '#/components/schemas/ComputerAction'
          x-oaiExpandable: true
        pending_safety_checks:
          type: array
          x-oaiExpandable: true
          items:
            $ref: '#/components/schemas/ComputerToolCallSafetyCheck'
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - type
        - id
        - action
        - call_id
        - pending_safety_checks
        - status
    ReasoningItem:
      type: object
      title: Reasoning
      x-oaiExpandable: true
      properties:
        type:
          type: string
          enum:
            - reasoning
          x-stainless-const: true
        id:
          type: string
        summary:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - summary_text
                x-stainless-const: true
              text:
                type: string
            required:
              - type
              - text
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - id
        - summary
        - type
    CodeInterpreterToolCall:
      type: object
      title: Code interpreter tool call
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - code_interpreter_call
          x-stainless-const: true
        code:
          type: string
        status:
          type: string
          enum:
            - in_progress
            - interpreting
            - completed
        results:
          type: array
          items:
            $ref: '#/components/schemas/CodeInterpreterToolOutput'
            x-oaiExpandable: true
      required:
        - id
        - type
        - code
        - status
        - results
    OutputContent:
      oneOf:
        - $ref: '#/components/schemas/OutputText'
        - $ref: '#/components/schemas/Refusal'
    Annotation:
      oneOf:
        - $ref: '#/components/schemas/FileCitation'
        - $ref: '#/components/schemas/UrlCitation'
        - $ref: '#/components/schemas/FilePath'
    ReasoningEffort:
      type: string
      enum:
        - low
        - medium
        - high
      default: medium
      nullable: true
    ResponseFormatText:
      type: object
      title: Text
      properties:
        type:
          type: string
          enum:
            - text
          x-stainless-const: true
      required:
        - type
    TextResponseFormatJsonSchema:
      type: object
      title: JSON schema
      properties:
        type:
          type: string
          enum:
            - json_schema
          x-stainless-const: true
        description:
          type: string
        name:
          type: string
        schema:
          $ref: '#/components/schemas/ResponseFormatJsonSchemaSchema'
        strict:
          type: boolean
          default: false
          nullable: true
      required:
        - type
        - schema
    ResponseFormatJsonObject:
      type: object
      title: JSON object
      properties:
        type:
          type: string
          enum:
            - json_object
          x-stainless-const: true
      required:
        - type
    FileSearchTool:
      type: object
      title: File search
      properties:
        type:
          type: string
          enum:
            - file_search
          x-stainless-const: true
        vector_store_ids:
          type: array
          items:
            type: string
        max_num_results:
          type: integer
        filters:
          oneOf:
            - $ref: '#/components/schemas/ComparisonFilter'
            - $ref: '#/components/schemas/CompoundFilter'
          x-oaiExpandable: true
        ranking_options:
          type: object
          additionalProperties: false
          properties:
            ranker:
              type: string
              enum:
                - auto
                - default-2024-11-15
              default: auto
            score_threshold:
              type: number
              minimum: 0
              maximum: 1
              default: 0
      required:
        - type
        - vector_store_ids
    FunctionTool:
      type: object
      title: Function
      properties:
        type:
          type: string
          enum:
            - function
          x-stainless-const: true
        name:
          type: string
        description:
          type: string
          nullable: true
        parameters:
          type: object
          additionalProperties: true
        strict:
          type: boolean
      required:
        - type
        - name
        - parameters
        - strict
    ComputerTool:
      type: object
      title: Computer use
      properties:
        type:
          type: string
          enum:
            - computer_use_preview
          x-stainless-const: true
        display_width:
          type: number
        display_height:
          type: number
        environment:
          type: string
          enum:
            - mac
            - windows
            - ubuntu
            - browser
      required:
        - type
        - display_width
        - display_height
        - environment
    WebSearchTool:
      type: object
      title: Web search
      properties:
        type:
          type: string
          enum:
            - web_search_preview
            - web_search_preview_2025_03_11
        user_location:
          allOf:
            - $ref: '#/components/schemas/WebSearchLocation'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - approximate
                  x-stainless-const: true
              required:
                - type
          nullable: true
        search_context_size:
          $ref: '#/components/schemas/WebSearchContextSize'
      required:
        - type
    InputMessageContentList:
      type: array
      title: Input item content list
      x-oaiExpandable: true
      items:
        $ref: '#/components/schemas/InputContent'
        x-oaiExpandable: true
    InputMessage:
      type: object
      title: Input message
      properties:
        type:
          type: string
          enum:
            - message
          x-stainless-const: true
        role:
          type: string
          enum:
            - user
            - system
            - developer
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
        content:
          $ref: '#/components/schemas/InputMessageContentList'
      required:
        - role
        - content
    ComputerToolCallOutput:
      type: object
      title: Computer tool call output
      properties:
        type:
          type: string
          enum:
            - computer_call_output
          default: computer_call_output
          x-stainless-const: true
        id:
          type: string
        call_id:
          type: string
        acknowledged_safety_checks:
          type: array
          x-oaiExpandable: true
          items:
            $ref: '#/components/schemas/ComputerToolCallSafetyCheck'
        output:
          $ref: '#/components/schemas/ComputerScreenshotImage'
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - type
        - call_id
        - output
    FunctionToolCallOutput:
      type: object
      title: Function tool call output
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - function_call_output
          x-stainless-const: true
        call_id:
          type: string
        output:
          type: string
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - type
        - call_id
        - output
    VectorStoreFileAttributes:
      type: object
      maxProperties: 16
      additionalProperties:
        oneOf:
          - type: string
            maxLength: 512
          - type: number
          - type: boolean
      x-oaiTypeLabel: map
      nullable: true
    ComputerAction:
      oneOf:
        - $ref: '#/components/schemas/Click'
        - $ref: '#/components/schemas/DoubleClick'
        - $ref: '#/components/schemas/Drag'
        - $ref: '#/components/schemas/KeyPress'
        - $ref: '#/components/schemas/Move'
        - $ref: '#/components/schemas/Screenshot'
        - $ref: '#/components/schemas/Scroll'
        - $ref: '#/components/schemas/Type'
        - $ref: '#/components/schemas/Wait'
    ComputerToolCallSafetyCheck:
      type: object
      properties:
        id:
          type: string
        code:
          type: string
        message:
          type: string
      required:
        - id
        - code
        - message
    CodeInterpreterToolOutput:
      oneOf:
        - $ref: '#/components/schemas/CodeInterpreterTextOutput'
        - $ref: '#/components/schemas/CodeInterpreterFileOutput'
    OutputText:
      type: object
      title: Output text
      properties:
        type:
          type: string
          enum:
            - output_text
          x-stainless-const: true
        text:
          type: string
        annotations:
          type: array
          items:
            $ref: '#/components/schemas/Annotation'
            x-oaiExpandable: true
      required:
        - type
        - text
        - annotations
    Refusal:
      type: object
      title: Refusal
      properties:
        type:
          type: string
          enum:
            - refusal
          x-stainless-const: true
        refusal:
          type: string
      required:
        - type
        - refusal
    FileCitation:
      type: object
      title: File citation
      properties:
        type:
          type: string
          enum:
            - file_citation
          x-stainless-const: true
        index:
          type: integer
        file_id:
          type: string
      required:
        - type
        - index
        - file_id
    UrlCitation:
      type: object
      title: URL citation
      properties:
        url:
          type: string
        title:
          type: string
        type:
          type: string
          enum:
            - url_citation
          x-stainless-const: true
        start_index:
          type: integer
        end_index:
          type: integer
      required:
        - url
        - title
        - type
        - start_index
        - end_index
    FilePath:
      type: object
      title: File path
      properties:
        type:
          type: string
          enum:
            - file_path
          x-stainless-const: true
        file_id:
          type: string
        index:
          type: integer
      required:
        - type
        - file_id
        - index
    ResponseFormatJsonSchemaSchema:
      type: object
      title: JSON schema
      additionalProperties: true
    ComparisonFilter:
      type: object
      additionalProperties: false
      title: Comparison Filter
      properties:
        type:
          type: string
          default: eq
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
        key:
          type: string
        value:
          oneOf:
            - type: string
            - type: number
            - type: boolean
      required:
        - type
        - key
        - value
    CompoundFilter:
      type: object
      additionalProperties: false
      title: Compound Filter
      properties:
        type:
          type: string
          enum:
            - and
            - or
        filters:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/ComparisonFilter'
              - type: object
                additionalProperties: true
      required:
        - type
        - filters
    WebSearchLocation:
      type: object
      title: Web search location
      properties:
        country:
          type: string
        region:
          type: string
        city:
          type: string
        timezone:
          type: string
    WebSearchContextSize:
      type: string
      enum:
        - low
        - medium
        - high
      default: medium
    InputContent:
      oneOf:
        - $ref: '#/components/schemas/InputText'
        - $ref: '#/components/schemas/InputImage'
        - $ref: '#/components/schemas/InputFile'
      x-oaiExpandable: true
    ComputerScreenshotImage:
      type: object
      properties:
        type:
          type: string
          enum:
            - computer_screenshot
          default: computer_screenshot
          x-stainless-const: true
        image_url:
          type: string
        file_id:
          type: string
      required:
        - type
    Click:
      type: object
      title: Click
      properties:
        type:
          type: string
          enum:
            - click
          default: click
          x-stainless-const: true
        button:
          type: string
          enum:
            - left
            - right
            - wheel
            - back
            - forward
        x:
          type: integer
        'y':
          type: integer
      required:
        - type
        - button
        - x
        - 'y'
    DoubleClick:
      type: object
      title: DoubleClick
      properties:
        type:
          type: string
          enum:
            - double_click
          default: double_click
          x-stainless-const: true
        x:
          type: integer
        'y':
          type: integer
      required:
        - type
        - x
        - 'y'
    Drag:
      type: object
      title: Drag
      properties:
        type:
          type: string
          enum:
            - drag
          default: drag
          x-stainless-const: true
        path:
          type: array
          x-oaiExpandable: true
          items:
            $ref: '#/components/schemas/Coordinate'
            title: Drag path coordinates
            x-oaiExpandable: true
      required:
        - type
        - path
    KeyPress:
      type: object
      title: KeyPress
      properties:
        type:
          type: string
          enum:
            - keypress
          default: keypress
          x-stainless-const: true
        keys:
          type: array
          items:
            type: string
      required:
        - type
        - keys
    Move:
      type: object
      title: Move
      properties:
        type:
          type: string
          enum:
            - move
          default: move
          x-stainless-const: true
        x:
          type: integer
        'y':
          type: integer
      required:
        - type
        - x
        - 'y'
    Screenshot:
      type: object
      title: Screenshot
      properties:
        type:
          type: string
          enum:
            - screenshot
          default: screenshot
          x-stainless-const: true
      required:
        - type
    Scroll:
      type: object
      title: Scroll
      properties:
        type:
          type: string
          enum:
            - scroll
          default: scroll
          x-stainless-const: true
        x:
          type: integer
        'y':
          type: integer
        scroll_x:
          type: integer
        scroll_y:
          type: integer
      required:
        - type
        - x
        - 'y'
        - scroll_x
        - scroll_y
    Type:
      type: object
      title: Type
      properties:
        type:
          type: string
          enum:
            - type
          default: type
          x-stainless-const: true
        text:
          type: string
      required:
        - type
        - text
    Wait:
      type: object
      title: Wait
      properties:
        type:
          type: string
          enum:
            - wait
          default: wait
          x-stainless-const: true
      required:
        - type
    CodeInterpreterTextOutput:
      type: object
      title: Code interpreter text output
      properties:
        type:
          type: string
          enum:
            - logs
          x-stainless-const: true
        logs:
          type: string
      required:
        - type
        - logs
    CodeInterpreterFileOutput:
      type: object
      title: Code interpreter file output
      properties:
        type:
          type: string
          enum:
            - files
          x-stainless-const: true
        files:
          type: array
          items:
            type: object
            properties:
              mime_type:
                type: string
              file_id:
                type: string
            required:
              - mime_type
              - file_id
      required:
        - type
        - files
    InputText:
      type: object
      title: Text input
      properties:
        type:
          type: string
          enum:
            - input_text
          x-stainless-const: true
        text:
          type: string
      required:
        - type
        - text
    InputImage:
      type: object
      title: Image input
      properties:
        type:
          type: string
          enum:
            - input_image
          x-stainless-const: true
        image_url:
          type: string
          nullable: true
        file_id:
          type: string
          nullable: true
        detail:
          type: string
          enum:
            - high
            - low
            - auto
          default: auto
      required:
        - type
        - detail
    InputFile:
      type: object
      title: File input
      properties:
        type:
          type: string
          enum:
            - input_file
          x-stainless-const: true
        file_id:
          type: string
        filename:
          type: string
        file_data:
          type: string
      required:
        - type
    Coordinate:
      type: object
      title: Coordinate
      properties:
        x:
          type: integer
        'y':
          type: integer
      required:
        - x
        - 'y'
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````