{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cueframe-ai/json-schema/cueframe-ai-derive-composition-request-schema.json",
  "title": "DeriveCompositionRequest",
  "description": "Derive a reframed sibling composition for a new aspect (Auto-Reframe / Magic-Resize, agent-native).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cueframe-ai-compositions-api-openapi.yml#/components/schemas/DeriveCompositionRequest",
  "type": "object",
  "properties": {
    "fromCompositionId": {
      "type": "string",
      "minLength": 1,
      "description": "Source composition to reframe a sibling from."
    },
    "targetFormat": {
      "description": "The target output format (aspectRatio + optional fps/resolution) for the new sibling.",
      "$ref": "#/$defs/Format"
    },
    "if_match": {
      "description": "Required: the source composition's strong etag the caller last saw. Missing is refused with 428 precondition_required; a source that changed since is 409 stale_etag.",
      "type": "string"
    }
  },
  "required": [
    "fromCompositionId",
    "targetFormat"
  ],
  "additionalProperties": false,
  "$defs": {
    "Format": {
      "type": "object",
      "properties": {
        "aspectRatio": {
          "type": "string",
          "enum": [
            "16:9",
            "9:16",
            "1:1",
            "4:5"
          ]
        },
        "fps": {
          "anyOf": [
            {
              "type": "number",
              "const": 24
            },
            {
              "type": "number",
              "const": 25
            },
            {
              "type": "number",
              "const": 30
            },
            {
              "type": "number",
              "const": 60
            }
          ]
        },
        "resolution": {
          "type": "string",
          "enum": [
            "hd",
            "fhd",
            "4k"
          ]
        },
        "platform": {
          "type": "string"
        }
      },
      "required": [
        "aspectRatio"
      ]
    }
  }
}