v1
latestOpenAPI 3.0.02026-08-062312216.0 KBv2 endpoints
Erase Foreground
Try out this capability in Bria's sandbox
Description
The Erase Foreground endpoint removes the primary subject (foreground) from the input image and intelligently generates the background to fill the erased area.
Output Characteristics
- Returns the edited image at its original resolution, ensuring full visual fidelity without any automatic resizing or downscaling.
- Only the foreground is removed; all other areas remain unaltered, preserving pixel-perfect accuracy in untouched regions.
- When preserve_alpha=true and the input image includes an alpha channel, the output maintains original transparency values (both full and partial).
Content Moderation
This endpoint includes granular content moderation controls to ensure safe usage across all stages of processing:
- Input Image Moderation – Scans the uploaded image and stops processing if inappropriate or restricted content is detected.
- Output Image Moderation – Evaluates the generated image and blocks the response if it violates safety guidelines.
post/erase_foreground
Headers
api_tokenstring required
Request body
Example request
{
"image": "example"
}Response
Successful operation (Synchronous Success)