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


    The first feature, Background Removal, enables developers to seamlessly
    remove backgrounds from videos while preserving the source video's
    resolution and framerate. The API supports a wide range of common video
    formats including MP4, AVI, MOV, GIF, and WEBM, offering builders
    flexibility for various video processing implementations.


    Processing is asynchronous, meaning the API returns a video URL immediately,
    but results are available only after processing is complete. A 10-second
    video typically takes ~5 minutes, with longer videos scaling proportionally.
externalDocs:
  description: Register and get API Access
  url: https://platform.bria.ai/console/account/api-keys
servers:
  - url: https://engine.prod.bria-api.com/v1
paths:
  /video/background/remove:
    post:
      summary: Remove Background from Video
      tags:
        - Endpoints
      description: >
        **Description**


        This endpoint allows users to remove the background from videos. It
        supports various video file formats and retains the original video's
        framerate and resolution in the output.


        **Supported Inputs**:

        - File types: `mp4`, `avi`, `mov`, `gif`, `webm`

        - Framerate: All framerates are supported; the original video's
        framerate is preserved in the output.

        - Resolutions: No limit; the output resolution matches the input
        resolution.


        **Output**: - File type: `webm`

        - Framerate: Matches the original video.

        - Resolution: Matches the original video.
      operationId: remove-video-background
      parameters:
        - in: header
          name: api_token
          schema:
            type: string
          required: true
          description: API token associated with the organization.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                video_url:
                  type: string
                  description: >-
                    A publicly accessible URL of the video to process. The input
                    video time limit is up to 1 minute.
            example:
              video_url: https://example.com/input_video.mp4
      responses:
        '200':
          description: Background successfully removed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result_url:
                    type: string
                    description: URL of the video with the background removed.
              example:
                result_url: https://example.com/processed_video.webm
        '400':
          description: Bad request. Invalid input parameters.
        '415':
          description: >-
            Unsupported Media Type. Invalid file type. Supported file types are
            `mp4`, `avi`, `mov`, `gif`, `webm`.
        '422':
          description: >-
            Unprocessable Entity. The URL does not point to a valid video or is
            inaccessible.
        '429':
          description: >-
            Request limit exceeded. Your account has reached its maximum allowed
            requests. Please upgrade your plan or try again later.
        '500':
          description: Internal server error.
components: {}
