{
  "name": "gen-video",
  "toolName": "gen_video",
  "tier": "atomic",
  "category": "asset",
  "title": "AI Video Generation",
  "description": "AI video generation: produce a short video clip from a text prompt. Three Seedance 2.0 tiers (mini / fast / standard), plus first/last frame and reference images.",
  "auth": "required",
  "joinsTake": true,
  "envVars": [
    "PRIV_TOKEN",
    "MM_API_BASE_URL",
    "AGENT_NAME",
    "MM_VIDEO_MODEL"
  ],
  "entry": {
    "type": "http",
    "handler": "gen-video"
  },
  "parameters": {
    "type": "object",
    "properties": {
      "prompt": {
        "type": "string",
        "description": "Video description"
      },
      "model": {
        "type": "string",
        "description": "Model: 'seedance-mini' (default; cheapest, 480p/720p), 'seedance-fast' (480p/720p), or 'seedance' (Seedance 2.0, adds 1080p). All are 4-15s and share the same features"
      },
      "duration": {
        "type": "number",
        "description": "Duration in seconds"
      },
      "ratio": {
        "type": "string",
        "description": "Aspect ratio"
      },
      "resolution": {
        "type": "string",
        "description": "Resolution"
      },
      "first_frame": {
        "type": "string",
        "description": "First-frame image path or URL"
      },
      "last_frame": {
        "type": "string",
        "description": "Last-frame image path or URL"
      },
      "reference": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Reference images: local file path, https URL, or data URI. Up to 9; combinable with first_frame / last_frame."
      },
      "reference_video": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Reference videos (https URL only, must be publicly reachable). Up to 3. The model borrows their subject, camera work and style. Cannot be combined with first_frame / last_frame."
      },
      "reference_audio": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Reference audio (https URL only, must be publicly reachable). Up to 3. Borrows timbre, melody or dialogue. Needs at least one reference image or video alongside it; cannot be combined with first_frame / last_frame."
      },
      "web_search": {
        "type": "boolean",
        "description": "Let the model search the web for up-to-date subjects before generating. Text-only input — ignored once any image / video / audio is attached."
      },
      "return_last_frame": {
        "type": "boolean",
        "description": "Also return the generated clip's last frame, to chain it into the next shot"
      },
      "generate_audio": {
        "type": "boolean",
        "description": "Generate native audio"
      },
      "camera_fixed": {
        "type": "boolean",
        "description": "Lock the camera in place (Seedance)"
      },
      "negative_prompt": {
        "type": "string",
        "description": "Content to steer away from. Veo only — Seedance ignores it (kept for when a Veo channel is available again)"
      },
      "seed": {
        "type": "number",
        "description": "Random seed, -1 for random. Pass the same seed with the same prompt and model to make a run reproducible."
      },
      "person_generation": {
        "type": "string",
        "enum": [
          "allow_all",
          "dont_allow"
        ],
        "description": "Whether the model may render people (Veo). Omit to use the backend default."
      },
      "json_output": {
        "type": "boolean",
        "description": "Emit a JSON result ({ url }) instead of human-readable output"
      }
    },
    "required": [
      "prompt"
    ]
  },
  "ui": {
    "primary": [
      "prompt",
      "model",
      "duration",
      "ratio",
      "resolution"
    ],
    "advanced": [
      "first_frame",
      "last_frame",
      "reference",
      "reference_video",
      "reference_audio",
      "generate_audio",
      "camera_fixed",
      "web_search",
      "return_last_frame",
      "seed"
    ],
    "hidden": [
      "json_output",
      "negative_prompt",
      "person_generation"
    ]
  }
}
