{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-expand-image-request-v3-schema.json",
  "title": "Images expand payload",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-firefly-openapi.yml#/components/schemas/ExpandImageRequestV3",
  "properties": {
    "image": {
      "$ref": "#/$defs/InputImageV3",
      "description": "The image to expand. Use a URL or an <code>uploadID</code> as the source for the image. Firefly only allows these listed domains for input URLs in the request: <ul> <li><code>amazonaws.com</code></li> <li><code>windows.net</code></li> <li><code>dropboxusercontent.com</code></li> <li><code>storage.googleapis.com</code></li> </ul>."
    },
    "mask": {
      "$ref": "#/$defs/InputMaskV3",
      "description": "Mask image which will be used to expand the given image."
    },
    "numVariations": {
      "description": "Generate this number of variations. <code>numVariations</code> defaults to the number of seed images, or to 1 if you do not specify seeds.",
      "maximum": 4,
      "minimum": 1,
      "title": "The number of variations to generate",
      "type": "integer"
    },
    "placement": {
      "$ref": "#/$defs/Placement",
      "description": "The position of the source image after Firefly resizes it. The value describes the horizontal and vertical placement and dimensions of the image in the output. Note you cannot use placement for source images when you also apply a mask image."
    },
    "prompt": {
      "description": "An optional text prompt up to 1024 characters. The longer the prompt the better Firefly performs.",
      "maxLength": 1024,
      "minLength": 1,
      "title": "The prompt",
      "type": "string"
    },
    "seeds": {
      "description": "Array of seed image IDs. These reference images help ensure consistent image generation across multiple API calls. For example, you can use the same seed to generate a similar image with different styles. If specified along with <code>numVariations</code>, the number of seeds must equal <code>numVariations</code>.",
      "items": {
        "type": "integer"
      },
      "maxItems": 4,
      "minItems": 1,
      "title": "The seed image for each variation",
      "type": "array",
      "uniqueItems": true
    },
    "size": {
      "allOf": [
        {
          "$ref": "#/$defs/Size"
        }
      ],
      "default": {
        "height": 2048,
        "width": 2048
      },
      "description": "The desired width and height for the final expanded image in pixels. The maximum size for the output images is 3999px by 3999px.",
      "title": "The size"
    }
  },
  "required": [
    "image"
  ],
  "type": "object",
  "$defs": {
    "AlignmentHorizontal": {
      "description": "An enumeration.",
      "enum": [
        "center",
        "left",
        "right"
      ],
      "title": "AlignmentHorizontal"
    },
    "AlignmentVertical": {
      "description": "An enumeration.",
      "enum": [
        "center",
        "top",
        "bottom"
      ],
      "title": "AlignmentVertical"
    },
    "InputImageV3": {
      "properties": {
        "mask": {
          "allOf": [
            {
              "$ref": "#/$defs/PublicBinaryInputV3"
            }
          ],
          "deprecated": true,
          "description": "This is a deprecated property. Use <code>mask</code> instead.",
          "title": "Deprecated mask image"
        },
        "source": {
          "$ref": "#/$defs/PublicBinaryInputV3",
          "description": "Source image that Firefly expands, fills, or uses to generate similar images."
        }
      },
      "required": [
        "source"
      ],
      "title": "InputImageV3",
      "type": "object"
    },
    "InputMaskV3": {
      "properties": {
        "invert": {
          "description": "Invert mask is an optional boolen property, use <code>true</code> if you want take an image mask, invert it and apply it.",
          "title": "Invert mask",
          "type": "boolean"
        },
        "source": {
          "$ref": "#/$defs/PublicBinaryInputV3"
        }
      },
      "required": [
        "source"
      ],
      "title": "InputMaskV3",
      "type": "object"
    },
    "Placement": {
      "properties": {
        "alignment": {
          "allOf": [
            {
              "$ref": "#/$defs/PlacementAlignment"
            }
          ],
          "description": "Specify horizontal and vertical alignment. Possible values for horizontal=(center|left|right) and for vertical=(center|top|bottom).",
          "title": "Alignment"
        },
        "inset": {
          "allOf": [
            {
              "$ref": "#/$defs/PlacementInset"
            }
          ],
          "description": "Margin values in target size.",
          "title": "Margin values in target size"
        }
      },
      "title": "Placement",
      "type": "object"
    },
    "PlacementAlignment": {
      "properties": {
        "horizontal": {
          "allOf": [
            {
              "$ref": "#/$defs/AlignmentHorizontal"
            }
          ],
          "default": "center"
        },
        "vertical": {
          "allOf": [
            {
              "$ref": "#/$defs/AlignmentVertical"
            }
          ],
          "default": "center"
        }
      },
      "title": "PlacementAlignment",
      "type": "object"
    },
    "PlacementInset": {
      "properties": {
        "bottom": {
          "description": "The space between bottom edge of the result image and bottom edge of the placed object image.",
          "title": "Bottom Inset",
          "type": "integer"
        },
        "left": {
          "description": "The space between left edge of the result image and left edge of the placed object image.",
          "title": "Left Inset",
          "type": "integer"
        },
        "right": {
          "description": "The space between right edge of the result image and right edge of the placed object image.",
          "title": "Right Inset",
          "type": "integer"
        },
        "top": {
          "description": "The space between top edge of the result image and top edge of the placed object image.",
          "title": "Top Inset",
          "type": "integer"
        }
      },
      "title": "PlacementInset",
      "type": "object"
    },
    "PublicBinaryInputV3": {
      "properties": {
        "uploadId": {
          "description": "The `uploadId` from the storage API response.",
          "format": "uuid4",
          "title": "The upload ID",
          "type": "string"
        },
        "url": {
          "description": "The pre-signed URL of an uploaded file. Use a URL or an `uploadID` as the source for the image. Firefly only allows these listed domains in the request: <ul> <li><code>amazonaws.com</code></li> <li><code>windows.net</code></li> <li><code>dropboxusercontent.com</code></li> <li><code>storage.googleapis.com</code></li> </ul>.",
          "format": "uri",
          "maxLength": 2083,
          "minLength": 1,
          "title": "The pre-signed URL",
          "type": "string"
        }
      },
      "title": "PublicBinaryInputV3",
      "type": "object"
    },
    "Size": {
      "properties": {
        "height": {
          "maximum": 4096,
          "minimum": 1,
          "type": "integer"
        },
        "width": {
          "maximum": 4096,
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "width",
        "height"
      ],
      "type": "object"
    }
  }
}