Image Editing and Cropping

Mask CheckerAPI

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

Test in Dashboard View Docs ← All Tools

Three ways to use this tool

REST API

One POST request. Get the result back directly — as an image, video, or JSON depending on the tool.

terminal
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

Dashboard Playground

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.

  1. Open the dashboard → API Toolbox
  2. Find Mask Checker and click it
  3. Upload your input and adjust parameters
  4. Copy the curl command and ship
Open Dashboard →

Batch Processing

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.

  1. Open the dashboard → Batches
  2. Select Mask Checker
  3. Add your content and start the batch
  4. Download results ZIP when complete
Go to Batches →

Parameters

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

Ready to integrate?

Get an API key, test Mask Checker in the dashboard, and copy the curl command.

Get API Key Full API Reference