fb-pixel

API Token

Create a new token

Watermark Removal

Asynchronous Method (Recommended for large images or batch processing)

POST https://backend.kaze.ai/api/ext/v1/submit_watermark_removal

Header parameters:

  • Authorization: Bearer <>
  • Content-Type: application/json

Request Body (using URL):

Using Image URL

  • image_url: https://example.com/image.png
Example request:
curl --location --request POST 'https://backend.kaze.ai/api/ext/v1/submit_watermark_removal' \
  --header 'Authorization: Bearer ' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "image_url": "https://example.com/image.png"
  }'

Request Body (using raw content):

Using Base64 (without data:image/png;base64, header):

  • image_base64: xxxxxxxxxxxxxxx
Example request:
curl --location --request POST 'https://backend.kaze.ai/api/ext/v1/submit_watermark_removal' \
  --header 'Authorization: Bearer ' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "image_base64": "xxxxxxxxxxxxxxx"
  }'

Request Body (with smear):

To ensure accurate watermark removal, please follow these guidelines when creating your smear mask:

  • Your smear mask should be a new image with the same size as the original.
  • Use any color except pure black or pure white to draw the smear brush strokes (areas to be edited).
  • All other areas in the image should be either pure black or pure white — these regions will be left unchanged.

"smear_url": "https://example.com/smear.png"

or

"smear_base64": "xxxxxx"

smear_mask_origin

Image to remove watermark

smear_mask

Smear image

Example request:
curl --location --request POST 'https://backend.kaze.ai/api/ext/v1/submit_watermark_removal' \
  --header 'Authorization: Bearer ' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "image_base64": "xxxxxxxxxxxxxxxxx",
      "smear_url": "https://example.com/smear.png"
  }'

Response (on success):

After a successful submission, a task_id will be given and can be used with the result query API to retrieve the final result.

Example request:
{
  "code": 0,
  "message": "success",
  "data": {
    "task_id": "xxxxxxxx"
  }
}

Task Result Query

Use this method to get watermark removal task results by using task_id

POST https://backend.kaze.ai/api/ext/v1/get_task_result

Header parameters:

  • Authorization: Bearer <>
  • Content-Type: application/json

Request Body:

  • task_id: " aaabbbccc "
Example request:
curl --location --request POST 'https://backend.kaze.ai/api/ext/v1/get_task_result' \
  --header 'Authorization: Bearer ' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "task_id": "aaabbbccc"
  }'

Response Status:

The response includes data.status, which may be:

  • processing: In progress, check again later.
  • success: Completed, result is in images.
  • failed: Failed, check err_msg.
  • timeout: Timed out, same as failed.
Example response:
{
  "message": "success",
  "data": {
    "status": "processing/success/failed/timeout",
    "images": [
      {
        "url": "https://example.com/image.png"
      }
    ]
  }
}

Status Codes

CODEDESCRIPTION
0Success
1000Parameter Error
1001Invalid HTTP Method
1002Authentication error
1003Insufficient Credits to Perform the Action
11xxServer Internal Error