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

# Configure a stream



## OpenAPI

````yaml https://github.com/DeepwaterExploration/dweOS/releases/latest/download/openapi.json post /api/devices/configure_stream
openapi: 3.1.0
info:
  title: DWE OS API
  description: API for DWE OS
  version: 0.1.0
servers: []
security: []
paths:
  /api/devices/configure_stream:
    post:
      tags:
        - cameras
      summary: Configure a stream
      operationId: configure_stream_api_devices_configure_stream_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StreamInfoModel'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleRequestStatusModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    StreamInfoModel:
      properties:
        bus_info:
          type: string
          title: Bus Info
        stream_type:
          $ref: '#/components/schemas/StreamTypeEnum'
        stream_format:
          $ref: '#/components/schemas/StreamFormatModel'
        encode_type:
          $ref: '#/components/schemas/StreamEncodeTypeEnum'
        enabled:
          type: boolean
          title: Enabled
        endpoints:
          items:
            $ref: '#/components/schemas/StreamEndpointModel'
          type: array
          title: Endpoints
      type: object
      required:
        - bus_info
        - stream_type
        - stream_format
        - encode_type
        - enabled
        - endpoints
      title: StreamInfoModel
    SimpleRequestStatusModel:
      properties:
        success:
          type: boolean
          title: Success
          default: true
      type: object
      title: SimpleRequestStatusModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StreamTypeEnum:
      type: string
      enum:
        - UDP
        - RECORDING
      title: StreamTypeEnum
    StreamFormatModel:
      properties:
        width:
          type: integer
          title: Width
        height:
          type: integer
          title: Height
        interval:
          $ref: '#/components/schemas/IntervalModel'
      type: object
      required:
        - width
        - height
        - interval
      title: StreamFormatModel
    StreamEncodeTypeEnum:
      type: string
      enum:
        - MJPG
        - H264
        - SOFTWARE_H264
        - NONE
      title: StreamEncodeTypeEnum
    StreamEndpointModel:
      properties:
        host:
          type: string
          title: Host
        port:
          type: integer
          title: Port
      type: object
      required:
        - host
        - port
      title: StreamEndpointModel
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    IntervalModel:
      properties:
        numerator:
          type: integer
          title: Numerator
        denominator:
          type: integer
          title: Denominator
      type: object
      required:
        - numerator
        - denominator
      title: IntervalModel

````