Bria AI Edit & Auto Download

Autonomously executes Bria AI operations, polls the status, and downloads the generated image

Replace Background

AI-generated

Summary

Replace the background of an input image using a text prompt, with optional mode selection, poll for generation completion, and return the resulting image binary and final data.

Inputs

  • imageUrl (required) — The URL of the image. Alternatively, you can pass a base64 encoded string.
  • instruction (required) — The text prompt, instruction, color, season, or style to apply.
  • mode — Control mode for the background replacement. Options: high_control (recommended), base, fast.
  • maxRetries — Maximum number of times to poll the status URL.
  • waitTime — Time to wait between polling attempts in milliseconds.

Output shape

Each input item produces one output item with json and binary fields.

The json field contains the final Bria AI response metadata. The binary field contains the generated image as a PNG binary buffer, retrieved via a pre-signed URL without authentication.

Examples

Example 1: Replace the background of a product photo with a 'golden hour studio lighting' prompt using high control mode.

Set imageUrl to the product image, instruction to 'golden hour studio lighting', mode to 'high_control'. The node polls for completion (default 30 retries, 3s wait) and returns the new image binary and response data.

Links

Discussion