$

Cost per second

For enterprise pricing and custom weights or models

Bria Erase Foreground – Image Editing Model

What is Bria Erase Foreground?

Bria Erase Foreground is a specialized generative AI endpoint designed to remove the primary subject (foreground) from any image and seamlessly regenerate the background at full resolution. Built for developers, creators, and product managers, this model delivers pixel-perfect accuracy in untouched regions and preserves transparency (alpha channel) when required. Whether you’re building an image editing app or automating bulk photo workflows, Bria Erase Foreground streamlines complex masking and inpainting tasks with a single API call.

Key Features

  • Precise Foreground Removal
    Automatically detects and removes the main subject, leaving behind a clean mask.
  • Seamless Background Regeneration
    Fills the removed area with context-aware content that matches original textures and tones.
  • Resolution & Transparency Preservation
    Maintains original image resolution and alpha channel (preserve_alpha=true) for layered graphics.
  • Content Moderation Options
    visual_input_content_moderation and visual_output_content_moderation flags help enforce safe-for-work outputs.
  • Flexible Input Formats
    Accepts image URLs or Base64-encoded strings for rapid prototyping and secure data handling.
  • High Throughput API
    Designed to handle batch requests programmatically, ideal for large-scale image pipelines.

Best Use Cases

  • E-Commerce Catalogs
    Remove unwanted objects or models and fill backgrounds consistently.
  • Marketing Assets
    Generate product cutouts on transparent or custom backgrounds in seconds.
  • Photo Restoration
    Erase blemishes or people from historical photos without losing context.
  • App & UI Design
    Automatically prepare foreground-less assets for mockups, slides, and presentations.
  • Social Media Filters
    Power next-gen “ghost” effects or dynamic backgrounds in mobile experiences.

Prompt Tips and Output Quality

  1. Provide a high-contrast image where the foreground subject is visually distinct from the background.
  2. Set preserve_alpha to true for transparent PNG outputs; set to false for fully opaque results.
  3. Use visual_input_content_moderation when handling user-generated content to pre-filter inappropriate images.
  4. For publicly shared outputs, enable visual_output_content_moderation to catch any unwanted artifacts.
  5. Test with varied lighting and textures—Bria’s inpainting excels in recreating natural gradients and fine details.

FAQs

Q: How do I remove a subject from an image via API?
A: Call the Erase Foreground endpoint with your image (URL or Base64) and optional flags (preserve_alpha, content moderation). The response returns a regenerated background preserving original dimensions.

Q: Can I keep the PNG transparency after removal?
A: Yes. Set preserve_alpha=true (default) to retain the alpha channel in your output.

Q: What image formats are supported?
A: You can supply JPEG, PNG, or WebP images via URL or Base64. The output matches your input format, including transparency when enabled.

Q: Is background regeneration consistent across different scenes?
A: Bria uses advanced context-aware inpainting, ensuring that lighting, texture, and perspective align with the original image.

Q: How do I ensure safe content?
A: Enable visual_input_content_moderation to filter incoming images and visual_output_content_moderation to review generated results before public display.