Create Music Videos via API
5 min read • February 24, 2025
Table of contents
Introduction
Due to popular demand, we have created step-by-step instructions on how to create music videos using the APIs we offer:
- Riffusion API v1 to compose music
- Runway API v1 or MiniMax API v1 to create video clips for the composed music
- PixVerse API v1 lipsync music file produced by Riffusion and the video clips generated by Runway
Compose music
POST riffusion/music/create-prompt
Prompt:
drum & base song by pretty lady wearing pink singing how she like to party
Generated song • Pink Rush
Generated lyrics
Drum & Bass, feminine vocals, uptempo breakbeats, bright synths, energetic drops
[Verse 1]
Motion takes me higher
Pink rays light my way
Feel it getting brighter
Can't make me behave
[Pre-Chorus]
Racing through my system
Everything's alive
[Chorus]
Pink lights in my veins (ooh)
Pink lights in my veins
Feel the rush again (aah)
Feel the rush again
(Pink lights, pink lights)
(Feel the rush, feel it)
[Verse 2]
Lost in pure sensation
Colors splash and spray
Sweet intoxication
Takes my breath away
[Pre-Chorus]
Racing through my system
Everything's alive
[Chorus]
Pink lights in my veins (ooh)
Pink lights in my veins
Feel the rush again (aah)
Feel the rush again
(Pink lights, pink lights)
(Feel the rush, feel it)
[Bridge]
[Extended vocalizations]
Aaah-ah-ah, ooh-ooh
Higher, higher
Aaah-ah-ah, ooh-ooh
Fire, fire
[Final Chorus]
Pink lights in my veins (ooh)
Pink lights in my veins
Feel the rush again (aah)
Feel the rush again
(Pink lights, pink lights)
(Feel the rush, feel it)
Create video clips
Use POST runway/gen3turbo/create or POST minimax/videos/create to create video clips.
Prompt:
Pretty lady shaking her hips up and down while looking straight into the camera. She is wearing pink trousers, and her arms are moving very slowly.
We generated about a dozen 10-second clips and selected the four we liked the most. After that, we used ffmpeg to stitch them together into a single continuous 40-second clip.
ffmpeg concat -safe 0 -i files.txt -c copy output.mp4
files.txt:
file ./2937129837.mp4
file ./9345983745.mp4
file ./1273824742.mp4
file ./9856745456.mp4
Lipsync
Upload both the generated audio and video files via POST pixverse/files and create the final video using POST pixverse/videos/lipsync.
Final music video: