Checks a mask against its source image. Returns an overlay for visual review plus a pass/fail verdict. Can ▎ pass the mask through instead of the overlay
One POST request. Get the result back directly — as an image, video, or JSON depending on the tool.
curl -X POST https://apiai.me/api/workflow/mask-checker \
-H "X-API-Key: YOUR_API_KEY" \
-F "image=@input.jpg" \
-F "overlay color=#ff00ff" \
-F "image_mask=@image.jpg" \
-F "max_drift_px=5" \
-F "overlay opacity=0.5" \
-F "output_mode=report"
--output result.png
Test this tool visually before writing any code. Upload an image, set parameters, and see the result live. When it looks right, copy the auto-generated curl command and paste it into your app.
Process hundreds of images at once without writing a loop. Upload a CSV with one row per item, set your parameters, and download the results as a ZIP when they're done.
| Name | Required | Description | Default / Options |
|---|---|---|---|
overlay color |
optional | Overlay color as hex. Magenta works on most photos. | #ff00ff
|
image_mask |
required | The mask to check (white = inside the object). | — |
max_drift_px |
optional | How far the mask edge is allowed to wander from the real shape, in pixels. Lower = stricter. 5 px works for most product photos. | 5
|
overlay opacity |
optional | How transparent the overlay is, 0–1. 0.5 lets you see both the mask area and the photo underneath. | 0.5
|
output_mode |
optional | What to send back: 'overlay' (mask on photo, for review), 'mask' (input mask passed through, for the next step), 'report' (overlay + a banner showing PASS/FAIL and drift, for quick testing), or 'zip' (everything plus a JSON report). | overlaymaskzipreport
|
Get an API key, test Mask Checker in the dashboard, and copy the curl command.