{
  "name": "gen-digital-human",
  "toolName": "gen_digital_human",
  "tier": "atomic",
  "category": "asset",
  "title": "Digital-Human Talking-Head",
  "description": "Digital-human video: list available avatars; produce a talking-head video from text via TTS, or drive an avatar from an existing audio URL.",
  "auth": "required",
  "joinsTake": true,
  "envVars": [
    "PRIV_TOKEN",
    "MM_API_BASE_URL",
    "AGENT_NAME"
  ],
  "entry": {
    "type": "http",
    "handler": "gen-digital-human"
  },
  "parameters": {
    "type": "object",
    "properties": {
      "list_avatars": {
        "type": "boolean",
        "description": "List available digital-human avatars"
      },
      "mine": {
        "type": "boolean",
        "description": "With list_avatars=true: list the caller's own custom avatars instead of the public catalog. Custom avatars do not appear without this."
      },
      "name": {
        "type": "string",
        "description": "With list_avatars=true: fuzzy-filter avatars by name"
      },
      "source": {
        "type": "string",
        "enum": [
          "jimeng",
          "hifly"
        ],
        "description": "Provider: jimeng is image-driven, hifly is video-driven. Usually inferred from the avatar; pass it explicitly when the avatar declares no source."
      },
      "gender": {
        "type": "string",
        "enum": [
          "male",
          "female"
        ],
        "description": "Filter by gender"
      },
      "avatar_id": {
        "type": "number",
        "description": "Avatar id"
      },
      "text": {
        "type": "string",
        "description": "Narration text (TTS mode)"
      },
      "audio_url": {
        "type": "string",
        "description": "Audio URL (audio-driven mode)"
      },
      "voice_id": {
        "type": "string",
        "description": "Voice id (TTS mode). Shares the Minimax catalog with gen-voice — call gen_voice with list_voices=true to see available ids rather than inventing one."
      },
      "voice_name": {
        "type": "string",
        "description": "Voice display name, recorded alongside voice_id for bookkeeping. Does not affect synthesis."
      },
      "aspect_ratio": {
        "type": "string",
        "description": "Aspect ratio: 9:16 / 16:9 / 3:4 / 1:1. Defaults to the avatar's own ratio."
      },
      "prompt": {
        "type": "string",
        "description": "Action prompt describing how the avatar should perform, e.g. 'more hand gestures'"
      },
      "check_status": {
        "type": "boolean",
        "description": "Status-check mode: poll an earlier job instead of starting a new one. Requires generation_id. Use this when a generate call timed out."
      },
      "generation_id": {
        "type": "number",
        "description": "Job id to poll (required when check_status=true)"
      },
      "json_output": {
        "type": "boolean",
        "description": "Emit a JSON result (generate: { url, generationId }; list: { avatars }; check-status: { status, url }) instead of human-readable output"
      }
    },
    "required": []
  },
  "ui": {
    "primary": [
      "avatar_id",
      "text"
    ],
    "advanced": [
      "source",
      "voice_id",
      "aspect_ratio",
      "prompt",
      "audio_url"
    ],
    "hidden": [
      "json_output",
      "list_avatars",
      "mine",
      "name",
      "gender",
      "check_status",
      "generation_id",
      "voice_name"
    ]
  }
}
