1const axios = require('axios');
2
3
4const api_key = "YOUR API-KEY";
5const url = "https://api.segmind.com/v1/hunyuan-video";
6
7const data = {
8 "seed": 96501778,
9 "width": 854,
10 "height": 480,
11 "prompt": "A cat walks on the grass, realistic style.",
12 "flow_shift": 7,
13 "infer_steps": 40,
14 "video_length": 77,
15 "negative_prompt": "Aerial view, overexposed, low quality, deformation",
16 "embedded_guidance_scale": 6
17};
18
19(async function() {
20 try {
21 const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
22 console.log(response.data);
23 } catch (error) {
24 console.error('Error:', error.response.data);
25 }
26})();
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