Wan 2.1 480p image to video

Create high-quality 480p videos with excellent visual quality and a broad spectrum of motion from static images.


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 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/wan2.1-i2v-480p" # Request payload data = { "prompt": "A shady looking man in a trench coat glances nervously from side to side. He slowly reaches up to the side of his face and opens it up like a door, revealing a tiny alien inside his head who is piloting him by pulling various levers. The tiny alien is also wearing a trench coat and glances nervously from side to side. Also this entire scene takes place in the bleachers at a rodeo.", "negative_prompt": "blurry, bad quality, camera shake, distortion, poor composition, low resolution, artifact, watermark", "image": image_url_to_base64("https://segmind-resources.s3.amazonaws.com/input/e654c0e4-f048-4450-b289-e37280210c3e-wan-480-ip.png"), # Or use image_file_to_base64("IMAGE_PATH") "seed": 30887452, "video_length": 3, "resolution": 480, "steps": 30, "base64": False } 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


promptstr *

Prompt for video generation


negative_promptstr ( default: blurry, bad quality, camera shake, distortion, poor composition, low resolution, artifact, watermark )

Negative prompt for video generation


imageimage *

Reference image for video generation


seedint ( default: 42424242 )

Seed number for video generation


video_lengthint *

Length of the generated video in seconds

min : 1,

max : 5


resolutionenum:str *

Resolution of the generated video (longest side of the video)

Allowed values:


stepsint ( default: 30 )

Number of steps for video generation

min : 10,

max : 70


base64bool ( default: 1 )

Output as base64

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.

Wan2.1 Image to Video (480p)

Wan2.1 is a cutting-edge video foundation model that excels in image-to-video generation 480p and outperforms existing open-source and state-of-the-art commercial solutions

Key Features of Wan2.1 (480p)

  • SOTA Performance: Consistently outperforms existing open-source and commercial models across multiple benchmarks.

  • Powerful Video VAE: Wan-VAE delivers exceptional efficiency and performance, encoding and decoding 1080P videos of any length while preserving temporal information.

  • Architecture: Designed on the mainstream diffusion transformer paradigm with innovations like a novel spatio-temporal variational autoencoder (VAE).

  • Data: Trained on a vast amount of curated and deduplicated image and video data, processed through a four-step data cleaning process.

Additional Information

  • The models are licensed under the Apache 2.0 License, granting freedom of use while ensuring compliance with the license provisions.

  • The model is capable of generating videos at 720P resolution; however, the results are generally less stable compared to 480P due to limited training at that resolution. It is recommended to use 480P resolution for optimal performance.

  • Extensive manual evaluations confirm that Wan2.1 outperforms both closed-source and open-source models