{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beatapi/json-schema/beatapi-video-generation-task-create-request-schema.json",
  "title": "VideoGenerationTaskCreateRequest",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beatapi-openapi.json#/components/schemas/VideoGenerationTaskCreateRequest",
  "oneOf": [
    {
      "$ref": "#/$defs/MinimaxH3VideoRequest"
    },
    {
      "$ref": "#/$defs/MinimaxH3FastVideoRequest"
    },
    {
      "$ref": "#/$defs/MinimaxH3NormalVideoRequest"
    },
    {
      "$ref": "#/$defs/GrokImagineVideo15Request"
    },
    {
      "$ref": "#/$defs/Seedance2VideoRequest"
    },
    {
      "$ref": "#/$defs/Seedance2FastVideoRequest"
    },
    {
      "$ref": "#/$defs/Seedance2MiniVideoRequest"
    },
    {
      "$ref": "#/$defs/Veo31VideoRequest"
    },
    {
      "$ref": "#/$defs/Seedance25VideoRequest"
    },
    {
      "$ref": "#/$defs/Kling3VideoRequest"
    },
    {
      "$ref": "#/$defs/KlingV4VideoRequest"
    },
    {
      "$ref": "#/$defs/Kling26MotionControlVideoRequest"
    },
    {
      "$ref": "#/$defs/Kling3MotionControlVideoRequest"
    },
    {
      "$ref": "#/$defs/Wan30VideoRequest"
    },
    {
      "$ref": "#/$defs/Wan30PrimeVideoRequest"
    },
    {
      "$ref": "#/$defs/HappyHorse10VideoRequest"
    },
    {
      "$ref": "#/$defs/HappyHorse11VideoRequest"
    },
    {
      "$ref": "#/$defs/MinimaxH3MaxVideoRequest"
    },
    {
      "$ref": "#/$defs/MinimaxH3MaxTurboVideoRequest"
    }
  ],
  "$defs": {
    "GrokImagineVideo15Request": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "`images` accepts one first frame and cannot be combined with `reference_images`. Omit `aspect_ratio` when `images` is supplied. 1080p accepts at most one image.",
      "properties": {
        "model": {
          "type": "string",
          "const": "grok-imagine-video-1.5",
          "description": "Must be `grok-imagine-video-1.5`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096,
          "description": "Video generation instructions."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "description": "One first-frame image as a public HTTPS URL.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 7,
          "description": "One to seven public HTTPS reference images.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 1,
          "maximum": 15,
          "default": 8,
          "description": "Requested output duration in seconds."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "1:1",
            "16:9",
            "9:16",
            "3:2",
            "2:3",
            "auto"
          ],
          "default": "16:9",
          "description": "Output video aspect ratio. Omit when one first-frame image is supplied."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "480p",
            "720p",
            "1080p"
          ],
          "default": "480p",
          "description": "Output resolution tier. 1080p accepts at most one image."
        }
      }
    },
    "HappyHorse10VideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt",
        "images"
      ],
      "description": "Image to video only — this model publishes no text-to-video mode, so `images` is required.",
      "properties": {
        "model": {
          "type": "string",
          "const": "happyhorse-1.0",
          "description": "Must be `happyhorse-1.0`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "What should happen in the shot — the motion, the expression, the camera."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 9,
          "description": "Source images as public HTTPS URLs. At least one is required.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 3,
          "maximum": 15,
          "default": 5,
          "description": "Requested output duration in seconds."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "16:9",
            "9:16",
            "1:1",
            "4:3",
            "3:4"
          ],
          "default": "16:9",
          "description": "Output video aspect ratio."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "720p",
            "1080p"
          ],
          "default": "720p",
          "description": "Output resolution tier. Price scales with it."
        }
      }
    },
    "HappyHorse11VideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "Text to video when no image is sent; image to video when `images` carries one first frame, whose aspect ratio the output keeps; reference to video with one to nine `reference_images`. `images` cannot be combined with `reference_images`.",
      "properties": {
        "model": {
          "type": "string",
          "const": "happyhorse-1.1",
          "description": "Must be `happyhorse-1.1`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "What should happen in the shot — the motion, the expression, the camera. Refer to reference images as [Image 1], [Image 2] and so on, in list order."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "description": "One first-frame image as a public HTTPS URL. The output keeps its aspect ratio.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 9,
          "description": "One to nine reference images as public HTTPS URLs, referred to in the prompt as [Image 1], [Image 2] and so on.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 3,
          "maximum": 15,
          "default": 5,
          "description": "Requested output duration in seconds."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "16:9",
            "9:16",
            "1:1",
            "4:3",
            "3:4"
          ],
          "default": "16:9",
          "description": "Output video aspect ratio for text and reference runs. A first frame in `images` sets the shape instead."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "720p",
            "1080p"
          ],
          "default": "720p",
          "description": "Output resolution tier. Price scales with it."
        }
      }
    },
    "Kling26MotionControlVideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "images",
        "reference_videos"
      ],
      "description": "Transfer motion from one uploaded 3–30 second MP4/MOV video to one\nuploaded character image. Both URLs must come from `/v1/files` for the\ncurrent BeatAPI account. BeatAPI detects the reference-video duration\nserver-side and reserves USD at the selected per-second rate, rounding\nfractional seconds up. The image must be 10 MB or smaller; the video\nmay be up to 100 MB.\n",
      "properties": {
        "model": {
          "type": "string",
          "const": "kling-2.6-motion-control",
          "description": "Must be `kling-2.6-motion-control`."
        },
        "prompt": {
          "type": "string",
          "maxLength": 2500,
          "description": "Optional motion or scene guidance."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "description": "Exactly one character-image URL returned by the current account's `/v1/files` upload.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_videos": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "description": "Exactly one 3–30 second MP4/MOV URL returned by the current account's `/v1/files` upload. Its detected duration determines billing.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "resolution": {
          "type": "string",
          "enum": [
            "720p",
            "1080p"
          ],
          "default": "720p",
          "description": "Output resolution and per-second price tier."
        },
        "character_orientation": {
          "type": "string",
          "enum": [
            "image",
            "video"
          ],
          "default": "image",
          "description": "Image orientation limits the output to at most 10 seconds; video orientation supports up to 30 seconds."
        }
      }
    },
    "Kling3MotionControlVideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "images",
        "reference_videos"
      ],
      "description": "Kling 3.0 motion transfer using exactly one uploaded image and one\nuploaded 3–30 second MP4/MOV. Both assets must exceed 340 px in width\nand height and use an aspect ratio from 2:5 to 5:2. BeatAPI detects the\nreference-video duration server-side and reserves USD at the selected\nper-second rate, rounding fractional seconds up.\n",
      "properties": {
        "model": {
          "type": "string",
          "const": "kling-3-motion-control",
          "description": "Must be `kling-3-motion-control`."
        },
        "prompt": {
          "type": "string",
          "maxLength": 2500,
          "description": "Optional motion or scene guidance."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "description": "Exactly one character-image URL returned by the current account's `/v1/files` upload; maximum 10 MB.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_videos": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "description": "Exactly one 3–30 second MP4/MOV URL returned by the current account's `/v1/files` upload; maximum 100 MB. Its detected duration determines billing.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "resolution": {
          "type": "string",
          "enum": [
            "720p",
            "1080p"
          ],
          "default": "720p",
          "description": "Output resolution and per-second price tier."
        },
        "character_orientation": {
          "type": "string",
          "enum": [
            "image",
            "video"
          ],
          "default": "image",
          "description": "Image orientation limits the output to at most 10 seconds; video orientation supports up to 30 seconds."
        },
        "background_source": {
          "type": "string",
          "enum": [
            "input_video",
            "input_image"
          ],
          "default": "input_video",
          "description": "Preserve the background from the motion video or character image."
        }
      }
    },
    "Kling3VideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "Multi-shot mode accepts one first-frame image, requires `multi_prompt`, and defaults sound to true. Shot durations must sum to `duration`, or to 5 when `duration` is omitted.",
      "properties": {
        "model": {
          "type": "string",
          "const": "kling-v3",
          "description": "Must be `kling-v3`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Video generation instructions."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "description": "One first-frame image or first- and last-frame images as public HTTPS URLs. Multi-shot mode accepts exactly one.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 3,
          "maximum": 15,
          "default": 5,
          "description": "Requested output duration in seconds."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "16:9",
            "9:16",
            "1:1"
          ],
          "description": "Defaults to 16:9 for text generation. Omit it with frame images to adapt to the input aspect ratio."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "std",
            "pro"
          ],
          "default": "pro",
          "description": "Output quality tier."
        },
        "sound": {
          "type": "boolean",
          "description": "Generate synchronized sound. Defaults to true in multi-shot mode."
        },
        "multi_shots": {
          "type": "boolean",
          "default": false,
          "description": "Enable storyboard-style multi-shot generation."
        },
        "multi_prompt": {
          "type": "array",
          "minItems": 1,
          "maxItems": 5,
          "description": "Shot definitions required when `multi_shots=true`; shot durations must sum to `duration`, or to 5 when `duration` is omitted.",
          "items": {
            "$ref": "#/$defs/KlingShot"
          }
        },
        "elements": {
          "type": "array",
          "maxItems": 3,
          "description": "Up to three reusable subject or object references.",
          "items": {
            "$ref": "#/$defs/KlingElement"
          }
        }
      }
    },
    "KlingElement": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "element_input_urls"
      ],
      "description": "Use 2-4 image URLs or one video URL. A video element may include one audio URL and a 3-8 second segment in milliseconds.",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "Stable name used to reference this element in the prompt."
        },
        "description": {
          "type": "string",
          "description": "Optional description of the subject or object."
        },
        "element_input_urls": {
          "type": "array",
          "minItems": 1,
          "maxItems": 4,
          "description": "Two to four image URLs, or one video URL.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "element_input_audio_urls": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "description": "Optional audio URL used with a video element.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "start_time": {
          "type": "integer",
          "minimum": 0,
          "maximum": 30000,
          "description": "Video element segment start time in milliseconds."
        },
        "end_time": {
          "type": "integer",
          "minimum": 0,
          "maximum": 30000,
          "description": "Video element segment end time in milliseconds. The segment must be 3-8 seconds."
        }
      }
    },
    "KlingShot": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "prompt",
        "duration"
      ],
      "properties": {
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Instructions for this shot."
        },
        "duration": {
          "type": "integer",
          "minimum": 1,
          "maximum": 12,
          "description": "Shot duration in seconds. All shot durations must sum to the task duration."
        }
      }
    },
    "KlingV4Element": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name"
      ],
      "description": "Use 2-4 images in `element_input_urls` (the first is the main view) or one 3-8 second single-shot character video in `element_input_video_urls`, not both. A character element may add one voice in `element_input_audio_urls`.",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 20,
          "description": "Name the prompt mentions as `@` plus the name: letters, digits, underscores or Chinese characters, unique ignoring case, and not `image_N`, `video_N`, `voice_N`, `keyframe_N`, `object_N`, `audio_N`, `first_frame` or `last_frame`."
        },
        "description": {
          "type": "string",
          "maxLength": 100,
          "description": "Optional description of the element."
        },
        "tag": {
          "type": "string",
          "enum": [
            "character",
            "animal",
            "prop",
            "costume",
            "scene",
            "effect",
            "others"
          ],
          "description": "What the element is. A video element or an element with a voice must be a character: omit it or send `character`."
        },
        "element_input_urls": {
          "type": "array",
          "minItems": 2,
          "maxItems": 4,
          "description": "Two to four public HTTPS image URLs of the element; the first is its main view.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "element_input_video_urls": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "description": "One public HTTPS URL of a 3-8 second single-shot video of a character.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "element_input_audio_urls": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "description": "One public HTTPS audio URL, the voice of a character element.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        }
      }
    },
    "KlingV4VideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "`images` are frames in time order and cannot be combined with `reference_*` inputs, `elements` or `aspect_ratio`; a video takes at most `duration` + 1 images and never more than 10. Every `@` mention in the prompt must name an input of the same request. Reference videos and video elements are at most 5 together, video elements at most 3, and reference images, videos, audio and elements at most 15 together. Audio is always generated.",
      "properties": {
        "model": {
          "type": "string",
          "const": "kling-v4",
          "description": "Must be `kling-v4`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Video generation instructions. Name inputs as `@image_1`, `@video_1`, `@voice_1`, `@` plus an element name, `@first_frame`, `@keyframe_1` and `@last_frame`."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 10,
          "description": "Frames in time order as public HTTPS URLs: one is the first frame, two the first and last, more add middle frames between them.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 10,
          "description": "Public HTTPS image references, mentioned as `@image_1`, `@image_2` and so on.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_videos": {
          "type": "array",
          "minItems": 1,
          "maxItems": 5,
          "description": "Public HTTPS video references of 2-30 seconds each and 30 seconds together, mentioned as `@video_1` and so on.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_audios": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "description": "Public HTTPS voice references, mentioned as `@voice_1` and so on.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "elements": {
          "type": "array",
          "maxItems": 7,
          "description": "Up to seven named elements, mentioned as `@` followed by their name.",
          "items": {
            "$ref": "#/$defs/KlingV4Element"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 3,
          "maximum": 30,
          "default": 5,
          "description": "Requested output duration in seconds."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "16:9",
            "9:16",
            "1:1",
            "21:9"
          ],
          "default": "16:9",
          "description": "Output aspect ratio. Not accepted with `images`, whose first frame sets the shape."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "720p",
            "1080p"
          ],
          "default": "720p",
          "description": "Output resolution tier. 720p and 1080p are priced separately; see the pricing page."
        },
        "keep_original_sound": {
          "type": "boolean",
          "description": "Keep the reference videos' own audio instead of generated audio. Requires `reference_videos`."
        }
      }
    },
    "MinimaxH3FastVideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "`images` cannot be combined with any `reference_*` input. An audio reference also requires at least one reference image or video. The explicit Fast contract exposes 768P and 2K.",
      "properties": {
        "model": {
          "type": "string",
          "const": "minimax-h3-fast",
          "description": "Must be `minimax-h3-fast`. This is the explicit Fast alias of `minimax-h3`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Video generation instructions."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "description": "One first-frame image or first- and last-frame images as public HTTPS URLs. First and last frames need 768P or 2K.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 9,
          "description": "Public HTTPS image references for multimodal reference generation.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_videos": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "description": "Public HTTPS video references for multimodal reference generation. Available at 768P and 2K only.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_audios": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "description": "Public HTTPS audio references for multimodal reference generation. Audio also requires at least one reference image or video.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 4,
          "maximum": 15,
          "default": 5,
          "description": "Requested output duration in seconds."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "adaptive",
            "21:9",
            "16:9",
            "4:3",
            "1:1",
            "3:4",
            "9:16"
          ],
          "description": "Text mode defaults to 16:9 and does not accept adaptive. Frame mode always uses adaptive at 768P and 2K. Reference mode defaults to adaptive and also accepts a concrete ratio."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "768P",
            "2K"
          ],
          "default": "768P",
          "description": "Output resolution tier. The explicit Fast H3 contract exposes 768P and 2K."
        }
      }
    },
    "MinimaxH3MaxTurboVideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "H3 Max on a faster stack — the same request contract and the same modes, roughly 2.5x quicker, at half the per-second rate.",
      "properties": {
        "model": {
          "type": "string",
          "const": "minimax-h3-max-turbo",
          "description": "Must be `minimax-h3-max-turbo`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "What should happen in the shot — the motion, the expression, the camera."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "description": "Public HTTPS images. One starts the render from a first frame; a second becomes the last frame, in first-to-last order.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 5,
          "default": 5,
          "description": "Requested output duration in seconds. fal requires at least 5 seconds; shorter values are rejected before submission. Billed per second at the rate for the chosen resolution."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "480P",
            "768P"
          ],
          "default": "768P",
          "description": "Output resolution. Upper-case P, and the only two values this model accepts. Price scales with it."
        },
        "seed": {
          "type": "integer",
          "minimum": 0,
          "description": "Reuse a seed to re-render the same motion. A random seed is chosen when omitted."
        }
      }
    },
    "MinimaxH3MaxVideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "Text to video, or image to video when `images` carries a first frame. A second image becomes the last frame. Output tops out at 768P — MiniMax H3 renders 2K for less per second.",
      "properties": {
        "model": {
          "type": "string",
          "const": "minimax-h3-max",
          "description": "Must be `minimax-h3-max`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "What should happen in the shot — the motion, the expression, the camera."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "description": "Public HTTPS images. One starts the render from a first frame; a second becomes the last frame, in first-to-last order.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 5,
          "default": 5,
          "description": "Requested output duration in seconds. fal requires at least 5 seconds; shorter values are rejected before submission. Billed per second at the rate for the chosen resolution."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "480P",
            "768P"
          ],
          "default": "768P",
          "description": "Output resolution. Upper-case P, and the only two values this model accepts. Price scales with it."
        },
        "seed": {
          "type": "integer",
          "minimum": 0,
          "description": "Reuse a seed to re-render the same motion. A random seed is chosen when omitted."
        }
      }
    },
    "MinimaxH3NormalVideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "Normal is the slower H3 offer, priced at half of Fast for matching resolution and duration. Use text, one first frame, first/last frames, or visual references. Frame inputs cannot be combined with reference inputs. Audio input and audio-off controls are not supported; generated videos include native audio.",
      "properties": {
        "model": {
          "type": "string",
          "const": "minimax-h3-normal",
          "description": "Must be `minimax-h3-normal`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Video generation instructions."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "description": "One first-frame image or first- and last-frame images in order. Cannot be combined with reference_images or reference_videos.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 4,
          "description": "Up to four public HTTPS reference images, optionally combined with one reference video. Cannot be combined with images.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_videos": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "description": "One public HTTPS reference video, optionally combined with up to four reference images. Cannot be combined with images.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 5,
          "maximum": 15,
          "default": 5,
          "description": "Requested output duration in whole seconds."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "16:9",
            "9:16",
            "1:1",
            "4:3",
            "3:4",
            "21:9"
          ],
          "default": "16:9",
          "description": "Output aspect ratio. Adaptive is not supported."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "480p",
            "768p",
            "1080p"
          ],
          "default": "768p",
          "description": "Normal output resolution. This model does not offer 2K or 4K."
        },
        "seed": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991,
          "description": "Optional integer generation seed from 0 to 9007199254740991. Omit for a random seed."
        }
      }
    },
    "MinimaxH3VideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "`images` cannot be combined with any `reference_*` input. An audio reference also requires at least one reference image or video. The legacy/Fast contract exposes 768P and 2K.",
      "properties": {
        "model": {
          "type": "string",
          "const": "minimax-h3",
          "description": "Must be `minimax-h3`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Video generation instructions."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "description": "One first-frame image or first- and last-frame images as public HTTPS URLs. First and last frames need 768P or 2K.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 9,
          "description": "Public HTTPS image references for multimodal reference generation.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_videos": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "description": "Public HTTPS video references for multimodal reference generation. Available at 768P and 2K only.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_audios": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "description": "Public HTTPS audio references for multimodal reference generation. Audio also requires at least one reference image or video.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 4,
          "maximum": 15,
          "default": 5,
          "description": "Requested output duration in seconds."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "adaptive",
            "21:9",
            "16:9",
            "4:3",
            "1:1",
            "3:4",
            "9:16"
          ],
          "description": "Text mode defaults to 16:9 and does not accept adaptive. Frame mode always uses adaptive at 768P and 2K. Reference mode defaults to adaptive and also accepts a concrete ratio."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "768P",
            "2K"
          ],
          "default": "768P",
          "description": "Output resolution tier. The legacy/Fast H3 contract exposes 768P and 2K."
        }
      }
    },
    "Seedance25VideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "`images` cannot be combined with any `reference_*` input. Audio-only reference generation is supported. `task_type` `edit` and `extend` need a video in `reference_videos`; `edit` takes no `duration`, and neither takes an `aspect_ratio` other than `adaptive`.",
      "properties": {
        "model": {
          "type": "string",
          "const": "seedance-2.5",
          "description": "Must be `seedance-2.5`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Video generation instructions."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "description": "One first-frame image or first- and last-frame images as public HTTPS URLs.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 30,
          "description": "Public HTTPS image references for multimodal reference generation.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_videos": {
          "type": "array",
          "minItems": 1,
          "maxItems": 10,
          "description": "Public HTTPS video references for multimodal reference generation.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_audios": {
          "type": "array",
          "minItems": 1,
          "maxItems": 10,
          "description": "Public HTTPS audio references. Audio-only reference generation is supported.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 4,
          "maximum": 30,
          "default": 5,
          "description": "Requested output duration in seconds."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "adaptive",
            "21:9",
            "16:9",
            "4:3",
            "1:1",
            "3:4",
            "9:16"
          ],
          "default": "adaptive",
          "description": "Output video aspect ratio."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "480p",
            "720p",
            "1080p"
          ],
          "default": "720p",
          "description": "Output resolution tier. 480p and 1080p are priced separately; see the pricing page."
        },
        "generate_audio": {
          "type": "boolean",
          "default": true,
          "description": "Generate synchronized audio with the video."
        },
        "seed": {
          "type": "integer",
          "minimum": -1,
          "maximum": 4294967295,
          "default": -1,
          "description": "Reproducibility seed. Use -1 for a random seed."
        },
        "task_type": {
          "type": "string",
          "enum": [
            "auto",
            "reference",
            "edit",
            "extend"
          ],
          "description": "What `reference_videos` are for. `reference` makes a new video from them; `edit` edits one of them and keeps its length and aspect ratio, so leave `duration` and `aspect_ratio` out; `extend` continues one and keeps its aspect ratio. Leave it out to let the model decide from the prompt."
        },
        "output_format": {
          "type": "string",
          "enum": [
            "mp4",
            "mov"
          ],
          "default": "mp4",
          "description": "Output video file format. The price is the same for either."
        }
      }
    },
    "Seedance2FastVideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "`images` cannot be combined with any `reference_*` input. An audio reference also requires at least one reference image or video.",
      "properties": {
        "model": {
          "type": "string",
          "const": "seedance-2-fast",
          "description": "Must be `seedance-2-fast`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Video generation instructions."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "description": "One first-frame image or first- and last-frame images as public HTTPS URLs.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 9,
          "description": "Public HTTPS image references for multimodal reference generation.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_videos": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "description": "Public HTTPS video references for multimodal reference generation.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_audios": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "description": "Public HTTPS audio references. Audio also requires at least one reference image or video.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 4,
          "maximum": 15,
          "default": 5,
          "description": "Requested output duration in seconds."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "adaptive",
            "21:9",
            "16:9",
            "4:3",
            "1:1",
            "3:4",
            "9:16"
          ],
          "default": "adaptive",
          "description": "Output video aspect ratio."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "480p",
            "720p"
          ],
          "default": "720p",
          "description": "Output resolution tier."
        },
        "generate_audio": {
          "type": "boolean",
          "default": true,
          "description": "Generate synchronized audio with the video."
        }
      }
    },
    "Seedance2MiniVideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "Low-cost Seedance 2.0 route. `images` cannot be combined with any `reference_*` input. Generated audio is not supported.",
      "properties": {
        "model": {
          "type": "string",
          "const": "seedance-2-mini",
          "description": "Must be `seedance-2-mini`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Video generation instructions."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "description": "One first-frame image or first- and last-frame images as public HTTPS URLs.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 9,
          "description": "Public HTTPS image references for multimodal reference generation.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_videos": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "description": "Public HTTPS video references for multimodal reference generation.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_audios": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "description": "Public HTTPS audio references. Audio also requires at least one reference image or video.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 4,
          "maximum": 15,
          "default": 5,
          "description": "Requested output duration in seconds."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "adaptive",
            "21:9",
            "16:9",
            "4:3",
            "1:1",
            "3:4",
            "9:16"
          ],
          "default": "adaptive",
          "description": "Output video aspect ratio."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "480p",
            "720p"
          ],
          "default": "720p",
          "description": "Output resolution tier."
        }
      }
    },
    "Seedance2VideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "`images` cannot be combined with any `reference_*` input. An audio reference also requires at least one reference image or video.",
      "properties": {
        "model": {
          "type": "string",
          "const": "seedance-2",
          "description": "Must be `seedance-2`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Video generation instructions."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "description": "One first-frame image or first- and last-frame images as public HTTPS URLs.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 9,
          "description": "Public HTTPS image references for multimodal reference generation.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_videos": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "description": "Public HTTPS video references for multimodal reference generation.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_audios": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "description": "Public HTTPS audio references. Audio also requires at least one reference image or video.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 4,
          "maximum": 15,
          "default": 5,
          "description": "Requested output duration in seconds."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "adaptive",
            "21:9",
            "16:9",
            "4:3",
            "1:1",
            "3:4",
            "9:16"
          ],
          "default": "adaptive",
          "description": "Output video aspect ratio."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "480p",
            "720p",
            "1080p",
            "4k",
            "4K"
          ],
          "default": "720p",
          "description": "Output resolution tier. 4k and 4K are equivalent. 1080p is not supported with reference images."
        },
        "generate_audio": {
          "type": "boolean",
          "default": true,
          "description": "Generate synchronized audio with the video."
        }
      }
    },
    "Veo31ReferenceVideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt",
        "reference_images"
      ],
      "description": "Veo 3.1 reference-image generation. Output is fixed at 8 seconds and\nsupports the Fast or Lite tier, defaulting to Fast at 720p. Price depends\non quality and resolution.\n",
      "properties": {
        "model": {
          "type": "string",
          "const": "veo-3.1",
          "description": "Must be `veo-3.1`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Video generation instructions."
        },
        "reference_images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "description": "Public HTTPS reference images.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "16:9",
            "9:16",
            "auto"
          ],
          "default": "16:9",
          "description": "Output video aspect ratio."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "720p",
            "1080p",
            "4k",
            "4K"
          ],
          "default": "720p",
          "description": "Output video resolution. 4k and 4K are equivalent. Price depends on quality and resolution."
        },
        "quality": {
          "type": "string",
          "enum": [
            "Fast",
            "Lite"
          ],
          "default": "Fast",
          "description": "Reference-image generation tier."
        },
        "watermark": {
          "type": "string",
          "description": "Optional watermark text forwarded to the selected model."
        },
        "enable_translation": {
          "type": "boolean",
          "description": "Allow prompt translation before generation."
        }
      }
    },
    "Veo31TextOrFrameVideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "Veo 3.1 text or first/last-frame generation. Output is fixed at 8 seconds\nand defaults to Quality at 720p. Price depends on quality and resolution.\n",
      "properties": {
        "model": {
          "type": "string",
          "const": "veo-3.1",
          "description": "Must be `veo-3.1`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Video generation instructions."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "description": "One first-frame image or first- and last-frame images as public HTTPS URLs.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "16:9",
            "9:16",
            "auto"
          ],
          "default": "16:9",
          "description": "Output video aspect ratio."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "720p",
            "1080p",
            "4k",
            "4K"
          ],
          "default": "720p",
          "description": "Output video resolution. 4k and 4K are equivalent. Price depends on quality and resolution."
        },
        "quality": {
          "type": "string",
          "enum": [
            "Quality",
            "Fast",
            "Lite"
          ],
          "default": "Quality",
          "description": "Text or frame generation tier."
        },
        "watermark": {
          "type": "string",
          "description": "Optional watermark text forwarded to the selected model."
        },
        "enable_translation": {
          "type": "boolean",
          "description": "Allow prompt translation before generation."
        }
      }
    },
    "Veo31VideoRequest": {
      "allOf": [
        {
          "oneOf": [
            {
              "$ref": "#/$defs/Veo31TextOrFrameVideoRequest"
            },
            {
              "$ref": "#/$defs/Veo31ReferenceVideoRequest"
            }
          ]
        }
      ]
    },
    "Wan30PrimeVideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "Renders 4–30 seconds in a single pass. `images` starts the render from a picture; reference videos and audio travel alongside it.",
      "properties": {
        "model": {
          "type": "string",
          "const": "wan-3.0-prime",
          "description": "Must be `wan-3.0-prime`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Video generation instructions."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 10,
          "description": "Public HTTPS images. One starts an image-to-video render; more are used as visual references.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_videos": {
          "type": "array",
          "minItems": 1,
          "maxItems": 5,
          "description": "Public HTTPS video references. A request that carries one is billed at 1.5x.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_audios": {
          "type": "array",
          "minItems": 1,
          "maxItems": 5,
          "description": "Public HTTPS audio references.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 4,
          "maximum": 30,
          "default": 5,
          "description": "Requested output duration in seconds. Any whole number in range; there is no long-clip surcharge."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "16:9",
            "9:16",
            "1:1",
            "4:3",
            "3:4"
          ],
          "default": "16:9",
          "description": "Output video aspect ratio."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "480p",
            "720p",
            "1080p"
          ],
          "default": "720p",
          "description": "Output resolution tier. Price scales with it."
        }
      }
    },
    "Wan30VideoRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "prompt"
      ],
      "description": "Renders 2–30 seconds in a single pass. `images` starts the render from a picture; reference videos and audio travel alongside it.",
      "properties": {
        "model": {
          "type": "string",
          "const": "wan-3.0",
          "description": "Must be `wan-3.0`."
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Video generation instructions."
        },
        "images": {
          "type": "array",
          "minItems": 1,
          "maxItems": 10,
          "description": "Public HTTPS images. One starts an image-to-video render; more are used as visual references.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_videos": {
          "type": "array",
          "minItems": 1,
          "maxItems": 5,
          "description": "Public HTTPS video references. Their seconds, rounded up, are billed with the output seconds at the same rate.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "reference_audios": {
          "type": "array",
          "minItems": 1,
          "maxItems": 5,
          "description": "Public HTTPS audio references.",
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "duration": {
          "type": "integer",
          "minimum": 2,
          "maximum": 30,
          "default": 5,
          "description": "Requested output duration in seconds. Any whole number in range; there is no long-clip surcharge."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "16:9",
            "9:16",
            "1:1",
            "4:3",
            "3:4"
          ],
          "default": "16:9",
          "description": "Output video aspect ratio."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "480p",
            "720p",
            "1080p"
          ],
          "default": "720p",
          "description": "Output resolution tier. Price scales with it."
        }
      }
    }
  }
}