πAPI & Integration
π Process Image Endpoint
9 min
the process image endpoint queues an uploaded image for asynchronous masking it applies anonymization to sensitive elements such as faces, people, or license plates based on your parameters, and returns a jobid that can be used to track the result this flow is optimized for robust integration into both synchronous and event driven pipelines you can poll for completion or enable webhook delivery for hands free operation π¦ endpoint overview url post https //app maskit ai/api/v1/masking/process image content type multipart/form data authentication x api key header (required) response json object containing the jobid use case asynchronous masking with polling or webhook callback π request parameters send the following fields as multipart/form data field type required default description image file β
β the image file to process (jpeg or png) faces boolean β true whether to detect and mask faces humans boolean β true whether to detect and mask full human bodies licenseplates boolean β true whether to detect and mask license plates shape string β mask shape used to mask areas mask (soft polygon) or rectangle (bounding box) method string β blur masking method blur or blackfill blurstrength int β 30 gaussian blur strength when method=blur edgeblursize double (0 0β1 0) β 0 2 softness applied to the edges of masked regions metadata string β β optional metadata string (e g user id, context) attached to the job usewebhook boolean β false if true , result is delivered via webhook once ready π authentication include your api key in the request header x api key your api key refer to the api key & webhook secret https //docs maskit ai/api key and webhook secret page to generate and manage your credentials π response { "jobid" "9f52f3d9 1c84 4b1d bf7c 2f0b9383fa17" } use the jobid with the image status https //docs maskit ai/image status endpoint endpoint to check processing progress once ready, retrieve the final masked image via the image download https //docs maskit ai/image download endpoint endpoint error responses code description 400 invalid or missing parameters 401 missing or invalid api key 500 server error while processing the image π webhook delivery if you set usewebhook=true , the final masked image will be delivered to your configured webhook url as a multipart/form data post request for full details, including hmac validation and payload structure, see the webhook documentation https //docs maskit ai/webhook π example curl request curl x post "https //app maskit ai/api/v1/masking/process image" \\ h "x api key your api key" \\ h "content type multipart/form data" \\ f "image=@example jpg" \\ f "faces=true" \\ f "humans=true" \\ f "licenseplates=true" \\ f "shape=mask" \\ f "method=blur" \\ f "blurstrength=30" \\ f "edgeblursize=0 2" \\ f "usewebhook=true" this command uploads an image for masking and enables webhook delivery once it's processed