{
  "openapi": "3.1.1",
  "info": {
    "title": "Local Photo Adjustments with Masks (Gradient, Radial, Brush, Range) API",
    "version": "1.0.0",
    "summary": "Brighten, darken or recolor parts of a photo with gradient, radial, brush and range masks.",
    "description": "Every endpoint performs the same calculation as the human page and returns inputs, result, units, assumptions, sources, warnings and computedAt. MCP endpoint: /mcp."
  },
  "servers": [
    {
      "url": "https://luminalocaladjust.usefulweb.app"
    }
  ],
  "paths": {
    "/api/v1/calculate": {
      "post": {
        "operationId": "calculate",
        "summary": "Brighten, darken or recolor parts of a photo with gradient, radial, brush and range masks.",
        "description": "Upload a photo and describe up to eight local adjustments as JSON: each has exposure, contrast, highlights, shadows, temperature, tint, saturation, clarity and sharpness and is limited by up to eight masks (linear gradient, radial gradient, brush strokes, luminance range or color range) that add, subtract or intersect. Download the adjusted PNG or the grayscale mask of one adjustment. The Lumina photo editor stores the same JSON in its projects.\n\nMethodology:\n- Display-referred 8-bit sRGB after auto-orientation. Positions are fractions of the uploaded image (0–1, top-left origin); radii and brush sizes are fractions of its shorter side, so circles stay circles.\n- Each adjustment computes its fully adjusted version of the current result, then blends it in per pixel by mask coverage × amount. Adjustments run in list order; luminance and color ranges are measured on the uploaded image, before any local adjustment. Alpha is kept.\n- Linear: t = projection of the pixel centre onto start → end (0 at the start, 1 at the end), clamped and smoothed with smoothstep 3t² − 2t³. Radial: elliptical distance d (1 on the edge); full inside 1 − feather, smoothstep to 0 at the edge. Brush: strokes are capsules around the polyline rasterized on a grid of 1024 cells along the long side, feathered with smoothstep and composited with flow (erase multiplies by 1 − flow × coverage); sampled bilinearly.\n- Luminance: Rec. 709 luma of the encoded values in percent; full inside min to max, smoothstep falloff over the feather width. Color: OKLab distance × 100 to the chosen color; full up to the tolerance, smoothstep falloff over feather percent of the tolerance.\n- Combination: the first mask starts the coverage; add = maximum, subtract = coverage × (1 − mask), intersect = coverage × mask; invert uses 1 − mask first.\n- Settings reuse the Lumina Develop formula (exposure as 2^EV, contrast, highlight and shadow tone curve, temperature and tint offsets, saturation). Clarity adds the midtone-weighted difference between luma and a two-pass box blur of 1 percent of the shorter side; positive sharpness is the 3 × 3 edge-aware sharpen of Develop, negative sharpness blends toward a 3 × 3 box blur.",
        "tags": [
          "apps"
        ],
        "x-mcp-tool": "lumina_local_adjust",
        "x-owner-app": "lumina",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LuminaLocalAdjustInput"
              },
              "examples": {
                "example1": {
                  "summary": "Darken the sky with a gradient and warm the sun with a radial mask",
                  "value": {
                    "image": {
                      "filename": "landscape.png",
                      "contentType": "image/png",
                      "contentBase64": "iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAIAAAD6wG44AAAGHUlEQVR42u2cyW8bVRzHn/dlHLu2k9R2EifUrpuGgIqgFaoQJy5IXOiNE/8YCHEEIXFEqNADakUEXWjJ1jheYnu8je3xLPaMPRuHlgrUUux4Gyffz9Eav3h+n3x/780bjy3fPOAJOLvYDUNHFSAYzLFgA1VAggESDJBgAMEALRogwQAJRoIBEgyQYDBrwQSC0aIBWjRAggESDCAYoEUDJBgJBkNAOfoxn7i6wC95Om67Kqt2RqJKgr8s+jqKEwmeY5a80s2VUsgt//NFr0Ndd3Drfo4Qwsrue/Qq0/UgwfPW+qz6+7FyKtR+/WFBt/xJ4jjduvBrOabqViR4PnDZtVupY69DG/D4y6H2yoL4/VFCVm0QbP7sGrdSmcHtvujbn6Yy3x4kVN0y1U9L0KKH5OZqxetQT/FGr0O9uVL5pRBFgk28qqLkVOj0T3Olwvx+I8B03FhkmZQP47XRR/huPz5FwQQJHhSfQw15+iMOEvL0KUdfVOxIsOlY8XfHNc5hYwFzsOmIB7rjGueAoSDYdFyk5DGN05ta2dGih8DjGI8VyqlNrexI8BBIipVy6mMZBwk2I1XBkQj3xjIOEmxG8qxrLIKzrGuaCYbgQSm0HeMZh3WgRZsRTrY0OrZFShtlkGbXxskWQqbVovFkw1DcTlOfXRvpl8VuH1HTrDkSPOT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z077/FAtZJ5FJ57aXo6tu7wTubGha0pXFLhmnaFPOgI35XO0JG+sY+vn+T+7w7mx+VZoOTbijQ2DELXf6wgcy1RrxZymKjM8KQh+Bb5AcDVxNRBestkG/eF9w9B7siRybKtWblSK5jkXCH4d4chKdD3pC1x45Z6Jrmtyt8OzjUalJLBNc54CBA9EdCO5vLLuoXyqqkjPJ9RiT+6a/5ND8BnHihJAMIBgAMEAggEEAwgGEAzBAIIBBAMIBhAMIBhAMAQDCAYQDCAYQDCAYADBAIIhGEAwgGAAwQCCAQQDCIZgAMEAggEEAwgGo/IXdaOVG+uO37oAAAAASUVORK5CYII="
                    },
                    "adjustments": "[{\"name\":\"Darker sky\",\"settings\":{\"exposure\":-0.8,\"highlights\":-40,\"saturation\":20},\"masks\":[{\"type\":\"linear\",\"start\":[0.5,0.62],\"end\":[0.5,0.1]}]},{\"name\":\"Warm sun\",\"amount\":80,\"settings\":{\"temperature\":40,\"exposure\":0.3},\"masks\":[{\"type\":\"radial\",\"center\":[0.7,0.28],\"radiusX\":0.25,\"radiusY\":0.25,\"feather\":80}]}]"
                  }
                },
                "example2": {
                  "summary": "Brush over the hills, intersected with the dark tones",
                  "value": {
                    "image": {
                      "filename": "landscape.png",
                      "contentType": "image/png",
                      "contentBase64": "iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAIAAAD6wG44AAAGHUlEQVR42u2cyW8bVRzHn/dlHLu2k9R2EifUrpuGgIqgFaoQJy5IXOiNE/8YCHEEIXFEqNADakUEXWjJ1jheYnu8je3xLPaMPRuHlgrUUux4Gyffz9Eav3h+n3x/780bjy3fPOAJOLvYDUNHFSAYzLFgA1VAggESDJBgAMEALRogwQAJRoIBEgyQYDBrwQSC0aIBWjRAggESDCAYoEUDJBgJBkNAOfoxn7i6wC95Om67Kqt2RqJKgr8s+jqKEwmeY5a80s2VUsgt//NFr0Ndd3Drfo4Qwsrue/Qq0/UgwfPW+qz6+7FyKtR+/WFBt/xJ4jjduvBrOabqViR4PnDZtV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/39M+dQJNmSp02aq5fwRzzZMVYI6na/TeULIWvLNaDzpXfATMsfrMcPQe1JXYBtMpVinc5NdRWuqIrRbTDlfzqfNX5ri8V7xeI8Qkth+bzkWd7q9czOhaprUEbhWvU7nuWZ9spdJf29EVMq5p1JHmMcQZHbvZ3bve6iFjStvB5djdocZJ2lVUbpCm2Wq1WK2J3UmfpmkKj2ebdZLeaZ8cjZmL6kjHDy8RwgJLkVWE1v+0KLVOtM9E8Po92SRazVrdLWQmcZGh6HrUkdo1mg6+3SQCXxOYZkqy1QJIZF4IrqepBYCZFqbJoauy1JHYJuNSrFVL09po0PpyXyLqZVyz077/FAtZJ5FJ57aXo6tu7wTubGha0pXFLhmnaFPOgI35XO0JG+sY+vn+T+7w7mx+VZoOTbijQ2DELXf6wgcy1RrxZymKjM8KQh+Bb5AcDVxNRBestkG/eF9w9B7siRybKtWblSK5jkXCH4d4chKdD3pC1x45Z6Jrmtyt8OzjUalJLBNc54CBA9EdCO5vLLuoXyqqkjPJ9RiT+6a/5ND8BnHihJAMIBgAMEAggEEAwgGEAzBAIIBBAMIBhAMIBhAMAQDCAYQDCAYQDCAYADBAIIhGEAwgGAAwQCCAQQDCIZgAMEAggEEAwgGo/IXdaOVG+uO37oAAAAASUVORK5CYII="
                    },
                    "adjustments": "[{\"name\":\"Lift the hills\",\"settings\":{\"exposure\":1,\"shadows\":40,\"clarity\":30},\"masks\":[{\"type\":\"brush\",\"strokes\":[{\"size\":0.35,\"feather\":60,\"flow\":100,\"points\":[[0.05,0.85],[0.3,0.75],[0.6,0.82],[0.95,0.75]]}]},{\"type\":\"luminance\",\"mode\":\"intersect\",\"min\":0,\"max\":35,\"feather\":10}]}]"
                  }
                },
                "example3": {
                  "summary": "Mask of a color range minus a radial area",
                  "value": {
                    "image": {
                      "filename": "landscape.png",
                      "contentType": "image/png",
                      "contentBase64": "iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAIAAAD6wG44AAAGHUlEQVR42u2cyW8bVRzHn/dlHL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ObEBK+uLqxeS0YjlhtNmgzqWDDMCSRb9RKxeO9rsgN9d5mrdSslQghK29sriW2fIGwxQJ95lhkKf0e16pXCulaMTv6aHTukM4dEkIubb0bjSc91AIsvhykvizx7UajUphUgnVd7wpco1IoHO8q/d4k/kR2/0F2/4Hd6bq8fX0xGne63OdZqq7rclfkmvU6nWtUi5NKcF+W2s1q+STdqtFTmsv7vYOHdwkh/uDixpVrwaWIze44J1I1VemKHMtUqsWsyLUmNQfrmibyLFM+KaR3Z3i2PNt4svMTIWR5ZWM1seUPhi0W69mTqvRkkWebNbpyklaV/39M+dQJNmSp02aq5fwRzzZMVYI6na/TeULIWvLNaDzpXfATMsfrMcPQe1JXYBtMpVinc5NdRWuqIrRbTDlfzqfNX5ri8V7xeI8Qkth+bzkWd7q9czOhaprUEbhWvU7nuWZ9spdJf29EVMq5p1JHmMcQZHbvZ3bve6iFjStvB5djdocZJ2lVUbpCm2Wq1WK2J3UmfpmkKj2ebdZLeaZ8cjZmL6kjHDy8RwgJLkVWE1v+0KLVOtM9E8Po92SRazVrdLWQmcZGh6HrUkdo1mg6+3SQCXxOYZkqy1QJIZF4IrqepBYCZFqbJoauy1JHYJuNSrFVL09po0PpyXyLqZVyz077/FAtZJ5FJ57aXo6tu7wTubGha0pXFLhmnaFPOgI35XO0JG+sY+vn+T+7w7mx+VZoOTbijQ2DELXf6wgcy1RrxZymKjM8KQh+Bb5AcDVxNRBestkG/eF9w9B7siRybKtWblSK5jkXCH4d4chKdD3pC1x45Z6Jrmtyt8OzjUalJLBNc54CBA9EdCO5vLLuoXyqqkjPJ9RiT+6a/5ND8BnHihJAMIBgAMEAggEEAwgGEAzBAIIBBAMIBhAMIBhAMAQDCAYQDCAYQDCAYADBAIIhGEAwgGAAwQCCAQQDCIZgAMEAggEEAwgGo/IXdaOVG+uO37oAAAAASUVORK5CYII="
                    },
                    "adjustments": "[{\"name\":\"Bluer sky\",\"settings\":{\"saturation\":40,\"tint\":10},\"masks\":[{\"type\":\"color\",\"color\":\"#a2c6ea\",\"tolerance\":12,\"feather\":100},{\"type\":\"radial\",\"mode\":\"subtract\",\"center\":[0.7,0.28],\"radiusX\":0.12,\"radiusY\":0.12,\"feather\":30}]}]",
                    "output": "mask",
                    "maskOf": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LuminaLocalAdjustResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tool": {
      "get": {
        "operationId": "getToolDefinition",
        "summary": "Inputs, output schema and examples for this tool",
        "responses": {
          "200": {
            "description": "Tool definition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details. 422 responses include per-field `errors`.",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "LuminaLocalAdjustInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "image": {
            "title": "Image (PNG, JPEG or WebP; up to 8 MB and 16 MP)",
            "type": "object",
            "description": "Upload as {filename, contentType?, contentBase64}. Max 7813 KiB. Accepts .png,.jpg,.jpeg,.webp.",
            "additionalProperties": false,
            "required": [
              "filename",
              "contentBase64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "contentBase64": {
                "type": "string"
              }
            }
          },
          "adjustments": {
            "title": "Local adjustments (JSON list, an object with \"local\", or a Lumina project)",
            "description": "Settings: exposure −3 to 3, the others −100 to 100. Masks: linear (start, end), radial (center, radiusX, radiusY, angle, feather), brush (strokes with size, feather, flow, erase, points), luminance (min, max, feather) and color (color, tolerance, feather); mode add, subtract or intersect; invert.",
            "type": "string",
            "maxLength": 1000000,
            "default": "[{\"name\":\"Darker sky\",\"settings\":{\"exposure\":-0.8,\"highlights\":-40,\"saturation\":20},\"masks\":[{\"type\":\"linear\",\"start\":[0.5,0.62],\"end\":[0.5,0.1]}]},{\"name\":\"Warm sun\",\"amount\":80,\"settings\":{\"temperature\":40,\"exposure\":0.3},\"masks\":[{\"type\":\"radial\",\"center\":[0.7,0.28],\"radiusX\":0.25,\"radiusY\":0.25,\"feather\":80}]}]"
          },
          "output": {
            "title": "Download",
            "type": "string",
            "enum": [
              "photo",
              "mask"
            ],
            "default": "photo"
          },
          "maskOf": {
            "title": "Adjustment number for the mask download",
            "type": "number",
            "minimum": 1,
            "maximum": 8,
            "default": 1
          }
        },
        "required": [
          "image",
          "adjustments"
        ]
      },
      "LuminaLocalAdjustResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "width",
              "height",
              "artifact",
              "output",
              "adjustments",
              "report"
            ],
            "properties": {
              "width": {
                "type": "integer"
              },
              "height": {
                "type": "integer"
              },
              "artifact": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "output": {
                "enum": [
                  "photo",
                  "mask"
                ]
              },
              "adjustments": {
                "type": "array",
                "maxItems": 8,
                "description": "Local adjustments, applied in order after the global Develop settings and before text. Positions are fractions of the lens-corrected source photo (0–1, before crop, straighten, rotation and flips); lengths are fractions of its shorter side.",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 60
                    },
                    "enabled": {
                      "type": "boolean",
                      "default": true
                    },
                    "amount": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100,
                      "default": 100,
                      "description": "Strength of the whole adjustment in percent."
                    },
                    "settings": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "exposure": {
                          "type": "number",
                          "minimum": -3,
                          "maximum": 3,
                          "default": 0
                        },
                        "contrast": {
                          "type": "number",
                          "minimum": -100,
                          "maximum": 100,
                          "default": 0
                        },
                        "highlights": {
                          "type": "number",
                          "minimum": -100,
                          "maximum": 100,
                          "default": 0
                        },
                        "shadows": {
                          "type": "number",
                          "minimum": -100,
                          "maximum": 100,
                          "default": 0
                        },
                        "temperature": {
                          "type": "number",
                          "minimum": -100,
                          "maximum": 100,
                          "default": 0
                        },
                        "tint": {
                          "type": "number",
                          "minimum": -100,
                          "maximum": 100,
                          "default": 0
                        },
                        "saturation": {
                          "type": "number",
                          "minimum": -100,
                          "maximum": 100,
                          "default": 0
                        },
                        "clarity": {
                          "type": "number",
                          "minimum": -100,
                          "maximum": 100,
                          "default": 0
                        },
                        "sharpness": {
                          "type": "number",
                          "minimum": -100,
                          "maximum": 100,
                          "default": 0
                        }
                      }
                    },
                    "masks": {
                      "type": "array",
                      "maxItems": 8,
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "type"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "mode": {
                                "enum": [
                                  "add",
                                  "subtract",
                                  "intersect"
                                ],
                                "description": "How the mask combines with the masks above it: add = union (maximum), subtract = multiply by (1 − mask), intersect = multiply. The first mask starts the coverage."
                              },
                              "invert": {
                                "type": "boolean"
                              },
                              "type": {
                                "const": "linear"
                              },
                              "start": {
                                "type": "array",
                                "items": {
                                  "type": "number",
                                  "minimum": -1,
                                  "maximum": 2
                                },
                                "minItems": 2,
                                "maxItems": 2,
                                "description": "Where the effect starts (0 %)."
                              },
                              "end": {
                                "type": "array",
                                "items": {
                                  "type": "number",
                                  "minimum": -1,
                                  "maximum": 2
                                },
                                "minItems": 2,
                                "maxItems": 2,
                                "description": "Where the effect reaches 100 %."
                              }
                            }
                          },
                          {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "type"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "mode": {
                                "enum": [
                                  "add",
                                  "subtract",
                                  "intersect"
                                ],
                                "description": "How the mask combines with the masks above it: add = union (maximum), subtract = multiply by (1 − mask), intersect = multiply. The first mask starts the coverage."
                              },
                              "invert": {
                                "type": "boolean"
                              },
                              "type": {
                                "const": "radial"
                              },
                              "center": {
                                "type": "array",
                                "items": {
                                  "type": "number",
                                  "minimum": -1,
                                  "maximum": 2
                                },
                                "minItems": 2,
                                "maxItems": 2,
                                "description": "Ellipse centre."
                              },
                              "radiusX": {
                                "type": "number",
                                "minimum": 0.005,
                                "maximum": 3
                              },
                              "radiusY": {
                                "type": "number",
                                "minimum": 0.005,
                                "maximum": 3
                              },
                              "angle": {
                                "type": "number",
                                "minimum": -180,
                                "maximum": 180,
                                "description": "Degrees, clockwise."
                              },
                              "feather": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 100,
                                "description": "Soft edge in percent of the radius."
                              }
                            }
                          },
                          {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "type"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "mode": {
                                "enum": [
                                  "add",
                                  "subtract",
                                  "intersect"
                                ],
                                "description": "How the mask combines with the masks above it: add = union (maximum), subtract = multiply by (1 − mask), intersect = multiply. The first mask starts the coverage."
                              },
                              "invert": {
                                "type": "boolean"
                              },
                              "type": {
                                "const": "brush"
                              },
                              "strokes": {
                                "type": "array",
                                "maxItems": 200,
                                "items": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "required": [
                                    "points"
                                  ],
                                  "properties": {
                                    "erase": {
                                      "type": "boolean"
                                    },
                                    "size": {
                                      "type": "number",
                                      "minimum": 0.002,
                                      "maximum": 1,
                                      "description": "Brush diameter as a fraction of the shorter side."
                                    },
                                    "feather": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 100
                                    },
                                    "flow": {
                                      "type": "number",
                                      "minimum": 1,
                                      "maximum": 100
                                    },
                                    "points": {
                                      "type": "array",
                                      "minItems": 1,
                                      "maxItems": 2000,
                                      "items": {
                                        "type": "array",
                                        "items": {
                                          "type": "number",
                                          "minimum": -0.25,
                                          "maximum": 1.25
                                        },
                                        "minItems": 2,
                                        "maxItems": 2,
                                        "description": "Stroke point."
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "type"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "mode": {
                                "enum": [
                                  "add",
                                  "subtract",
                                  "intersect"
                                ],
                                "description": "How the mask combines with the masks above it: add = union (maximum), subtract = multiply by (1 − mask), intersect = multiply. The first mask starts the coverage."
                              },
                              "invert": {
                                "type": "boolean"
                              },
                              "type": {
                                "const": "luminance"
                              },
                              "min": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 100
                              },
                              "max": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 100
                              },
                              "feather": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 50,
                                "description": "Soft edge in luminance percent."
                              }
                            }
                          },
                          {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "type"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "mode": {
                                "enum": [
                                  "add",
                                  "subtract",
                                  "intersect"
                                ],
                                "description": "How the mask combines with the masks above it: add = union (maximum), subtract = multiply by (1 − mask), intersect = multiply. The first mask starts the coverage."
                              },
                              "invert": {
                                "type": "boolean"
                              },
                              "type": {
                                "const": "color"
                              },
                              "color": {
                                "type": "string",
                                "pattern": "^#[0-9a-fA-F]{6}$"
                              },
                              "tolerance": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 100,
                                "description": "OKLab distance × 100 that is fully selected."
                              },
                              "feather": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 100,
                                "description": "Soft edge in percent of the tolerance."
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              },
              "report": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}