Generate Segmentation Mask
sdnext_maskGenerate a segmentation mask for an image, automatically creating one when none is provided. Specify mask type and model to return the desired mask.
Instructions
Generate a segmentation mask for an image (SD.Next /sdapi/v1/mask). Auto-masks when no mask is given. Mask models/types from sdnext_list_masking.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mask | No | Optional existing mask image (base64); omitted = auto-masking. | |
| type | Yes | Mask type to return (e.g. "original", "mask", "colormap"). | |
| image | Yes | Base64-encoded image (raw base64, data: URL, or "upload:<id>" ref). | |
| model | No | Segmentation model name (from sdnext_list_masking). | |
| params | No | Masking settings (colormap, thresholds, ...). |