{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-refine-mask-request-schema.json",
  "title": "RefineMaskRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-photoshop-openapi.yml#/components/schemas/RefineMaskRequest",
  "type": "object",
  "properties": {
    "image": {
      "description": "The input image.",
      "allOf": [
        {
          "$ref": "#/$defs/RefineMaskInputImage"
        }
      ]
    },
    "mask": {
      "description": "The mask in the input image that needs to be refined.",
      "allOf": [
        {
          "$ref": "#/$defs/RefineMaskInputImage"
        }
      ]
    },
    "colorDecontamination": {
      "type": "boolean",
      "description": "When `true`, this returns an RGBA image where the masked area has been further refined with color decontamination. A `false` value (default) means that the output will simply be the refined mask.",
      "default": false
    }
  },
  "required": [
    "image",
    "mask"
  ],
  "$defs": {
    "RefineMaskInputImage": {
      "type": "object",
      "properties": {
        "source": {
          "description": "The source of the input image. Dimensions of the image should not be greater than (4000px X 4000px).",
          "allOf": [
            {
              "$ref": "#/$defs/UrlResource"
            }
          ]
        }
      },
      "required": [
        "source"
      ]
    },
    "UrlResource": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "The URL of the resource. Only these listed domains are accepted in the request:  \n  <ul><li><code>amazonaws.com</code></li><li><code>windows.net</code></li><li><code>dropboxusercontent.com</code></li><li><code>assets.frame.io</code></li><li><code>storage.googleapis.com</code></li></ul>"
        }
      },
      "required": [
        "url"
      ]
    }
  }
}