> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myrouter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Image Eraser

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.

<Tip>
  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](/docs/models/reference-get-async-task-result) to retrieve the generated result.
</Tip>

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="mask" type="string">
  Mask image indicating the area to erase. Areas to erase should be white; areas to keep should be black.
</ParamField>

<ParamField body="image" type="string" required={true}>
  The original image to process.
</ParamField>

<ParamField body="prompt" type="string">
  Text prompt specifying the object or area to remove from the image. For example: 'dog' or 'hat'.
</ParamField>

<ParamField body="output_format" type="string" default="jpeg">
  Output image format.

  Possible values: `jpeg`, `png`, `webp`
</ParamField>

## Response

<ResponseField name="task_id" type="string" required={true}>
  Use the task\_id to call the [Get Async Task Result API](/docs/models/reference-get-async-task-result) to retrieve the generated output.
</ResponseField>
