{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://vclaw.dev/schemas/video/artifacts/batch-queue-manifest.schema.json",
  "title": "BatchQueueManifest",
  "description": "Operator-authored manifest listing many independent video jobs to queue against a native route (default runway-useapi explore, which is free). Compiled into a single VideoExecutionPayload by buildBatchPayload().",
  "type": "object",
  "required": ["schemaVersion", "jobs"],
  "additionalProperties": false,
  "properties": {
    "schemaVersion": { "const": 1 },
    "route": {
      "type": "string",
      "enum": ["runway-useapi", "dreamina-useapi", "seedance-direct"],
      "description": "Native route to submit against. Defaults to runway-useapi (free explore mode) when omitted."
    },
    "defaults": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "seconds": { "type": "number" },
        "aspectRatio": { "type": "string", "enum": ["16:9", "9:16", "1:1"] },
        "resolution": { "type": "string", "enum": ["720p", "1080p"] }
      }
    },
    "jobs": {
      "type": "array",
      "minItems": 1,
      "items": { "$ref": "#/definitions/BatchQueueJob" }
    }
  },
  "definitions": {
    "BatchQueueJob": {
      "type": "object",
      "required": ["id", "prompt"],
      "additionalProperties": false,
      "properties": {
        "id": { "type": "string", "minLength": 1 },
        "prompt": { "type": "string", "minLength": 1 },
        "keyframe": {
          "type": "string",
          "minLength": 1,
          "description": "Optional first-frame reference; a local path or a public http(s) URL."
        },
        "endKeyframe": {
          "type": "string",
          "minLength": 1,
          "description": "Optional END-frame reference (local path or public http(s) URL). With 'keyframe' set, the clip animates from keyframe (first frame) to endKeyframe (last frame) via Seedance-2 keyframe interpolation, turning two stills into one continuous shot. Requires 'keyframe'; mutually exclusive with 'characterRefs'."
        },
        "characterRefs": {
          "type": "array",
          "items": { "type": "string", "minLength": 1 },
          "description": "Optional character reference images (local paths or public http(s) URLs), one per character. Delivered to the provider reference slot (never the first frame), so a lone character sheet does not open the clip on the character grid. Mutually exclusive with keyframe."
        },
        "seconds": { "type": "number" },
        "aspectRatio": { "type": "string" }
      }
    }
  }
}
