create_ai_mask
Create AI-powered masks in Lightroom Classic to isolate subjects, skies, backgrounds, or other elements for precise photo editing adjustments.
Instructions
Create an AI-powered mask on the active photo.
mask_type: subject, sky, background, person, object, depth, luminance, color operation: new (default), add, subtract, intersect
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mask_type | Yes | ||
| operation | No | new |
Implementation Reference
- The handler for the create_ai_mask tool, which calls the underlying "masks.create_ai_mask" service.
async def create_ai_mask( mask_type: str, operation: str = "new", ) -> dict[str, Any]: """Create an AI-powered mask on the active photo. mask_type: subject, sky, background, person, object, depth, luminance, color operation: new (default), add, subtract, intersect """ if not mask_type: raise ValueError("mask_type is required") return await _call("masks.create_ai_mask", { "mask_type": mask_type, "operation": operation, })