Vidu Template
Transform static images into captivating videos using diverse motion templates effortlessly.
API
If you're looking for an API, you can choose from your desired programming language.
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
36
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')
# Use this function to convert a list of image URLs to base64
def image_urls_to_base64(image_urls):
return [image_url_to_base64(url) for url in image_urls]
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/vidu-template"
# Request payload
data = {
"template_name": "fishermen",
"image_url": "https://segmind-resources.s3.amazonaws.com/input/da5eeaf6-a3d2-4413-9c24-3b781339f804-b27b33db-9b49-4262-a8f4-8811099797eb.png",
"seed": 0,
"bgm": True,
"beast": "auto",
"area": "auto"
}
headers = {'x-api-key': api_key}
response = requests.post(url, json=data, headers=headers)
print(response.content) # The response is the generated image
Attributes
Select a template for generation. Example: 'fishermen' for a marine theme or 'simpsons_comic' for a cartoonish style.
Allowed values:
Input the primary image URL. Use a high-quality image for best results.
Optional second image URL for special templates. Use if format requires a second visual input. Supports with given templates clayshot_duo, ai_outfit, dynasty_dress(1 or 2 image), smooth_shift
Optional third image URL for advanced templates. Applicable if the template supports multiple inputs. Supports with given templates ai_outfit, embrace_the_god_wealth, god_send_ingot, god_send_red_envelope, god_send_gold_coins
Seed affects randomness. Set '0' for unpredictability or a specific number for reproducibility.
min : 0,
max : 999999
Toggle background music. Enable for dynamic effects or disable for a silent aesthetic.
Choose a beast type for 'beast_companion'. Use 'bear' for strength or 'wolf' for agility.
Allowed values:
Select cultural area for 'exotic_princess'. Choose 'china' for Asian style or 'africa' for tribal flair.
Allowed values:
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.
Resources to get you started
Everything you need to know to get the most out of Vidu Template
Guide to Using Vidu Template AI Effectively
Vidu Template AI turns static images into dynamic videos by applying motion templates powered by cutting-edge diffusion. Follow this guide to choose the right settings for your project and get consistent, high-quality results.
1. Choose the Right Template
- •Browse from 100+ styles (e.g.,
fishermen
,simpsons_comic
,ghibli
,minecraft
). - •Match your brand tone:
- •Cartoon/fun:
simpsons_comic
,manga_meme
,pixel_me
- •Cinematic/epic:
star_carpet
,golden_epoch
,saber_warrior
- •Romantic/storytelling:
love_story
,dreamy_wedding
,romantic_lift
- •Cartoon/fun:
2. Configure Core Parameters
- •image_url (required): Supply a high-resolution image (≥1080px).
- •template_name (required): Pick your motion style.
- •aspect_ratio:
- •
16:9
– YouTube, widescreen. - •
1:1
– Instagram feed, Facebook posts. - •
9:16
– TikTok, Instagram Stories.
- •
- •bgm (default:
true
): Auto-add soundtrack. Switch tofalse
for silent loops. - •seed:
- •
0
– Randomize every call. - •Fixed (e.g.,
42
) – Reproducible output.
- •
3. Advanced Parameters
Use these to unlock special effects or multi-scene templates:
- •image_url_2, image_url_3: Embed up to three images for complex sequences.
- •beast (for
beast_companion
): Choosebear
,wolf
,lion
for different creature effects. - •area (for
exotic_princess
): Pick cultural styles likechina
,india
,africa
.
4. Recommended Settings by Use Case
- •Social Media Ads
- •Template:
shake_it_dance
,fashion_stride
- •Aspect:
1:1
or9:16
- •BGM:
true
- •Seed:
0
- •Template:
- •Marketing Intros
- •Template:
star_carpet
,oscar_gala
- •Aspect:
16:9
- •BGM:
true
- •Seed: fixed (e.g.,
12345
) for brand consistency
- •Template:
- •Storytelling & Personal Projects
- •Template:
child_memory
,live_memory
- •Aspect:
4:3
or1:1
- •BGM: optional (
false
for quiet montages) - •Multi-image: use
image_url_2
andimage_url_3
- •Template:
- •E-commerce Showcases
- •Template:
product_highlight
(e.g.,hover_zoom
,orbit
) - •Aspect:
16:9
- •Seed:
0
- •BGM:
true
- •Template:
5. Tips for Optimal Quality
- •Always use clear, well-lit images.
- •Crop or mask backgrounds if cluttered.
- •Experiment with different seeds to discover unique animations.
- •Keep file sizes under 10MB for faster uploads.
By fine-tuning these parameters, you’ll harness the full power of Vidu Template AI to produce stunning, reproducible videos in minutes. Happy animating!
Other Popular Models
Discover other models you might be interested in.
sdxl-controlnet
SDXL ControlNet gives unprecedented control over text-to-image generation. SDXL ControlNet models Introduces the concept of conditioning inputs, which provide additional information to guide the image generation process

illusion-diffusion-hq
Monster Labs QrCode ControlNet on top of SD Realistic Vision v5.1

faceswap-v2
Take a picture/gif and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training

codeformer
CodeFormer is a robust face restoration algorithm for old photos or AI-generated faces.
