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

# Image Eraser

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.

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

## Request Headers

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

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

## Request Body

<ParamField body="mask" type="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.
</ParamField>

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

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

<ParamField body="output_format" type="string" default="jpeg">
  The format of the output image.

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

## Response Information

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