{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-actions-request-schema.json",
  "title": "ActionsRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-photoshop-v2-openapi.yml#/components/schemas/ActionsRequest",
  "type": "object",
  "properties": {
    "image": {
      "$ref": "#/$defs/ImageSource",
      "description": "The image input for the actions operation. Required."
    },
    "options": {
      "$ref": "#/$defs/ActionsOptions",
      "description": "Options configuration for the actions execution. At least one of actions or uxp is required."
    },
    "outputs": {
      "type": "array",
      "description": "List of output asset details. Required. Maximum of 25 outputs allowed.",
      "items": {
        "oneOf": [
          {
            "$ref": "#/$defs/JpegOutput"
          },
          {
            "$ref": "#/$defs/JsonOutput"
          },
          {
            "$ref": "#/$defs/PngOutput"
          },
          {
            "$ref": "#/$defs/PsdOutput"
          },
          {
            "$ref": "#/$defs/PsdcOutput"
          },
          {
            "$ref": "#/$defs/TiffOutput"
          }
        ]
      },
      "maxItems": 25,
      "minItems": 1
    }
  },
  "required": [
    "image",
    "options",
    "outputs"
  ],
  "$defs": {
    "ActionResource": {
      "type": "object",
      "description": "Single Photoshop action resource (.atn or inline actionJSON). When present, the 'source' field is required.",
      "properties": {
        "actionName": {
          "type": "string",
          "description": "The name of a specific action to execute within the action set. If omitted, all actions in the file are executed."
        },
        "source": {
          "description": "Source for the action. Can be external file reference or inline actionJSON content. Inline actionJSON can use placeholders `__ADDITIONAL_CONTENTS_PATH_0__`, `__ADDITIONAL_CONTENTS_PATH_1__`, etc. which will be replaced at runtime with the file paths of the corresponding additional images. Legacy format `ACTION_JSON_OPTIONS_ADDITIONAL_IMAGES_0` is also supported for backward compatibility.",
          "oneOf": [
            {
              "$ref": "#/$defs/CreativeCloudFileIdResourceInput"
            },
            {
              "$ref": "#/$defs/CreativeCloudResourceInput"
            },
            {
              "$ref": "#/$defs/InlineContentResourceInput"
            },
            {
              "$ref": "#/$defs/LightroomResourceInput"
            },
            {
              "$ref": "#/$defs/UrlResourceInput"
            }
          ]
        }
      },
      "required": [
        "source"
      ]
    },
    "ActionsOptions": {
      "type": "object",
      "properties": {
        "actions": {
          "type": "array",
          "description": "List of Photoshop actions. Can be .atn files or inline actionJSON. Optional.",
          "items": {
            "$ref": "#/$defs/ActionResource"
          },
          "maxItems": 10,
          "minItems": 0
        },
        "additionalContents": {
          "type": "array",
          "description": "List of additional resources. Optional. These images, js, brushes can be referenced in inline actionJSON or in UXPusing placeholders `__ADDITIONAL_CONTENTS_PATH_0__`, `__ADDITIONAL_CONTENTS_PATH_1__`, etc. based on their array index.",
          "items": {
            "$ref": "#/$defs/AdditionalContentResource"
          },
          "maxItems": 25,
          "minItems": 0
        },
        "brushes": {
          "type": "array",
          "description": "List of brush resources. External references only. Optional.",
          "items": {
            "$ref": "#/$defs/BrushResource"
          },
          "maxItems": 10,
          "minItems": 0
        },
        "fontOptions": {
          "$ref": "#/$defs/FontOptions",
          "description": "Font options configuration. Optional."
        },
        "patterns": {
          "type": "array",
          "description": "List of pattern resources. External references only. Optional.",
          "items": {
            "$ref": "#/$defs/PatternResource"
          },
          "maxItems": 10,
          "minItems": 0
        },
        "uxp": {
          "$ref": "#/$defs/UxpResource",
          "description": "An UXP plugin script that can be executed, Optional."
        }
      }
    },
    "AdditionalContentResource": {
      "type": "object",
      "description": "Single additional resource (images, js, brushes, etc.). When present, the 'source' field is required.",
      "properties": {
        "source": {
          "$ref": "#/$defs/PortableFileResourceInput",
          "description": "Source for the additional resource. Must be a URL, Creative Cloud path, or Creative Cloud file ID. Lightroom resources are not supported here. Inline content is not supported. These resources can be referenced in inline actionJSON using placeholders `__ADDITIONAL_CONTENTS_PATH_0__`, `__ADDITIONAL_CONTENTS_PATH_1__`, etc."
        }
      },
      "required": [
        "source"
      ]
    },
    "AdditionalFont": {
      "type": "object",
      "properties": {
        "source": {
          "$ref": "#/$defs/PortableFileResourceInput",
          "description": "Source of the font file. Must be a URL, Creative Cloud path, or Creative Cloud file ID. Lightroom resources are not supported for fonts. Required."
        }
      }
    },
    "BrushResource": {
      "type": "object",
      "description": "Single brush resource (.abr, etc.). When present, the 'source' field is required.",
      "properties": {
        "source": {
          "$ref": "#/$defs/PortableFileResourceInput",
          "description": "Source for the brush resource. Must be a URL, Creative Cloud path, or Creative Cloud file ID. Lightroom resources are not supported for brushes. Inline content is not supported."
        }
      },
      "required": [
        "source"
      ]
    },
    "CreativeCloudDestination": {
      "allOf": [
        {
          "$ref": "#/$defs/Destination"
        },
        {
          "type": "object",
          "properties": {
            "creativeCloudPath": {
              "type": "string",
              "description": "Path to Creative Cloud storage. Required.",
              "minLength": 1
            },
            "creativeCloudProjectId": {
              "type": "string",
              "description": "The Creative Cloud project ID. Optional. Must be a valid URN starting with 'urn:aaid:sc:'. Example: urn:aaid:sc:US:a21c8629-413f-55d9-...",
              "pattern": "^urn:aaid:.*"
            }
          }
        }
      ],
      "required": [
        "creativeCloudPath"
      ]
    },
    "CreativeCloudFileIdResourceInput": {
      "allOf": [
        {
          "$ref": "#/$defs/ResourceInput"
        },
        {
          "type": "object",
          "properties": {
            "creativeCloudFileId": {
              "type": "string",
              "description": "The file ID of the asset in Creative Cloud. Required. Must start with 'urn:aaid' (case-insensitive).",
              "minLength": 1,
              "pattern": "^urn:aaid:.*"
            }
          }
        }
      ],
      "description": "Creative Cloud file ID resource input. References a resource via Creative Cloud file ID (URN).",
      "required": [
        "creativeCloudFileId"
      ]
    },
    "CreativeCloudResourceInput": {
      "allOf": [
        {
          "$ref": "#/$defs/ResourceInput"
        },
        {
          "type": "object",
          "properties": {
            "creativeCloudPath": {
              "type": "string",
              "description": "The path to the asset in Creative Cloud. Required.",
              "minLength": 1
            },
            "creativeCloudProjectId": {
              "type": "string",
              "description": "The Creative Cloud project ID. Optional. Must be a valid URN starting with 'urn:aaid:sc:'. Example: urn:aaid:sc:US:a21c8629-413f-55d9-...",
              "pattern": "^urn:aaid:.*"
            }
          }
        }
      ],
      "description": "Creative Cloud resource input. References a resource via Creative Cloud path.",
      "required": [
        "creativeCloudPath"
      ]
    },
    "CustomIccProfile": {
      "allOf": [
        {
          "$ref": "#/$defs/IccProfile"
        },
        {
          "type": "object",
          "properties": {
            "imageMode": {
              "type": "string",
              "description": "Image mode for custom ICC profiles. Allowed values: rgb, grayscale, cmyk. Optional",
              "enum": [
                "rgb",
                "grayscale",
                "cmyk"
              ]
            },
            "name": {
              "type": "string",
              "description": "Custom ICC profile name. Provide a descriptive name (max 255 characters). Required.",
              "maxLength": 255,
              "minLength": 0
            },
            "source": {
              "$ref": "#/$defs/FileResourceInput",
              "description": "Resource input for custom ICC profile file. Required. Must point to a valid .icc or .icm file. Supports URL, Creative Cloud, and other resource types.",
              "oneOf": [
                {
                  "$ref": "#/$defs/UrlResourceInput"
                },
                {
                  "$ref": "#/$defs/CreativeCloudResourceInput"
                },
                {
                  "$ref": "#/$defs/CreativeCloudFileIdResourceInput"
                }
              ]
            }
          }
        }
      ],
      "description": "Custom ICC profile with user-provided profile file",
      "required": [
        "name",
        "source",
        "type"
      ]
    },
    "Destination": {
      "description": "Destination for output files. Can be either a URL with optional storage type or a Creative Cloud path."
    },
    "EmbeddedDestination": {
      "allOf": [
        {
          "$ref": "#/$defs/Destination"
        },
        {
          "type": "object",
          "properties": {
            "embedded": {
              "type": "string",
              "default": "string",
              "description": "Embedded format (string, base64, or json). Defaults to string when omitted.",
              "enum": [
                "string",
                "base64",
                "json"
              ]
            }
          }
        }
      ],
      "required": [
        "embedded"
      ]
    },
    "ExportReferenceLayer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "shouldIncludeChildren": {
          "type": "boolean",
          "default": true,
          "description": "When this layer is a group, whether to include its children in the export. Defaults to true. Optional."
        }
      }
    },
    "ExtendedPhotoshopOutput": {
      "description": "Export options for a single output.",
      "properties": {
        "mediaType": {
          "type": "string"
        }
      },
      "required": [
        "mediaType"
      ]
    },
    "FileResourceInput": {},
    "FontOptions": {
      "type": "object",
      "properties": {
        "additionalFonts": {
          "type": "array",
          "description": "Array of custom fonts needed in this document. Optional.",
          "items": {
            "$ref": "#/$defs/AdditionalFont"
          }
        },
        "defaultFontPostScriptName": {
          "type": "string",
          "description": "The full postscript name of the font to be used as the global default for the document. Optional."
        },
        "missingFontStrategy": {
          "type": "string",
          "description": "Action to take if there are missing fonts. Optional.",
          "enum": [
            "fail",
            "use_default"
          ]
        }
      }
    },
    "HostedDestination": {
      "allOf": [
        {
          "$ref": "#/$defs/Destination"
        },
        {
          "type": "object",
          "properties": {
            "validityPeriod": {
              "type": "integer",
              "format": "int32",
              "default": 3600,
              "description": "Validity period in seconds. Minimum: 60 seconds (1 minute). Maximum: 86400 seconds (1 day). Defaults to 3600 seconds (1 hour) when omitted.",
              "maximum": 86400,
              "minimum": 60
            }
          }
        }
      ],
      "required": [
        "validityPeriod"
      ]
    },
    "IccProfile": {
      "type": "object",
      "description": "ICC profile configuration for color management",
      "properties": {
        "type": {
          "type": "string",
          "default": "standard",
          "description": "Type of ICC profile. 'standard' for predefined profiles, 'custom' for user-provided profiles. Defaults to standard when omitted; explicit null is invalid.",
          "enum": [
            "standard",
            "custom"
          ]
        }
      },
      "required": [
        "type"
      ]
    },
    "ImageSource": {
      "type": "object",
      "properties": {
        "source": {
          "$ref": "#/$defs/FileResourceInput",
          "description": "The resource input for the image. Required. Must be an external file reference (URL, Creative Cloud, etc.). Inline content is not supported.",
          "oneOf": [
            {
              "$ref": "#/$defs/UrlResourceInput"
            },
            {
              "$ref": "#/$defs/CreativeCloudResourceInput"
            },
            {
              "$ref": "#/$defs/CreativeCloudFileIdResourceInput"
            },
            {
              "$ref": "#/$defs/LightroomResourceInput"
            }
          ]
        }
      },
      "required": [
        "source"
      ]
    },
    "InlineContentResourceInput": {
      "allOf": [
        {
          "$ref": "#/$defs/ResourceInput"
        },
        {
          "type": "object",
          "properties": {
            "content": {
              "type": "string",
              "description": "Inline content as string (for scripts, JSON, or other text-based content). Required. Maximum size: 50KB (51,200 characters).",
              "maxLength": 51200,
              "minLength": 0
            },
            "contentType": {
              "type": "string",
              "description": "MIME type of the content. Optional but recommended for proper processing."
            }
          }
        }
      ],
      "description": "Inline content resource input. Allows embedding content directly in the request.",
      "required": [
        "content"
      ]
    },
    "JpegOutput": {
      "allOf": [
        {
          "$ref": "#/$defs/PhotoshopOutput"
        },
        {
          "type": "object",
          "properties": {
            "quality": {
              "type": "string",
              "description": "JPEG quality setting. Optional.",
              "enum": [
                "very_poor",
                "poor",
                "low",
                "medium",
                "high",
                "maximum",
                "photoshop_max"
              ]
            }
          }
        }
      ],
      "required": [
        "destination",
        "mediaType"
      ]
    },
    "JsonOutput": {
      "allOf": [
        {
          "$ref": "#/$defs/PhotoshopOutput"
        },
        {
          "$ref": "#/$defs/ExtendedPhotoshopOutput"
        }
      ],
      "description": "JSON output configuration",
      "required": [
        "destination",
        "mediaType"
      ]
    },
    "LightroomResourceInput": {
      "allOf": [
        {
          "$ref": "#/$defs/ResourceInput"
        },
        {
          "type": "object",
          "properties": {
            "lightroomPath": {
              "type": "string",
              "description": "The path to the asset in Lightroom. Required. Must be a partial path that starts with '/v2/', e.g. '/v2/catalogs/{catalogId}/assets/{assetId}/revisions/{revisionId}/proxies/{proxyId}'. The host/domain is always fixed server-side and cannot be supplied by the caller. Only letters, digits, '.', '_', '-' and '/' are allowed — query strings, fragments, schemes, hosts, percent-encoding, and '..' path segments are all rejected.",
              "minLength": 1,
              "pattern": "^/v2/[A-Za-z0-9_.-]+(?:/[A-Za-z0-9_.-]+)*$"
            }
          }
        }
      ],
      "description": "Lightroom resource input. References a resource via Lightroom path.",
      "required": [
        "lightroomPath"
      ]
    },
    "PatternResource": {
      "type": "object",
      "description": "External pattern file reference. Requires source (URL, Creative Cloud path, or Creative Cloud file ID). Inline content is not supported.",
      "properties": {
        "source": {
          "$ref": "#/$defs/PortableFileResourceInput",
          "description": "Source for the pattern resource. Must be a URL, Creative Cloud path, or Creative Cloud file ID. Lightroom resources are not supported for patterns. Inline content is not supported."
        }
      },
      "required": [
        "source"
      ]
    },
    "PhotoshopOutput": {
      "type": "object",
      "description": "Export options for a single output.",
      "properties": {
        "cropMode": {
          "type": "string",
          "description": "Crop mode for export output. Optional.",
          "enum": [
            "trim_to_transparency",
            "document_bounds",
            "layer_bounds"
          ]
        },
        "destination": {
          "description": "The destination details for the output file. Required. When scriptOutputPattern is used, only EmbeddedDestination and HostedDestination are supported. URL destinations (presigned URLs) and Creative Cloud destinations cannot be used with scriptOutputPattern because they require pre-knowledge of file names and counts.",
          "oneOf": [
            {
              "$ref": "#/$defs/CreativeCloudDestination"
            },
            {
              "$ref": "#/$defs/EmbeddedDestination"
            },
            {
              "$ref": "#/$defs/HostedDestination"
            },
            {
              "$ref": "#/$defs/UrlDestination"
            }
          ]
        },
        "height": {
          "type": "integer",
          "format": "int32",
          "description": "Height in pixels. Must be >= 0. Optional.",
          "minimum": 0
        },
        "iccProfile": {
          "description": "ICC profile configuration for color management. Allows specifying standard ICC profiles (e.g., sRGB, Adobe RGB) or custom ICC profile files. Supported output formats: JPEG, PNG, TIFF, PSD. Not supported for PSDC (document/vnd.adobe.cpsd+dcxucf, document/vnd.adobe.cpsd+dcx). Optional.",
          "oneOf": [
            {
              "$ref": "#/$defs/StandardIccProfile"
            },
            {
              "$ref": "#/$defs/CustomIccProfile"
            }
          ]
        },
        "layers": {
          "type": "array",
          "description": "Layers to export. Specify layers by id, name, or both. Optional.",
          "items": {
            "$ref": "#/$defs/ExportReferenceLayer"
          },
          "maxItems": 100,
          "minItems": 0
        },
        "maxWidth": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum width constraint in pixels. Must be >= 0. If specified and (width > maxWidth OR documentWidth > maxWidth), the output will be constrained to maxWidth. Optional.",
          "minimum": 0
        },
        "mediaType": {
          "type": "string",
          "default": "image/jpeg",
          "description": "The desired output format. Supported formats: image/jpeg, image/png, image/tiff, image/vnd.adobe.photoshop, document/vnd.adobe.cpsd+dcxucf, document/vnd.adobe.cpsd+dcx and application/json. Defaults to image/jpeg when omitted.",
          "enum": [
            "image/jpeg",
            "image/png",
            "image/tiff",
            "image/vnd.adobe.photoshop",
            "document/vnd.adobe.cpsd+dcxucf",
            "document/vnd.adobe.cpsd+dcx",
            "application/json"
          ]
        },
        "resample": {
          "type": "string",
          "description": "Resampling algorithm used when resizing output to a target width. Valid values: nearest_neighbor, bilinear, bicubic, bicubic_smoother, bicubic_sharper. Defaults to bicubic_sharper when width or maxWidth is specified and this field is omitted. Optional.",
          "enum": [
            "nearest_neighbor",
            "bilinear",
            "bicubic",
            "bicubic_smoother",
            "bicubic_sharper"
          ]
        },
        "scriptOutputPattern": {
          "type": "string",
          "description": "Pattern for matching script output files in the UXP output directory. Supports both exact filenames and glob patterns. Examples: 'output.json' (matches single specific file), '*.json' (matches all JSON files), 'result-*.png' (matches result-1.png, result-2.png, etc.). Files are filtered based on the mediaType of this output definition. Only files with extensions matching the mediaType will be included. When a pattern matches multiple files, one output entry is created per file. When present, skips normal rendering/export and uses matched files instead. Output parameters like quality, compression, width, and height are ignored when this field is present. Only applicable for /v2/execute-actions endpoint. Optional, nullable.",
          "maxLength": 255,
          "minLength": 0
        },
        "shouldOverwrite": {
          "type": "boolean",
          "description": "Whether to overwrite existing files. Optional."
        },
        "width": {
          "type": "integer",
          "format": "int32",
          "description": "Width in pixels. Must be >= 0. Optional.",
          "minimum": 0
        }
      },
      "required": [
        "destination",
        "mediaType"
      ]
    },
    "PngOutput": {
      "allOf": [
        {
          "$ref": "#/$defs/PhotoshopOutput"
        },
        {
          "type": "object",
          "properties": {
            "compression": {
              "type": "string",
              "description": "PNG compression level. Optional.",
              "enum": [
                "none",
                "very_low",
                "low",
                "medium_low",
                "medium",
                "medium_high",
                "default",
                "high",
                "very_high",
                "maximum"
              ]
            }
          }
        },
        {
          "$ref": "#/$defs/ExtendedPhotoshopOutput"
        }
      ],
      "required": [
        "destination",
        "mediaType"
      ]
    },
    "PortableFileResourceInput": {
      "description": "External file reference. Must be a URL, Creative Cloud path, or Creative Cloud file ID. Lightroom resources are not supported.",
      "oneOf": [
        {
          "$ref": "#/$defs/UrlResourceInput"
        },
        {
          "$ref": "#/$defs/CreativeCloudResourceInput"
        },
        {
          "$ref": "#/$defs/CreativeCloudFileIdResourceInput"
        }
      ]
    },
    "PsdOutput": {
      "allOf": [
        {
          "$ref": "#/$defs/PhotoshopOutput"
        },
        {
          "$ref": "#/$defs/ExtendedPhotoshopOutput"
        }
      ],
      "required": [
        "destination",
        "mediaType"
      ]
    },
    "PsdcOutput": {
      "allOf": [
        {
          "$ref": "#/$defs/PhotoshopOutput"
        },
        {
          "$ref": "#/$defs/ExtendedPhotoshopOutput"
        }
      ],
      "required": [
        "destination",
        "mediaType"
      ]
    },
    "ResourceInput": {},
    "StandardIccProfile": {
      "allOf": [
        {
          "$ref": "#/$defs/IccProfile"
        },
        {
          "type": "object",
          "properties": {
            "imageMode": {
              "type": "string",
              "description": "Image mode for standard ICC profiles. Allowed values: rgb, grayscale. Optional",
              "enum": [
                "rgb",
                "grayscale"
              ]
            },
            "name": {
              "type": "string",
              "default": "sRGB IEC61966-2.1",
              "description": "Standard ICC profile name. Must be one of the predefined values: Adobe RGB (1998), Apple RGB, ColorMatch RGB, sRGB IEC61966-2.1, Dot Gain 10%, Dot Gain 15%, Dot Gain 20%, Dot Gain 25%, Dot Gain 30%, Gray Gamma 1.8, Gray Gamma 2.2. Defaults to sRGB IEC61966-2.1 when omitted; explicit null is invalid.",
              "enum": [
                "Adobe RGB (1998)",
                "Apple RGB",
                "ColorMatch RGB",
                "sRGB IEC61966-2.1",
                "Dot Gain 10%",
                "Dot Gain 15%",
                "Dot Gain 20%",
                "Dot Gain 25%",
                "Dot Gain 30%",
                "Gray Gamma 1.8",
                "Gray Gamma 2.2"
              ]
            }
          }
        }
      ],
      "description": "Standard ICC profile with predefined profile names",
      "required": [
        "name",
        "type"
      ]
    },
    "TiffOutput": {
      "allOf": [
        {
          "$ref": "#/$defs/PhotoshopOutput"
        },
        {
          "$ref": "#/$defs/ExtendedPhotoshopOutput"
        }
      ],
      "required": [
        "destination",
        "mediaType"
      ]
    },
    "UrlDestination": {
      "allOf": [
        {
          "$ref": "#/$defs/Destination"
        },
        {
          "type": "object",
          "properties": {
            "storageType": {
              "type": "string",
              "description": "Storage type for the destination. Optional.",
              "enum": [
                "azure",
                "dropbox"
              ]
            },
            "url": {
              "type": "string",
              "description": "Pre-signed URL for external storage. Must be HTTPS. Required.",
              "minLength": 1
            }
          }
        }
      ],
      "required": [
        "url"
      ]
    },
    "UrlResourceInput": {
      "allOf": [
        {
          "$ref": "#/$defs/ResourceInput"
        },
        {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "The pre-signed URL of the resource. Required.",
              "minLength": 1
            }
          }
        }
      ],
      "description": "URL resource input. References a resource via a pre-signed URL.",
      "required": [
        "url"
      ]
    },
    "UxpResource": {
      "type": "object",
      "description": "UXP plugin script resource. Requires source (external file reference or inline script content).",
      "properties": {
        "source": {
          "description": "Source for the UXP script. Can be external file reference or inline script content. UXP scripts can use the placeholder `__UXP_OUTPUT_PATH__` which will be replaced at runtime with the directory path for script output files. Example usage: `const outputPath = '__UXP_OUTPUT_PATH__'; const outputFile = path.join(outputPath, 'uxpOutput.json');`",
          "oneOf": [
            {
              "$ref": "#/$defs/CreativeCloudFileIdResourceInput"
            },
            {
              "$ref": "#/$defs/CreativeCloudResourceInput"
            },
            {
              "$ref": "#/$defs/InlineContentResourceInput"
            },
            {
              "$ref": "#/$defs/LightroomResourceInput"
            },
            {
              "$ref": "#/$defs/UrlResourceInput"
            }
          ]
        }
      },
      "required": [
        "source"
      ]
    }
  }
}