🔌API & Integration
⬇️ Image Download Endpoint
11 min
the image download endpoint allows you to retrieve the final masked image associated with a completed job ⚠️ important the masked image can be downloaded only once after the first successful download, the file is permanently deleted from our temporary storage ⏳ additionally, files that are not downloaded within one hour of completion will be automatically deleted 📥 only images whose status is readytodownload can be downloaded via this endpoint 📦 endpoint overview url get https //app maskit ai/api/v1/masking/image download authentication x api key header (required) response processed image as binary stream (e g image/jpeg or image/png) use case retrieving the masked image after a successful job 📝 query parameters parameter type required description jobid string ✅ the unique identifier of the submitted job 🔐 authentication include your api key in the request header x api key your api key 🔁 response success (200 ok) returns the image stream in the same file format as the original upload supported formats include jpeg , jpg , png , and webp the response includes appropriate headers content type image/jpeg , image/png , or image/webp content disposition attachment; filename="masked filename ext" error responses code description 400 missing job id or image is not ready 401 missing or invalid api key 404 job not found or does not belong to the authenticated user 500 internal server error ⚠️ single download & expiry policy to ensure privacy each masked image can be downloaded only once files that are not downloaded within one hour will be automatically deleted only jobs with status readytodownload can be retrieved if you miss the window or fail to save the image after downloading, you must reprocess the original image 🚀 example curl request curl x get "https //app maskit ai/api/v1/masking/image download?jobid=your job id" \\ h "x api key your api key" \\ oj this command downloads the final masked image and saves it as masked result jpg