Finegrain Eraser Mask

From 48 credits/call
ae_finegrain_eraser_mask

Remove unwanted parts of an image using a mask, then fill in the erased area with a natural-looking background.

Image
From 48 credits/call

Pricing

From 48 credits/call
Processing modeCharge
Express48 credits/call
Standard / Not specified156 credits/call
Premium264 credits/call

Starting price applies to Processing mode: Express.

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYesNo parameter description.—
request_body.modeenum (express | standard | premium)NoErase quality modestandard
request_body.seedinteger | unknownNoRandom seed for reproducible generation—
request_body.mask_urlstringYesURL of the mask image. Should be a binary mask where white (255) indicates areas to erase—
request_body.image_urlstringYesURL of the image to edit—

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_finegrain_eraser_mask' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "image_url": "https://agentearth.ai/fileserver/file/be619291-0ece-484a-bb22-b878ce378c8e.jpg",
      "mask_url": "https://agentearth.ai/fileserver/file/2b88cd54-88b8-41b0-bf28-838262b6d45c.png",
      "mode": "express"
    }
  }
}'
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": "f7e07f27-fe7e-46e3-a408-b6a4d3637a7f"
}