const wf = await vs.workflows.create({
name: "Barista at dawn",
shots: [{ prompt: "a barista pulling an espresso shot at dawn",
duration: 6 }],
});
await vs.audio.attachTrack(wf.id, "shot_1", {
kind: "voiceover",
script: "Forty seconds. The whole café holds its breath.",
subtitleStyle: "tiktok",
idempotencyKey: `vo-${wf.id}`,
});
await vs.audio.attachTrack(wf.id, "shot_1", {
kind: "music",
mood: "warm low jazz piano",
ducking: true,
volume: 0.4,
idempotencyKey: `music-${wf.id}`,
});
await vs.audio.setClipNativeAudio(wf.id, "shot_1", {
mode: "mix",
volume: 0.6,
});
const { video_url } = await vs.renders.run(wf.id, {
idempotencyKey: `render-${wf.id}`,
});