Skip to content

Image to Video

Shows how to animate a single reference image into a short video clip.

This example assumes using Vidu; is in scope and apiKey contains your Vidu API key.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
using var client = new ViduClient(apiKey);

// Provide a publicly reachable image URL. Base64 data URIs are also accepted.
var task = await client.Generation.CreateImageToVideoTaskAsync(
    model: Model.Viduq3Turbo,
    images: new List<string> { "https://prod-file.vidu.studio/static/images/home/sample.png" },
    prompt: "The subject gently turns its head and smiles",
    duration: 5,
    resolution: Resolution.x720p);

Console.WriteLine($"Task ID: {task.TaskId}");
Console.WriteLine($"State: {task.State}");