# Get Masks * The is used to generate all possible masks for an image, creating a full segmentation of the image. The response contains a zip file named as the visual_id of the provided image. There are k mask files in the zip, each named with the visual_id and mask_id. The zip file contains an additional file whose name ends with "panoptic". It's not an image, it's a panoptic map. It can be transformed into a regular matrix. Each point in the image (x,y) is mapped to the mask that applies to that point. In the panoptic map, each pixel's grayscale value includes the mask_id. You can display those masks to the user, let them pick one or more masks, and use objects/remove route to remove the masked area. In order to use the objects/remove route on the mask the user selected, you should provide the mask_id, and use the parameter mask_source=generated. You can see below an example of the content of the zip: 92bf8ce17584de82_panoptic.png 92bf8ce17584de82_1.png 92bf8ce17584de82_2.png 92bf8ce17584de82_3.png ... 92bf8ce17584de82_86.png You can access the SDK that demonstrates how to use this endpoint in a UI in the following link. This API endpoint supports content moderation via an optional parameter that can prevent processing if input images contain inappropriate content - the first blocked input image will fail the entire request. Endpoint: POST /objects/mask_generator ## Header parameters: - `api_token` (string, required) ## Request fields (application/json): - `image_url` (string) The URL of the input image. If both image_url and image_file are provided, image_url will be used. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. - `file` (string) The file of the input image, in base64 format. Used if image_url is not provided. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. - `sync` (boolean) Determines the response mode. When true, responses are synchronous. With false, responses are asynchronous, immediately providing URLs for images that are generated in the background. Use polling for the URLs to retrieve images once ready. - `content_moderation` (boolean) When enabled, applies content moderation to input visuals. For input images: - Processing stops at the first image that fails moderation - Returns a 422 error with details about which parameter failed ## Response 200 fields (application/json): - `objects_masks` (string) Example: "https://bria-image-repository.s3.amazonaws.com/mask2click/masks/92bf8ce17584de82.zip?AWSAccessKeyId=AKIAUL5JH7ABJXXBAV6D&Signature=vCX%2BHEAnGmUolwLxKfPBBKPUZaM%3D&Expires=1690732111"