{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/animgen-com/json-schema/animgen-com-animation-composition-update-request-schema.json",
  "title": "AnimationCompositionUpdateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/animgen-com-animation-compositions-api-openapi.yml#/components/schemas/AnimationCompositionUpdateRequest",
  "properties": {
    "revision": {
      "type": "integer",
      "minimum": 1.0,
      "title": "Revision"
    },
    "name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "recipe": {
      "anyOf": [
        {
          "$ref": "#/$defs/AnimationEditRecipeV1"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "revision"
  ],
  "$defs": {
    "AnimationCanvas": {
      "properties": {
        "width": {
          "type": "integer",
          "title": "Width"
        },
        "height": {
          "type": "integer",
          "title": "Height"
        },
        "background": {
          "type": "string",
          "enum": [
            "transparent",
            "solid"
          ],
          "title": "Background",
          "default": "transparent"
        },
        "backgroundColor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Backgroundcolor",
          "default": "#000000"
        }
      },
      "type": "object",
      "required": [
        "width",
        "height"
      ],
      "title": "AnimationCanvas"
    },
    "AnimationEditRecipeV1": {
      "properties": {
        "version": {
          "type": "integer",
          "enum": [
            1,
            2
          ],
          "title": "Version",
          "default": 1
        },
        "source": {
          "$ref": "#/$defs/AnimationRecipeSource"
        },
        "sequence": {
          "items": {
            "$ref": "#/$defs/AnimationFrameRef"
          },
          "type": "array",
          "maxItems": 240,
          "minItems": 1,
          "title": "Sequence"
        },
        "playback": {
          "$ref": "#/$defs/AnimationPlayback"
        },
        "canvas": {
          "$ref": "#/$defs/AnimationCanvas"
        },
        "transform": {
          "$ref": "#/$defs/AnimationTransform"
        },
        "pivot": {
          "$ref": "#/$defs/AnimationPivot"
        }
      },
      "type": "object",
      "required": [
        "source",
        "sequence",
        "canvas"
      ],
      "title": "AnimationEditRecipeV1"
    },
    "AnimationFrameRef": {
      "properties": {
        "id": {
          "type": "string",
          "maxLength": 80,
          "minLength": 1,
          "title": "Id"
        },
        "sourceFrameIndex": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Sourceframeindex"
        },
        "sourceTimestampUs": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Sourcetimestampus"
        },
        "durationFrames": {
          "type": "integer",
          "maximum": 240.0,
          "minimum": 1.0,
          "title": "Durationframes",
          "default": 1
        },
        "imageAssetId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Imageassetid"
        },
        "transformOverride": {
          "anyOf": [
            {
              "$ref": "#/$defs/AnimationFrameTransform"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "required": [
        "id",
        "sourceFrameIndex",
        "sourceTimestampUs"
      ],
      "title": "AnimationFrameRef"
    },
    "AnimationFrameTransform": {
      "properties": {
        "offsetX": {
          "type": "number",
          "maximum": 4096.0,
          "minimum": -4096.0,
          "title": "Offsetx",
          "default": 0
        },
        "offsetY": {
          "type": "number",
          "maximum": 4096.0,
          "minimum": -4096.0,
          "title": "Offsety",
          "default": 0
        },
        "scale": {
          "type": "number",
          "maximum": 8.0,
          "minimum": 0.05,
          "title": "Scale",
          "default": 1
        }
      },
      "type": "object",
      "title": "AnimationFrameTransform"
    },
    "AnimationPivot": {
      "properties": {
        "x": {
          "type": "number",
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "X",
          "default": 0.5
        },
        "y": {
          "type": "number",
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Y",
          "default": 0
        }
      },
      "type": "object",
      "title": "AnimationPivot"
    },
    "AnimationPlayback": {
      "properties": {
        "fps": {
          "type": "number",
          "maximum": 60.0,
          "minimum": 1.0,
          "title": "Fps",
          "default": 24
        },
        "loop": {
          "type": "boolean",
          "title": "Loop",
          "default": true
        }
      },
      "type": "object",
      "title": "AnimationPlayback"
    },
    "AnimationRecipeSource": {
      "properties": {
        "assetId": {
          "type": "string",
          "format": "uuid",
          "title": "Assetid"
        },
        "sourceJobId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sourcejobid"
        },
        "timebase": {
          "type": "string",
          "const": "source_pts",
          "title": "Timebase",
          "default": "source_pts"
        }
      },
      "type": "object",
      "required": [
        "assetId"
      ],
      "title": "AnimationRecipeSource"
    },
    "AnimationTransform": {
      "properties": {
        "anchor": {
          "type": "string",
          "enum": [
            "center",
            "bottom_center"
          ],
          "title": "Anchor",
          "default": "center"
        },
        "offsetX": {
          "type": "number",
          "maximum": 4096.0,
          "minimum": -4096.0,
          "title": "Offsetx",
          "default": 0
        },
        "offsetY": {
          "type": "number",
          "maximum": 4096.0,
          "minimum": -4096.0,
          "title": "Offsety",
          "default": 0
        },
        "scale": {
          "type": "number",
          "maximum": 8.0,
          "minimum": 0.05,
          "title": "Scale",
          "default": 1
        },
        "fit": {
          "type": "string",
          "enum": [
            "none",
            "contain",
            "cover"
          ],
          "title": "Fit",
          "default": "contain"
        }
      },
      "type": "object",
      "title": "AnimationTransform"
    }
  }
}