Hunyuan Video

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.


API

If you're looking for an API, you can choose from your desired programming language.

POST
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 27 28 29 30 31 32 33 34 35 import requests import base64 # Use this function to convert an image file from the filesystem to base64 def image_file_to_base64(image_path): with open(image_path, 'rb') as f: image_data = f.read() return base64.b64encode(image_data).decode('utf-8') # Use this function to fetch an image from a URL and convert it to base64 def image_url_to_base64(image_url): response = requests.get(image_url) image_data = response.content return base64.b64encode(image_data).decode('utf-8') api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/hunyuan-video" # Request payload 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 } headers = {'x-api-key': api_key} response = requests.post(url, json=data, headers=headers) print(response.content) # The response is the generated image
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


seedint ( default: 96501778 )

Random seed for reproducibility.


widthint ( default: 854 )

Width of the video in pixels.

min : 1,

max : 1280


heightint ( default: 480 )

Height of the video in pixels.

min : 1,

max : 1280


promptstr *

Text prompt to generate video.


flow_shiftfloat ( default: 7 )

Flow-shift parameter.

min : 1,

max : 15


infer_stepsint ( default: 40 )

Number of inference steps.

min : 1,

max : 70


video_lengthint ( default: 77 )

Length of the video in frames.

min : 1,

max : 129


negative_promptstr ( default: Aerial view, overexposed, low quality, deformation )

Text prompt to specify what you don't want in the video.


embedded_guidance_scaleint ( default: 6 )

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 Video

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.

Key Features of Hunyuan Video

  • 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.

Applications of Hunyuan Video

  • 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