# Masking Endpoints Tools for generating segmentation masks ## Generate Mask by Prompt - [POST /mask_by_prompt](https://docs.bria.ai/video-editing/masking-endpoints/mask-by-prompt.md): 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 Service) will contain a mask_url. Constraints: - Max Duration: 5 seconds (Truncated if auto_trim=true). - Max Resolution: 750p. ## Generate Mask by Key Points - [POST /mask_by_key_points](https://docs.bria.ai/video-editing/masking-endpoints/mask-by-key-points.md): Generates a segmentation mask video based on coordinate key points. Response behavior: - Returns HTTP 202 with request_id and status_url - The final result (via Status Service) will contain a mask_url. Constraints: - Max Duration: 5 seconds (Truncated if auto_trim=true). - Max Resolution: 750p. ## Foreground Mask - [POST /foreground_mask](https://docs.bria.ai/video-editing/masking-endpoints/foreground-mask.md): 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 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.