{
 "openapi": "3.0.3",
 "info": {
  "title": "Video to audio (foley) (commercial): HunyuanVideo-Foley",
  "version": "2026-11-21",
  "description": "Curated ZeroGPU tool from the ZeroGPU lineup catalog. Calls go straight to the upstream Space tencent/HunyuanVideo-Foley; send your own HF token as a bearer token so the call uses your ZeroGPU quota."
 },
 "servers": [
  {
   "url": "https://tencent-hunyuanvideo-foley.hf.space"
  }
 ],
 "x-zerogpu": {
  "category": "Music and sound",
  "slot": "Video to audio (foley)",
  "need": "Add synchronized sound to silent generated video.",
  "role": "commercial",
  "space": "tencent/HunyuanVideo-Foley",
  "space_url": "https://huggingface.co/spaces/tencent/HunyuanVideo-Foley",
  "model": "HunyuanVideo-Foley",
  "license": "Tencent Hunyuan Community (excludes EU, UK, KR)",
  "license_class": "cond",
  "gpu_seconds_booked": "120",
  "notes": "Best semantic match in published comparisons. Errors come back as status text.",
  "caveats": "",
  "lineup_call": "/process_inference(video_file, text_prompt, neg_prompt, guidance_scale=4.5, inference_steps=50, sample_nums=1) \u2192 videos, status",
  "api_style": "v1"
 },
 "components": {
  "securitySchemes": {
   "hfToken": {
    "type": "http",
    "scheme": "bearer",
    "description": "Your own Hugging Face token (read scope is enough). It is sent only to the upstream Space and bills that call to your account's ZeroGPU quota. Without it the call runs on the small anonymous quota."
   }
  },
  "schemas": {}
 },
 "paths": {
  "/gradio_api/call/process_inference": {
   "post": {
    "description": "Add synchronized sound to silent generated video. Step 1 of 2: returns {\"event_id\"}; then GET /gradio_api/call/process_inference/{event_id} reads an SSE stream whose `event: complete` data is the JSON output array (`event: error` on failure). Upstream: https://huggingface.co/spaces/tencent/HunyuanVideo-Foley. License: Tencent Hunyuan Community (excludes EU, UK, KR). \n\nUpstream description: \nReturns, in order: Sample 1: dict(video: filepath, subtitles: filepath | None); Sample 2: dict(video: filepath, subtitles: filepath | None); Sample 3: dict(video: filepath, subtitles: filepath | None); Sample 4: dict(video: filepath, subtitles: filepath | None); Sample 5: dict(video: filepath, subtitles: filepath | None); Sample 6: dict(video: filepath, subtitles: filepath | None); Status: str",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "data"
        ],
        "properties": {
         "data": {
          "type": "array",
          "minItems": 3,
          "maxItems": 6,
          "items": {},
          "description": "Positional inputs, in this order:\n0. video_file: dict(video: filepath, subtitles: filepath | None) (required)\n1. text_prompt: str (required)\n2. neg_prompt: str (required)\n3. guidance_scale: float (default 4.5)\n4. inference_steps: float (default 50)\n5. sample_nums: float (default 1)"
         }
        }
       }
      }
     }
    },
    "x-gradio-parameters": [
     {
      "name": "video_file",
      "schema": {
       "properties": {
        "video": {
         "description": "The FileData class is a subclass of the GradioModel class that represents a file object within a Gradio interface. It is used to store file data and metadata when a file is uploaded.\n\nAttributes:\n    path: The server file path where the file is stored.\n    url: The normalized server URL pointing to the file.\n    size: The size of the file in bytes.\n    orig_name: The original filename before upload.\n    mime_type: The MIME type of the file.\n    is_stream: Indicates whether the file is a stream.\n    meta: Additional metadata used internally (should not be changed).",
         "properties": {
          "path": {
           "title": "Path",
           "type": "string"
          },
          "url": {
           "type": "string",
           "default": null,
           "title": "Url",
           "nullable": true
          },
          "size": {
           "type": "integer",
           "default": null,
           "title": "Size",
           "nullable": true
          },
          "orig_name": {
           "type": "string",
           "default": null,
           "title": "Orig Name",
           "nullable": true
          },
          "mime_type": {
           "type": "string",
           "default": null,
           "title": "Mime Type",
           "nullable": true
          },
          "is_stream": {
           "default": false,
           "title": "Is Stream",
           "type": "boolean"
          },
          "meta": {
           "properties": {
            "_type": {
             "title": "Type",
             "type": "string",
             "enum": [
              "gradio.FileData"
             ]
            }
           },
           "required": [
            "_type"
           ],
           "title": "FileDataMeta",
           "type": "object"
          }
         },
         "required": [
          "path"
         ],
         "title": "FileData",
         "type": "object"
        },
        "subtitles": {
         "description": "The FileData class is a subclass of the GradioModel class that represents a file object within a Gradio interface. It is used to store file data and metadata when a file is uploaded.\n\nAttributes:\n    path: The server file path where the file is stored.\n    url: The normalized server URL pointing to the file.\n    size: The size of the file in bytes.\n    orig_name: The original filename before upload.\n    mime_type: The MIME type of the file.\n    is_stream: Indicates whether the file is a stream.\n    meta: Additional metadata used internally (should not be changed).",
         "properties": {
          "path": {
           "title": "Path",
           "type": "string"
          },
          "url": {
           "type": "string",
           "default": null,
           "title": "Url",
           "nullable": true
          },
          "size": {
           "type": "integer",
           "default": null,
           "title": "Size",
           "nullable": true
          },
          "orig_name": {
           "type": "string",
           "default": null,
           "title": "Orig Name",
           "nullable": true
          },
          "mime_type": {
           "type": "string",
           "default": null,
           "title": "Mime Type",
           "nullable": true
          },
          "is_stream": {
           "default": false,
           "title": "Is Stream",
           "type": "boolean"
          },
          "meta": {
           "properties": {
            "_type": {
             "title": "Type",
             "type": "string",
             "enum": [
              "gradio.FileData"
             ]
            }
           },
           "required": [
            "_type"
           ],
           "title": "FileDataMeta",
           "type": "object"
          }
         },
         "required": [
          "path"
         ],
         "title": "FileData",
         "type": "object",
         "default": null,
         "nullable": true
        }
       },
       "required": [
        "video"
       ],
       "title": "VideoData",
       "type": "object",
       "additional_description": null
      },
      "required": true,
      "default": null
     },
     {
      "name": "text_prompt",
      "schema": {
       "type": "string"
      },
      "required": true,
      "default": null
     },
     {
      "name": "neg_prompt",
      "schema": {
       "type": "string"
      },
      "required": true,
      "default": null
     },
     {
      "name": "guidance_scale",
      "schema": {
       "type": "number",
       "description": "numeric value between 1.0 and 10.0"
      },
      "required": false,
      "default": 4.5
     },
     {
      "name": "inference_steps",
      "schema": {
       "type": "number",
       "description": "numeric value between 10 and 100"
      },
      "required": false,
      "default": 50
     },
     {
      "name": "sample_nums",
      "schema": {
       "type": "number",
       "description": "numeric value between 1 and 6"
      },
      "required": false,
      "default": 1
     }
    ],
    "operationId": "music_video_to_audio_foley_commercial",
    "tags": [
     "Music and sound"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ],
    "summary": "Video to audio (foley) (commercial): HunyuanVideo-Foley",
    "responses": {
     "200": {
      "description": "Job accepted.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "event_id"
         ],
         "properties": {
          "event_id": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/gradio_api/call/process_inference/{event_id}": {
   "get": {
    "summary": "Read the result stream for /process_inference",
    "description": "Server-sent events. The final `event: complete` carries a JSON array of outputs; `event: error` means the call failed.",
    "parameters": [
     {
      "name": "event_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "SSE stream",
      "content": {
       "text/event-stream": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "operationId": "music_video_to_audio_foley_commercial_result",
    "tags": [
     "Music and sound"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ]
   }
  }
 }
}