1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const axios = require('axios');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/hunyuan-video";
const data = {
"seed": 96501778,
"width": 854,
"height": 480,
"prompt": "A cat walks on the grass, realistic style.",
"flow_shift": 7,
"infer_steps": 40,
"video_length": 77,
"negative_prompt": "Aerial view, overexposed, low quality, deformation",
"embedded_guidance_scale": 6
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();
Random seed for reproducibility.
Width of the video in pixels.
min : 1,
max : 1280
Height of the video in pixels.
min : 1,
max : 1280
Text prompt to generate video.
Flow-shift parameter.
min : 1,
max : 15
Number of inference steps.
min : 1,
max : 70
Length of the video in frames.
min : 1,
max : 129
Text prompt to specify what you don't want in the video.
Embedded guidance scale for generation.
min : 1,
max : 10
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Hunyuan AI Video is a new, state of the art, AI Video Generator that creates high-quality videos from text descriptions. With 13B parameters and state-of-the-art performance, it's the most powerful open-source video generation model available.
AI-Powered Video Generation: Hunyuan Video utilizes cutting-edge AI technology to generate videos based on user prompts, ensuring that each video is unique and tailored to specific themes or styles.
Seamless Character Actions: The platform's sophisticated prompt understanding guarantees consistent character movements and actions throughout the video, enhancing viewer engagement and storytelling.
Versatile Content Creation: Users can create a wide range of video types, from dance routines to creative transitions, all generated from a single prompt. This versatility makes it ideal for content creators looking to capitalize on trending formats.
Social Media Influencers: Perfect for influencers looking to enhance their online presence with captivating video content.
Marketers: Ideal for brands aiming to create impactful marketing campaigns through engaging visual storytelling.
Content Creators: A valuable tool for creators who need quick and effective video solutions for various platforms