Skip to main content
POST
/
v3
/
async
/
image-eraser
Image Eraser
curl --request POST \
  --url https://api.myrouter.ai/v3/async/image-eraser \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "mask": "<string>",
  "image": "<string>",
  "prompt": "<string>",
  "output_format": "<string>"
}
'
{
  "task_id": "<string>"
}
This is an async API that only returns the async task_id. Use the task_id to call the Get Async Task Result API to retrieve the image erasing result.
This is an async API that only returns the task_id of the async task. Use the task_id to call the Get Async Task Result API to retrieve the generated result.

Request Headers

Content-Type
string
required
Enum: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

mask
string
Mask image indicating the area to erase. Areas to erase should be white; areas to keep should be black.
image
string
required
The original image to process.
prompt
string
Text prompt specifying the object or area to remove from the image. For example: ‘dog’ or ‘hat’.
output_format
string
default:"jpeg"
Output image format.Possible values: jpeg, png, webp

Response

task_id
string
required
Use the task_id to call the Get Async Task Result API to retrieve the generated output.