HunyuanVideo Foley API

hunyuan-video-foley
Designed for scalability, it streamlines audio production across film, gaming, and social media content.
Output
$0.01 / sec
Released
Nov 24, 2025

Overview

HunyuanVideo Foley API Description

HunyuanVideo-Foley is a powerful AI model that generates realistic sound effects straight from video. Created by Tencent, it eliminates the need for manual Foley work by automatically producing audio that matches motion, timing, and scene context.

Instead of treating audio as a separate step, the model builds it directly into the video experience. The output feels aligned, responsive, and ready to use, whether you're working on short-form content or full-scale production.

Technical Specifications

Feature Description Value
Input Types Video + optional text prompts Multimodal
Output Foley audio (sound effects, ambience, music) 48kHz audio
Architecture Multimodal diffusion transformer Advanced
Synchronization Frame-level alignment High precision
Deployment Local inference + web UI (Gradio) Flexible

Performance Benchmarks

In comprehensive benchmarks including Kling-Audio-Eval, VGGSound-Test, and MovieGen-Audio-Bench, HunyuanVideo Foley consistently outperforms competitors like FoleyCrafter, MMAudio, V-AURA, and ThinkSound.

Benchmark Results

It consistently leads in audio fidelity, semantic alignment between visuals and sound, temporal synchronization, and distribution matching metrics, outperforming all well-known open-source models in these areas. According to both objective evaluations and professional human assessments. The model showcases robust and stable performance across a wide variety of video content and audio scenarios, confirming its reliability in diverse real-world applications.

Model Performance

API Pricing

  • $0.013 per second.

Core Technology Behind the Model

Multimodal Diffusion Architecture

At the heart of HunyuanVideo-Foley lies a diffusion-based transformer that operates across multiple modalities. It encodes video frames into structured representations, aligns them with optional textual prompts, and generates audio through a latent diffusion process.

This architecture enables the model to maintain both acoustic realism and semantic coherence, ensuring that generated sounds match not just what is visible, but what is happening.

Temporal Alignment Mechanism

One of the defining features of the model is its ability to synchronize sound with visual events at a fine-grained level. Rather than producing loosely aligned audio, it captures timing details such as motion speed, impact moments, and environmental transitions.

This precision is especially noticeable in scenes involving physical interaction, where even slight desynchronization would break immersion.

Representation Alignment Strategy

To maintain consistency across modalities, the model uses a dedicated alignment framework that harmonizes visual, textual, and audio embeddings. This reduces common issues like mismatched sound cues or overly dominant audio patterns, resulting in a more balanced and believable output.

Capabilities in Practice

From Silent Video to Full Soundscape

The model accepts raw video as input and can optionally incorporate textual descriptions to guide the output. It then produces a continuous audio track that includes environmental sounds, interactions, and subtle background elements.

In a simple walking scene, for example, it does not just generate footsteps, it also introduces ambient noise, surface-dependent variations, and spatial depth, creating a richer auditory experience.

Adaptability Across Content Types

HunyuanVideo-Foley performs well across a wide range of visual domains. It can handle cinematic footage, animated sequences, and user-generated content with minimal adjustments. This flexibility makes it suitable for both high-end production and rapid prototyping workflows.

Generation Code Sample

Output Code Sample

Rethinking Foley Production

Traditional Foley production is labor-intensive, often requiring dedicated recording sessions, specialized equipment, and extensive post-processing. HunyuanVideo-Foley streamlines this process into a single inference step, dramatically reducing turnaround time.

Instead of manually crafting each sound layer, creators can focus on refining the overall experience, using the model as a foundation rather than a replacement for creativity.

Stage Traditional Approach HunyuanVideo-Foley
Sound Creation Manual recording Automated generation
Editing Time Extensive Minimal
Expertise Needed High Moderate
Scalability Limited High

Strengths and Practical Considerations

HunyuanVideo-Foley stands out for its ability to produce synchronized, high-quality audio that feels organically tied to visual content. Its multimodal design allows it to capture subtle contextual cues, making outputs more expressive than those generated by rule-based or library-driven systems.

At the same time, performance depends on input quality and computational resources. Complex scenes may require more processing time, and achieving precise creative control can involve iterative refinement, especially when combining video and text inputs.

‍

Use cases

  • Short and social video creation
  • Film and TV post-production sound design
  • Marketing and advertising video audio enhancement
  • Immersive audio for game development
  • Automated dubbing and Foley replacement

‍

How to use HunyuanVideo Foley API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to hunyuan-video-foley.
import requests, time

headers = {"Authorization": "Bearer " + AIMLAPI_KEY}
job = requests.post(
    "https://api.aimlapi.com/v2/video/generations",
    headers=headers,
    json={
      "model": "hunyuan-video-foley",
      "prompt": "A serene timelapse of clouds over a mountain range"
    },
).json()
gid = job["id"]

while True:
    res = requests.get(f"https://api.aimlapi.com/v2/video/generations?generation_id={gid}", headers=headers).json()
    if res.get("status") in ("completed", "error"):
        break
    time.sleep(5)
print(res["video"]["url"])
const headers = {
  Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
  "Content-Type": "application/json",
};
const job = await (await fetch("https://api.aimlapi.com/v2/video/generations", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "model": "hunyuan-video-foley",
    "prompt": "A serene timelapse of clouds over a mountain range"
  }),
})).json();

let res;
do {
  await new Promise((r) => setTimeout(r, 5000));
  res = await (await fetch(`https://api.aimlapi.com/v2/video/generations?generation_id=${job.id}`, { headers })).json();
} while (!["completed", "error"].includes(res.status));
console.log(res.video.url);
# submit the generation — the response contains the job "id"
curl -X POST https://api.aimlapi.com/v2/video/generations \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"hunyuan-video-foley","prompt":"A serene timelapse of clouds over a mountain range"}'

# then poll until status is "completed" — video.url holds the result
curl "https://api.aimlapi.com/v2/video/generations?generation_id={id}" -H "Authorization: Bearer $AIMLAPI_KEY"

OpenAI-compatible — swap the base URL and it works with your existing SDK.

HunyuanVideo Foley API Pricing

TypePrice
Output
$0.01 / sec

HunyuanVideo Foley vs other models

ModelInputOutputContextBest for
$0.01 / sec
Video generation
$0.2 / sec (variable)
Video generation
$1.95 / 1M tokens
$0.10136 / sec
Video generation
$0.0711 / sec
Cinematic video + native audio

Frequently asked questions

HunyuanVideo Foley takes image, text, video as input and returns video.

HunyuanVideo Foley is priced at $0.013 / sec.

HunyuanVideo Foley is billed per generation — a fixed charge per output rather than by prompt length.

Yes, HunyuanVideo Foley accepts image input as well as a text prompt.

HunyuanVideo Foley was built by Tencent.

Use hunyuan-video-foley as the model id on AI/ML API.

Yes. HunyuanVideo Foley is served through AI/ML API, so the same key and endpoint format used for other models applies.

No. It generates synchronized foley audio for existing video rather than producing new video content.

It generates realistic sound effects synchronized with the video's content.

Start building with HunyuanVideo Foley

Get API Key
1000+ models, one API.