{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aiand-com/json-schema/aiand-com-create-video-job-request-schema.json",
  "title": "CreateVideoJobRequest",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aiand-com-openapi.json#/components/schemas/CreateVideoJobRequest",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "model": {
          "type": "string",
          "description": "Video model to generate with"
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 7000,
          "description": "Text description of the video to generate"
        },
        "seconds": {
          "type": "integer",
          "minimum": 4,
          "maximum": 30,
          "description": "Clip duration in seconds, 4-30. 16-30 seconds is experimental; quality may vary."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "Auto",
            "21:9",
            "16:9",
            "4:3",
            "1:1",
            "3:4",
            "9:16"
          ],
          "description": "Required output aspect ratio"
        },
        "image_reference": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "file_id": {
                "type": "string",
                "minLength": 1,
                "description": "Id of a file uploaded with purpose `vision`"
              },
              "role": {
                "type": "string",
                "enum": [
                  "first_frame",
                  "last_frame"
                ],
                "description": "Where the image sits: the first or last frame"
              }
            },
            "required": [
              "file_id",
              "role"
            ],
            "additionalProperties": false
          },
          "minItems": 1,
          "maxItems": 2,
          "description": "One or two images with unique first_frame/last_frame roles."
        }
      },
      "required": [
        "model",
        "prompt",
        "seconds",
        "aspect_ratio"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "model": {
          "type": "string",
          "description": "Video model to generate with"
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 7000,
          "description": "Text description of the video to generate"
        },
        "seconds": {
          "type": "integer",
          "minimum": 4,
          "maximum": 30,
          "description": "Clip duration in seconds, 4-30. 16-30 seconds is experimental; quality may vary."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "Auto",
            "21:9",
            "16:9",
            "4:3",
            "1:1",
            "3:4",
            "9:16"
          ],
          "description": "Required output aspect ratio"
        },
        "references": {
          "type": "object",
          "properties": {
            "images": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "file_id": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "file_id"
                ],
                "additionalProperties": false
              },
              "minItems": 1,
              "maxItems": 9,
              "description": "Up to 9 images (purpose `vision`)."
            },
            "videos": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "file_id": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "file_id"
                ],
                "additionalProperties": false
              },
              "minItems": 1,
              "maxItems": 3,
              "description": "Up to 3 video clips (purpose `video`)."
            },
            "audio": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "file_id": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "file_id"
                ],
                "additionalProperties": false
              },
              "minItems": 1,
              "maxItems": 3,
              "description": "Up to 3 audio clips (purpose `audio`)."
            }
          },
          "additionalProperties": false,
          "description": "Reference media to condition on. Up to 12 files in total. Cannot be combined with image_reference."
        }
      },
      "required": [
        "model",
        "prompt",
        "seconds",
        "aspect_ratio",
        "references"
      ],
      "additionalProperties": false
    }
  ]
}