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.

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


template_nameenum:str *

Select a template for generation. Example: 'fishermen' for a marine theme or 'simpsons_comic' for a cartoonish style.

Allowed values:


image_urlstr *

Input the primary image URL. Use a high-quality image for best results.


image_url_2str ( default: 1 )

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


image_url_3str ( default: 1 )

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


seedint ( default: 1 )

Seed affects randomness. Set '0' for unpredictability or a specific number for reproducibility.

min : 0,

max : 999999


bgmbool ( default: true )

Toggle background music. Enable for dynamic effects or disable for a silent aesthetic.


beastenum:str ( default: auto )

Choose a beast type for 'beast_companion'. Use 'bear' for strength or 'wolf' for agility.

Allowed values:


areaenum:str ( default: auto )

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.

Vidu Template AI – Image-to-Video Generation Model

What is Vidu Template AI?

Vidu Template AI is a generative image-to-video model that transforms static pictures into polished, dynamic videos by applying a variety of predefined motion templates. Built on advanced diffusion techniques, this REST API-driven service lets developers, creators, and product managers rapidly produce engaging visual content for social media, marketing campaigns, storytelling, and personal projects.

Key Features

  • Wide Template Library: Over 100 motion templates (e.g., fishermen, simpsons_comic, ghibli, minecraft) cater to cartoon, cinematic, and themed styles.
  • High-Quality Diffusion: Leverages cutting-edge diffusion models for smooth, artifact-free animations.
  • Customizable Outputs:
    • template_name: Choose your animation style.
    • aspect_ratio: Select from 16:9, 4:3, 1:1, 3:4, or 9:16.
    • seed: Control randomness (set to 0 for varied output or a fixed value for reproducibility).
    • bgm: Toggle background music on/off.
    • Advanced params (beast, area, image_url_2, image_url_3) unlock multi-input and theme options.
  • Fast Inference: Low-latency REST API endpoints for seamless integration into web or mobile apps.
  • Reproducible Results: Seed-based generation ensures that teams can collaborate on consistent video outputs.

Best Use Cases

  • Social Media Ads: Convert product shots into eye-catching animated clips.
  • Marketing Content: Craft branded intros or transitions with custom themes.
  • Storytelling & Personal Projects: Animate family photos, travel snapshots, or event highlights.
  • E-commerce: Showcase apparel, gadgets, and lifestyle products in motion.
  • User-Generated Campaigns: Empower communities to animate their own images with themed templates.

Prompt Tips and Output Quality

  1. Use a high-resolution image URL (image_url) for sharp details.
  2. Select the ideal template_name to match your brand tone (cartoon, epic, romantic, etc.).
  3. Set an aspect_ratio that fits your target platform (e.g., 1:1 for Instagram, 16:9 for YouTube).
  4. Adjust seed to reproduce or explore variations.
  5. Enable bgm for dynamic videos or disable for silent loops.
  6. For specialized effects (beast_companion, exotic_princess), use beast or area to fine-tune style.
  7. Combine up to three image URLs (image_url, image_url_2, image_url_3) for multi-scene templates.

FAQs

Q: How do I generate a video from a single image?
A: Send a POST request to /v1/vidu-template with image_url, template_name, and optional parameters. The API returns a video URL when processing completes.

Q: Which templates are available?
A: Choose from over 100 templates like shake_it_dance, manga_meme, star_carpet, love_story, and more. Check the dropdown in our API docs.

Q: How can I reproduce the same video output?
A: Set a fixed seed value (e.g., 42). The model will generate identical video results each time.

Q: Can I include background music?
A: Yes. Set bgm to true (default) to automatically add a soundtrack. Toggle off for silent animations.

Q: What aspect ratios are supported?
A: The model supports 16:9, 4:3, 1:1, 3:4, and 9:16—ideal for widescreen, square, and vertical platforms.

Cookie settings

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept all", you consent to our use of cookies.