Masking

Generate Mask by Prompt

Changed on

Generates a segmentation mask video based on a text prompt.

Response behavior:

  • Returns HTTP 202 with request_id and status_url
  • The final result (via status endpoint) will contain a mask_url.

Constraints:

  • Max Duration: 5 seconds (Truncated if auto_trim=true).
  • Max Resolution: 750p.
post/mask_by_prompt

Request

  • Base URL: https://engine.prod.bria-api.com/v2/video/segment
  • URL: https://engine.prod.bria-api.com/v2/video/segment/mask_by_prompt
  • Auth: API key in header api_token

Request body

videostring required

Publicly accessible URL for the input video file.

promptstring required

The text instruction describing the object to be masked.

auto_trimboolean

If true, trims the video to the 5s limit.

output_container_and_codec'mp4_h264' | 'mp4_h265' | 'webm_vp9' | 'mov_h265' | 'mov_proresks' | 'mkv_h264' | 'mkv_h265' | 'mkv_vp9' | 'gif'
webhook_urlstring uri

Optional URL for receiving the result via webhook when the async job completes. See webhooks.

Response

Accepted

request_idstring required
status_urlstring required

Changes

    • warning

      deleted the header request parameter api_token

    • info

      api tag Masking added

    • info

      api tag Masking Endpoints removed