A powerful OOMOL package for removing backgrounds from images using the BRIA AI background removal API. This package provides both URL-based and file-based workflows to seamlessly integrate background removal into your image processing pipelines.
- Remove backgrounds from images via URL
- Remove backgrounds from local image files
- Automatic cloud upload and download
- Configurable polling for job completion
- Easy-to-use subflow blocks
This package includes two main subflows for different use cases:
Remove background from an image URL and return the processed image URL.
Inputs:
imageURL(string, required): URL of the image to remove background frommax_retries(number, optional): Maximum number of polling attempts (default: 30)retry_interval(number, optional): Interval between polling attempts in seconds (default: 2)
Outputs:
result_url(string): URL of the processed image with background removed
Use Case: Perfect for processing web-hosted images or when you want to keep images in the cloud.
Remove background from a local image file and save the processed result.
Inputs:
image_file(file, required): Local image file to processsaved_path(string, optional): Path to save the processed imagemax_retries(number, optional): Maximum number of polling attempts (default: 30)retry_interval(number, optional): Interval between polling attempts in seconds (default: 2)
Outputs:
saved_path(string): Path of the successfully downloaded processed image
Use Case: Ideal for batch processing local images or integrating background removal into file-based workflows.
- Add the
url-image-background-removalsubflow to your workflow - Connect an image URL to the
imageURLinput - The processed image URL will be available in the
result_urloutput
- Add the
file-image-background-removalsubflow to your workflow - Select a local image file using the
image_fileinput - Optionally specify where to save the result in
saved_path - The processed image will be saved and its path returned in the output
This package includes two core task blocks (marked as private for internal use):
Submits an image to the background removal API and returns a request ID for tracking the job status.
Polls the background removal API to retrieve the processed image URL once the job is complete.
This package requires the following OOMOL packages:
upload-to-cloud(v0.0.5): For uploading local files to cloud storagedownloader(v0.1.1): For downloading processed images
This package can be installed through the OOMOL package manager:
# Install the package
oomol install bria-removebg
# Add to your workspace dependencies
oomol use bria-removebgThe background removal service uses the OOMOL Fusion API. No additional API key configuration is required - the package automatically uses your OOMOL token for authentication.
Both subflows follow a similar pattern:
- Submit Phase: Submit the image (URL or uploaded file) to the BRIA API
- Poll Phase: Continuously check the job status until completion
- Retrieve Phase: Return or download the processed image
The polling system includes:
- Configurable retry attempts to handle long processing times
- Adjustable retry intervals to balance responsiveness and API load
- Automatic error handling and status reporting
The package integrates with the BRIA AI background removal API through OOMOL's Fusion API endpoint:
- Base URL:
https://fusion-api.oomol.com/v1 - Authentication: Automatic via OOMOL token
- Endpoints:
/image/background-removalfor submission and result retrieval
The package includes robust error handling:
- Connection failures are reported with clear error messages
- Timeout scenarios are handled gracefully
- Job status is tracked and reported throughout the process
Current version: 0.0.1
This package is provided as part of the OOMOL ecosystem.