Skip to main content
POST
/
v3
/
async
/
image-eraser
Image Eraser
curl --request POST \
  --url https://api.highwayapi.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 asynchronous API and only returns an asynchronous task_id. You need to use the task_id to call the task result query API to retrieve the image erasing result.
This is an asynchronous API and will only return the task_id of the asynchronous task. You should use this task_id to request the Get Task Result API to retrieve the generated result.

Request Headers

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

Request Body

mask
string
The mask image used to indicate the area to erase. The area to erase should be white, and the area to keep should be black.
image
string
required
The original image to generate the image from.
prompt
string
A text prompt used to specify the object or area to remove from the image. For example: ‘dog’ or ‘hat’.
output_format
string
default:"jpeg"
The format of the output image.Optional values: jpeg, png, webp

Response Information

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