{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tellers-ai/json-schema/tellers-ai-generate-video-request-schema.json",
  "title": "GenerateVideoRequest",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tellers-ai-openapi.json#/components/schemas/GenerateVideoRequest",
  "properties": {
    "prompt": {
      "type": "string",
      "title": "Prompt",
      "description": "Text prompt describing the video to generate."
    },
    "model": {
      "type": "string",
      "enum": [
        "p-video",
        "p-video-2",
        "kling",
        "kling-pro",
        "kling-4",
        "runway",
        "wan",
        "ltx",
        "seedance",
        "minimax-h3-max"
      ],
      "title": "Model",
      "description": "Model to use.",
      "default": "p-video"
    },
    "format": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "16:9",
            "9:16"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Format",
      "description": "Aspect ratio. Defaults to 16:9. Left unset so an explicit choice can be told from the default — a model that would ignore it rejects it rather than silently producing another shape."
    },
    "resolution": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "480p",
            "720p",
            "768p",
            "1080p"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Resolution",
      "description": "Output resolution. Supported values vary by model: p-video and kling-4 support 720p/1080p; wan/seedance support 480p/720p; minimax-h3-max supports 480p/768p; kling/runway ignore this field."
    },
    "input_frame": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/$defs/AssetFrameRef"
        },
        {
          "type": "null"
        }
      ],
      "title": "Input Frame",
      "description": "Start (first) frame. An asset id for the default frame, or an object pinning `timestamp_seconds` / `is_last_frame`."
    },
    "output_frame": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/$defs/AssetFrameRef"
        },
        {
          "type": "null"
        }
      ],
      "title": "Output Frame",
      "description": "End (last) frame. An asset id for the default frame, or an object pinning `timestamp_seconds` / `is_last_frame`. Not every model accepts an end frame — see GET /tools/models."
    },
    "input_audio": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/$defs/AssetPeriodRef"
        },
        {
          "type": "null"
        }
      ],
      "title": "Input Audio",
      "description": "Audio reference. An asset id for the whole asset, or an object pinning `start_time` / `end_time`. Not every model accepts audio, and only some accept a range — see GET /tools/models."
    },
    "output_path": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Output Path",
      "description": "Where to save the video in the library: a file path ('Folder/name.mp4') or a folder ending with '/' ('Folder/'). Defaults to the model's own folder."
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "prompt"
  ],
  "$defs": {
    "AssetFrameRef": {
      "properties": {
        "asset_id": {
          "type": "string",
          "title": "Asset Id",
          "description": "The asset to take the frame from."
        },
        "timestamp_seconds": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Timestamp Seconds",
          "description": "Which frame to take, in seconds, when the asset is a video. Ignored if `is_last_frame` is true. Defaults to the first frame."
        },
        "is_last_frame": {
          "type": "boolean",
          "title": "Is Last Frame",
          "description": "Take the asset's final frame, ignoring `timestamp_seconds`.",
          "default": false
        },
        "crop": {
          "anyOf": [
            {
              "$ref": "#/$defs/AssetImageCropRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Optional edge insets to crop before sending the frame to a model."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "asset_id"
      ],
      "title": "AssetFrameRef",
      "description": "A single frame of an asset — mirrors the tools' ``AssetFrame``."
    },
    "AssetImageCropRef": {
      "properties": {
        "crop_l": {
          "anyOf": [
            {
              "type": "number",
              "exclusiveMaximum": 1.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Crop L"
        },
        "crop_r": {
          "anyOf": [
            {
              "type": "number",
              "exclusiveMaximum": 1.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Crop R"
        },
        "crop_t": {
          "anyOf": [
            {
              "type": "number",
              "exclusiveMaximum": 1.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Crop T"
        },
        "crop_b": {
          "anyOf": [
            {
              "type": "number",
              "exclusiveMaximum": 1.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Crop B"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "AssetImageCropRef",
      "description": "Optional edge insets — mirrors the tools' ``AssetImageCrop``."
    },
    "AssetPeriodRef": {
      "properties": {
        "asset_id": {
          "type": "string",
          "title": "Asset Id",
          "description": "The asset to take the range from."
        },
        "start_time": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Start Time",
          "description": "Range start in seconds. Defaults to 0."
        },
        "end_time": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "End Time",
          "description": "Range end in seconds. Ignored if `till_the_end` is true. Defaults to the end of the asset."
        },
        "till_the_end": {
          "type": "boolean",
          "title": "Till The End",
          "description": "Extend to the end of the asset, ignoring `end_time`.",
          "default": false
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "asset_id"
      ],
      "title": "AssetPeriodRef",
      "description": "A time range within an asset — mirrors the tools' ``AssetPeriod``."
    }
  }
}