Bria Eraser

48 credits/call
ae_bria_eraser

Remove selected objects or areas from an image using a mask.

Image
48 credits/call

Pricing

48 credits/call
ConditionCharge
Each call48 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYesNo parameter description.—
request_body.mask_urlstringYesThe URL of the binary mask image that represents the area that will be cleaned.—
request_body.image_urlstringYesInput Image to erase from—
request_body.mask_typeenum (manual | automatic)NoYou can use this parameter to specify the type of the input mask from the list. 'manual' opttion should be used in cases in which the mask had been generated by a user (e.g. with a brush tool), and 'automatic' mask type should be used when mask had been generated by an algorithm like 'SAM'.manual
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.preserve_alphabooleanNo If set to true, attempts to preserve the alpha channel of the input image. false

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key

Submit first, then query with the returned task_id until the task completes.

Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_bria_eraser' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "image_url": "https://h.uguu.se/BGecHGgN.jpg",
      "mask_type": "manual",
      "mask_url": "https://d.uguu.se/pssvZASf.png"
    }
  }
}'
Response exampleresponse.json
JSON
{
  "description": "task accepted; poll the result via query_tool with this task_id",
  "query_tool": "ae_get_result",
  "status": "created",
  "task_id": "695ad7ee-5a04-4aef-9604-69ff1688deac"
}