Input
Configure model parameters
Output
View generated results
Result
Preview, share or download your results with a single click.
Prerequisites
- Create an API Key from the Eachlabs Console
- Install the required dependencies for your chosen language (e.g., requests for Python)
API Integration Steps
1. Create a Prediction
Send a POST request to create a new prediction. This will return a prediction ID that you'll use to check the result. The request should include your model inputs and API key.
import requestsimport timeAPI_KEY = "YOUR_API_KEY" # Replace with your API keyHEADERS = {"X-API-Key": API_KEY,"Content-Type": "application/json"}def create_prediction():response = requests.post("https://api.eachlabs.ai/v1/prediction/",headers=HEADERS,json={"model": "wan-2-1-i2v-720p","version": "0.0.1","input": {"seed": 0,"image": "your image here","prompt": "your prompt here","max_area": "1280x720","fast_mode": "Off","num_frames": 81,"sample_shift": 5,"sample_steps": 30,"frames_per_second": 16,"sample_guide_scale": 5},"webhook_url": ""})prediction = response.json()if prediction["status"] != "success":raise Exception(f"Prediction failed: {prediction}")return prediction["predictionID"]
2. Get Prediction Result
Poll the prediction endpoint with the prediction ID until the result is ready. The API uses long-polling, so you'll need to repeatedly check until you receive a success status.
def get_prediction(prediction_id):while True:result = requests.get(f"https://api.eachlabs.ai/v1/prediction/{prediction_id}",headers=HEADERS).json()if result["status"] == "success":return resultelif result["status"] == "error":raise Exception(f"Prediction failed: {result}")time.sleep(1) # Wait before polling again
3. Complete Example
Here's a complete example that puts it all together, including error handling and result processing. This shows how to create a prediction and wait for the result in a production environment.
try:# Create predictionprediction_id = create_prediction()print(f"Prediction created: {prediction_id}")# Get resultresult = get_prediction(prediction_id)print(f"Output URL: {result['output']}")print(f"Processing time: {result['metrics']['predict_time']}s")except Exception as e:print(f"Error: {e}")
Additional Information
- The API uses a two-step process: create prediction and poll for results
- Response time: ~130 seconds
- Rate limit: 60 requests/minute
- Concurrent requests: 10 maximum
- Use long-polling to check prediction status until completion
Overview
Wan 2.1 I2V 720P is a model designed for generating high-quality videos from images based on textual descriptions. It supports frame-by-frame video generation with various customization options, enabling users to control the number of frames, resolution, sampling methods, and other parameters.
Technical Specifications
Optimization: Fine-tuned for generating smooth, natural-looking animations from static images
Use Case Suitability: Well-suited for animation prototyping, AI-assisted motion generation, and concept visualization
Processing Modes: Multiple settings (Off, Balanced, Fast, Ultra-fast) to optimize speed and quality
Training Data: Trained on high-quality image and motion datasets to ensure realistic frame transitions
Key Considerations
- Wan 2.1 I2V 720P generates longer videos may require higher computation time and may impact consistency between frames.
- Lower sample_steps values can speed up processing but may reduce detail in frames.
- sample_guide_scale and sample_shift can significantly affect output quality; lower values maintain fidelity, while higher values introduce variations.
- fast_mode settings affect processing time and quality trade-offs; use higher speeds only when necessary.
Tips & Tricks
- Optimal Frame Settings: Use num_frames = 81 and frames_per_second = 16 for a good balance between length and smoothness.
- Best Resolution Choice: Stick to 1280x720 or 720x1280 to avoid stretching or cropping artifacts.
- Fine-tuning Sampling: Set sample_steps between 30-40 for detailed output; lower values speed up generation but reduce detail.
- Adjusting Guidance Scale: For subtle refinements, use sample_guide_scale in the range of 4-7. Higher values can lead to exaggerated changes.
- Using Fast Mode: If prioritizing quality, keep fast_mode at Balanced or Off; for quick drafts, Ultra-fast can be used.
- Controlling Variability: sample_shift values between 3-7 offer a balance between stability and diversity in frame transitions.
Capabilities
- with Wan 2.1 I2V 720P, you can convert static images into fluid motion sequences.
- Supports different resolutions and frame rate configurations.
- Provides adjustable sampling and guide settings for better control over the output.
- Wan 2.1 I2V 720P can generate a variety of motion styles depending on input parameters.
What can I use for?
- Animation Prototyping: Creating short animated clips from static images.
- Content Creation: Enhancing illustrations or AI-generated art with movement.
- Concept Visualization: Generating quick motion previews for storytelling or presentations.
- AI-Assisted Creativity: Exploring new ways to animate characters, objects, and scenes.
Things to be aware of
- Experiment with sample_steps = 35 and sample_guide_scale = 5 for a refined balance of detail and efficiency.
- Use different fast_mode settings to compare speed vs. quality trade-offs.
- Modify seed values to generate different variations of the same prompt.
- Try varying num_frames between 40-81 to test different video lengths.
- Adjust sample_shift values to introduce subtle motion variations for more dynamic results.
Limitations
- Wan 2.1 I2V 720P may struggle with extreme motion consistency in long sequences.
- High sample_guide_scale values may lead to unnatural artifacts.
- Output quality depends on the clarity of the input image; low-quality inputs may produce less desirable results.
- Processing time increases with higher frame counts and detailed sampling settings.
Output Format: MP4
Related AI Models
You can seamlessly integrate advanced AI capabilities into your applications without the hassle of managing complex infrastructure.