Bria Background Replace

Usage-based pricing
ae_bria_background_replace

Replace an image's background with a new scene described in text or based on a reference image.

Image
Usage-based pricing

Pricing

The charge per call is (max(48 × Successfully generated images (images), 0)) AE credits. All applicable conditions are combined to calculate the total.

Billing is based on the number of images successfully generated, not the number requested. Queue waiting time is not charged.

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYesNo parameter description.—
request_body.fastbooleanNoWhether to use the fast modeltrue
request_body.seedinteger | unknownNo The same seed and the same prompt given to the same version of the model will output the same image every time. —
request_body.promptstring | unknownNoThe prompt you would like to use to generate images.—
request_body.image_urlstringYesInput Image to erase from—
request_body.sync_modebooleanNoIf `True`, the media will be returned as a data URI and the output data won't be available in the request history.false
request_body.num_imagesintegerNoNumber of Images to generate.1
request_body.ref_image_urlstringNoThe URL of the reference image to be used for generating the new background. Use "" to leave empty. Either ref_image_url or bg_prompt has to be provided but not both. If both ref_image_url and ref_image_file are provided, ref_image_url will be used. Accepted formats are jpeg, jpg, png, webp.""
request_body.refine_promptbooleanNoWhether to refine prompttrue
request_body.negative_promptstringNoThe negative prompt you would like to use to generate images.""

Invocation example

Parameter template

Generated from the parameter configuration. Replace the sample values before use.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_bria_background_replace' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "image_url": "https://storage.googleapis.com/falserverless/bria/bria_bg_replace_fg.jpg"
    }
  }
}'

No response example available yet.