openapi: 3.0.0
info:
  title: Overview
  version: ''
  description: >
    Bria's Video Editing APIs empowers builders with powerful tools for
    programmatically transforming video content while maintaining original
    quality.



    **Asynchronous Requests and the Status Service**  


    Bria API v2 endpoints process requests asynchronously by default. When you
    make an asynchronous request, the API immediately returns a `request_id` and
    a `status_url` instead of the final result. Use the Status Service to track
    the request's progress until it reaches a completed state.  


    See the full guide at [Status Service
    Documentation](https://docs.bria.ai/status) for complete details and usage
    examples.
externalDocs:
  description: Register and get API Access
  url: https://platform.bria.ai/console/account/api-keys
servers:
  - url: https://engine.prod.bria-api.com/v2/video/edit
  - url: https://engine.prod.bria-api.com/v2/video/generate
paths:
  /increase_resolution:
    servers:
      - url: https://engine.prod.bria-api.com/v2/video/edit
    post:
      summary: Increase Resolution - up to 8K
      tags:
        - Endpoints
      description: >-
        Initiates an asynchronous resolution upscaling job for a video.

        **Upscales up to 8K output!**


        Response behavior:

        - Returns HTTP 202 with `request_id` and `status_url`

        - Check job status by polling `status_url` or by calling the [Status
        Service](https://docs.bria.ai/status) with the `request_id` until a
        terminal status is returned


        Supported input containers:

        - .mp4, .mov, .webm, .avi, .gif


        Supported input codecs:

        - H.264, H.265 (HEVC), VP9, AV1, PhotoJPEG


        Input attributes preserved in output:

        - Aspect Ratio

        - Frame Rate

        - Color Bit Depth

        - Audio if present

        - Transparency if present and supported by the selected output preset


        Limits:

        - Max input duration: 60 seconds

        - Max output resolution: 7680x4320 (8K). If the selected
        `desired_increase` would exceed this limit the server returns 422
        Unprocessable Entity.


        Encoding:

        - Bitrate is adjusted automatically to match the target resolution to
        preserve quality.
      operationId: increase-resolution
      parameters:
        - in: header
          name: api_token
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                video:
                  type: string
                  description: Publicly accessible URL of the input video
                desired_increase:
                  type: integer
                  description: Integer scale factor for upscaling
                  enum:
                    - 2
                    - 4
                  default: 2
                output_container_and_codec:
                  type: string
                  description: Output container and codec preset
                  enum:
                    - mp4_h264
                    - mp4_h265
                    - webm_vp9
                    - mov_h265
                    - mov_proresks
                    - mkv_h264
                    - mkv_h265
                    - mkv_vp9
                    - gif
                  default: mp4_h264
              required:
                - video
            example:
              video: example
              desired_increase: 2
              output_container_and_codec: mp4_h265
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncInitialResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: Unsupported input container or codec
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /remove_background:
    servers:
      - url: https://engine.prod.bria-api.com/v2/video/edit
    post:
      summary: Remove Background
      tags:
        - Endpoints
      description: >-
        Initiates an asynchronous background removal job for a video.


        Response behavior:

        - Returns HTTP 202 with `request_id` and `status_url`

        - Check job status by polling `status_url` or by calling the [Status
        Service](https://docs.bria.ai/status) with the `request_id` until a
        terminal status is returned


        Supported input containers:

        - .mp4, .mov, .webm, .avi, .gif


        Supported input codecs:

        - H.264, H.265 (HEVC), VP9, AV1, PhotoJPEG


        Input attributes preserved in output:

        - Aspect Ratio and resolution

        - Frame Rate

        - Audio if present


        Limits:

        - Max input duration: 60 seconds

        - Resolutions: Input resolution up to 16000x16000 (16K). Inputs larger
        than this return 413 Payload Too Large. Output resolution matches the
        input resolution.


        Background and transparency control:

        - `background_color` must be one of the predefined string values listed
        below. Hex values are not supported. Default is `Transparent`.

        - If `background_color` is `Transparent`, the selected output preset
        must support alpha. Otherwise the server responds with 422 Unprocessable
        Entity.


        Output transparency support by preset:

        - Alpha supported: `webm_vp9`, `mov_proresks`, `mkv_vp9`, `mkv_raw`,
        `gif`, `mov_h265` when encoded as HEVC with Alpha

        - Alpha not supported: `mp4_h264`, `mp4_h265`, `mkv_h264`, `mkv_h265`,
        `avi_h264`
      operationId: remove-background
      parameters:
        - in: header
          name: api_token
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                video:
                  type: string
                  description: >-
                    Publicly accessible URL of the input video. Input resolution
                    supported up to 16000x16000 (16K)
                background_color:
                  type: string
                  description: >-
                    Predefined string only - one of the enum values below. Hex
                    values are not supported
                  default: Transparent
                  enum:
                    - Transparent
                    - Black
                    - White
                    - Gray
                    - Red
                    - Green
                    - Blue
                    - Yellow
                    - Cyan
                    - Magenta
                    - Orange
                output_container_and_codec:
                  type: string
                  description: Output container and codec preset
                  enum:
                    - mp4_h264
                    - mp4_h265
                    - webm_vp9
                    - mov_h265
                    - mov_proresks
                    - mkv_h264
                    - mkv_h265
                    - mkv_vp9
                    - gif
                  default: webm_vp9
              required:
                - video
            example:
              video: example
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncInitialResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: Unsupported input container or codec
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /foreground_mask:
    servers:
      - url: https://engine.prod.bria-api.com/v2/video/generate
    post:
      summary: Foreground Mask
      tags:
        - Endpoints
      description: >-
        Initiates an asynchronous foreground mask generation job for a video.


        Response behavior:

        - Returns HTTP 202 with `request_id` and `status_url`

        - Check job status by polling `status_url` or by calling the [Status
        Service](https://docs.bria.ai/status) with the `request_id` until a
        terminal status is returned


        Supported input containers:

        - .mp4, .mov, .webm, .avi, .gif


        Supported input codecs:

        - H.264, H.265 (HEVC), VP9, AV1, PhotoJPEG


        Input attributes preserved in output:

        - Aspect Ratio and resolution

        - Frame Rate

        - Audio if present


        Limits:

        - Max input duration: 60 seconds

        - Resolutions: Input resolution up to 16000x16000 (16K). Inputs larger
        than this return 413 Payload Too Large. Output resolution matches the
        input resolution.
      operationId: foreground-mask
      parameters:
        - in: header
          name: api_token
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                video:
                  type: string
                  description: >-
                    Publicly accessible URL of the input video. Input resolution
                    supported up to 16000x16000 (16K)
                output_container_and_codec:
                  type: string
                  description: Output container and codec preset
                  enum:
                    - mp4_h264
                    - mp4_h265
                    - webm_vp9
                    - mov_h265
                    - mov_proresks
                    - mkv_h264
                    - mkv_h265
                    - mkv_vp9
                    - gif
                  default: mp4_h264
              required:
                - video
            example:
              video: example
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncInitialResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: Unsupported input container or codec
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorObject:
      type: object
      properties:
        code:
          type: integer
          example: 123
        message:
          type: string
        details:
          type: string
      required:
        - code
        - message
        - details
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
        request_id:
          type: string
      required:
        - error
        - request_id
    AsyncInitialResponse:
      type: object
      properties:
        request_id:
          type: string
        status_url:
          type: string
      required:
        - request_id
        - status_url
