wf = vs.workflows.create(
name="Barista at dawn",
shots=[{"prompt": "a barista pulling an espresso shot at dawn",
"duration": 6}],
)
vs.audio.attach_track(
wf.id, "shot_1",
kind="voiceover",
script="Forty seconds. The whole café holds its breath.",
subtitle_style="tiktok",
idempotency_key=f"vo-{wf.id}",
)
vs.audio.attach_track(
wf.id, "shot_1",
kind="music",
mood="warm low jazz piano",
ducking=True,
volume=0.4,
idempotency_key=f"music-{wf.id}",
)
vs.audio.set_clip_native_audio(
wf.id, "shot_1",
mode="mix", volume=0.6,
)
video = vs.renders.run(wf.id, idempotency_key=f"render-{wf.id}")
print(video.url)