{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-auto-straighten-image-request-schema.json",
  "title": "AutoStraightenImageRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-firefly-lightroom-openapi.yml#/components/schemas/AutoStraightenImageRequest",
  "type": "object",
  "required": [
    "inputs",
    "outputs"
  ],
  "properties": {
    "inputs": {
      "$ref": "#/$defs/StorageDetails"
    },
    "options": {
      "$ref": "#/$defs/AutoStraightOptions"
    },
    "outputs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LrOutputDetails"
      },
      "description": "Only a single output is supported currently."
    }
  },
  "$defs": {
    "AutoStraightOptions": {
      "title": "AutoStraightOptions",
      "required": [
        "uprightMode"
      ],
      "type": "object",
      "properties": {
        "uprightMode": {
          "$ref": "#/$defs/UprightMode"
        },
        "constrainCrop": {
          "type": "boolean",
          "description": "If the straightened image should be constrained and cropped to remove all blank edges around an image.",
          "default": true
        }
      }
    },
    "ImageFormatType": {
      "title": "ImageFormatType",
      "enum": [
        "image/jpeg",
        "image/png",
        "image/x-adobe-dng",
        "application/rdf+xml"
      ],
      "type": "string",
      "description": "Desired output image format."
    },
    "LrOutputDetails": {
      "title": "LrOutputDetails",
      "type": "object",
      "required": [
        "href",
        "storage",
        "type"
      ],
      "properties": {
        "href": {
          "type": "string",
          "description": "Pre-signed POST URL to the output file."
        },
        "storage": {
          "$ref": "#/$defs/StorageType"
        },
        "type": {
          "$ref": "#/$defs/ImageFormatType"
        },
        "overwrite": {
          "type": "boolean",
          "default": true,
          "description": "Determines if the output file should be overwritten if it already exists. This flag is used only for Adobe cloud storage."
        },
        "quality": {
          "maximum": 12,
          "minimum": 1,
          "type": "integer",
          "default": 12,
          "description": "Quality of the JPEG outputs (will be ignored for other output types). Ranges from 1 to 12, with 12 as the highest quality."
        }
      }
    },
    "StorageDetails": {
      "title": "StorageDetails",
      "type": "object",
      "required": [
        "href",
        "storage"
      ],
      "properties": {
        "href": {
          "type": "string",
          "description": "Pre-signed GET URL for the source asset."
        },
        "storage": {
          "$ref": "#/$defs/StorageType"
        }
      },
      "description": "File on Adobe's cloud or an external service (like AWS S3, Azure, Dropbox)."
    },
    "StorageType": {
      "title": "StorageType",
      "enum": [
        "external",
        "azure",
        "dropbox"
      ],
      "type": "string",
      "description": "Storage location."
    },
    "UprightMode": {
      "title": "UprightMode",
      "enum": [
        "auto",
        "full",
        "level",
        "vertical"
      ],
      "type": "string",
      "description": "The upright mode to use. If you have the options block, then this is a required field. If options block is not specified, then the appropriate upright mode will automatically be selected."
    }
  }
}