Remove Watermark

Automatically identify and remove watermarks, logos, or other unwanted overlay elements from an image, or remove specified areas directly.

Create Task

Basic Information

ItemValue
Request MethodPOST
Request Path/task/image_purify
Content-Typeapplication/json
AuthenticationRaw API key in the Authorization header

Request Body

ParameterTypeRequiredDefaultDescription
file_idstringYes-Uploaded image file ID
purify_scopestringNo"full_screen"Cleanup scope: full_screen (identify and remove automatically) / region (remove the boxes given by regions directly)
regionsarrayRequired when region-Areas to remove directly, 1–16 boxes, each {"x","y","w","h"} as 0-1 frame ratios, with w>0, h>0, x+w≤1, y+h≤1

Request Example

curl -X POST https://api.ai-mcn.tv:10000/task/image_purify \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id": "537489015178246"}'

region mode example (remove the logo in the top-left corner):

curl -X POST https://api.ai-mcn.tv:10000/task/image_purify \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_id": "537489015178246",
    "purify_scope": "region",
    "regions": [{"x": 0.02, "y": 0.02, "w": 0.15, "h": 0.08}]
  }'

region mode does no recognition — everything inside the box is processed, including the main subject. Use it for dark logos or graphic stickers that cannot be recognized; smaller boxes that fit the element tightly give better results.

Success Example

{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "537489015178247",
    "task_type": "image_purify",
    "status": "queued"
  }
}

Query Task Result

Basic Information

ItemValue
Request MethodGET
Request Path/task/image_purify/{task_id}
AuthenticationRaw API key in the Authorization header

Output Result (output_result)

ParameterTypeDescription
file_idstringProcessed image file ID

Success Example

{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "537489015178247",
    "status": "completed",
    "progress": 100,
    "output_result": {
      "file_id": "537489015178248"
    },
    "create_time": "2026-04-05T08:00:00Z",
    "update_time": "2026-04-05T08:00:08Z"
  }
}

Error Codes

Error CodeHTTP StatusDescriptionResolution
6013400Missing file_idPass the file_id field
6016400Invalid purify_scope, or missing or invalid regions in region mode (empty, more than 16 boxes, or out-of-range coordinates)Check purify_scope / regions
6014400File type does not match the taskUpload an image file
6004404File not foundVerify the file_id
6502401Authentication failedCheck the Authorization header
6202402Insufficient balanceRecharge in the Dashboard