Skip to content

Clean up an image

POST
/api/ai/cleanup
curl --request POST \
--url https://example.com/api/ai/cleanup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form image=@file \
--form mask=@file

Removes masked regions from an image using the ClipDrop cleanup API. Send multipart/form-data with ‘image’ and ‘mask’ files; returns the cleaned PNG.

Media typemultipart/form-data
object
image

Source image

string format: binary
mask

Mask image marking regions to clean

string format: binary

Cleaned image

Media typeimage/png
string format: binary

Missing image or mask file

Server or ClipDrop API error