Creating projects
Turn processed footage into a video with project generation.
A project is one video, made from up to 100 processed source videos and a brief.
const project = await bevyl.createProject({
format: 'voiceover',
sourceVideoIds: [videoId],
voiceoverProfileId: voices.defaultVoiceoverProfileId,
videoIdea: 'A 15-second vertical ad for the truffle burger.',
aspectRatio: '9:16',
maxDuration: 20,
});The API answers 202 and runs project generation in the background. Track it with getProjectStatus.
Formats
| Format | Result |
|---|---|
talking-head | Cuts around the speaker's own audio. |
voiceover | Writes a script and reads it over the footage. Needs voiceover from list, or null for music only. |
trending-sounds | Cuts the footage to a trending sound. Needs trend from list. |
talking-head and voiceover also take a backgroundMusicTrackId from listBackgroundMusic. previewBackgroundMusic returns a playable preview of a track.
Let Bevyl choose
Skip the voice and music lookups and let Bevyl pick both:
const project = await bevyl.createProject({
format: 'voiceover',
sourceVideoIds: [videoId],
autoSelectVoice: true,
autoSelectBackgroundMusic: true,
videoIdea: 'A calm 15-second vertical ad for the truffle burger.',
});autoSelectVoice:voiceoveronly. Uses the workspace's default voice, the same onelistVoicesreturns asdefaultVoiceoverProfileId. LeavevoiceoverProfileIdout.autoSelectBackgroundMusic:talking-headandvoiceover. Bevyl picks a track fromlistBackgroundMusicthat fits the brief and the length of the video. LeavebackgroundMusicTrackIdout.
Sending a flag together with the ID it replaces returns 400.
Options
aspectRatio:9:16,4:5,1:1, or16:9. Without it, Bevyl matches the footage and falls back to vertical.minDuration,maxDuration: target length in seconds, ontalking-headandvoiceover.textOverlay:trending-soundsonly.{ mode: 'highlights' }adds overlays throughout and{ mode: 'none' }keeps only the opening hook.additionalTextsteers the overlay copy.
Status
const status = await bevyl.getProjectStatus({
projectId: project.projectId,
runId: project.generation.runId,
});generation.status | Meaning |
|---|---|
working | Project generation is running. Poll again after poll. |
completed | Ready to export. |
no_ | The footage had nothing usable for this brief. |
failed | Project generation failed. status says why. |
Bevyl sends a project.completed webhook when project generation completes.
Voice-over script
generation.voiceoverScript is the script Bevyl wrote and read over the footage, so you can show it as text instead of making people play the video. It is null until the script is written, and for formats without a voice-over. It is the script as generated: edits made later in the editor are not included. listProjects returns the same field on each version.
Regenerate
regenerateProject makes a new version of a project. It takes videoIdea, voiceoverProfileId, minDuration, maxDuration, userScript (an exact script to read), and userMoments (moments in the footage to feature). Format, footage, and aspect ratio carry over from the last version. Background music does not. Send null to clear userScript, userMoments, minDuration, or maxDuration.
const regen = await bevyl.regenerateProject({
projectId: project.projectId,
videoIdea: 'Same cut, but focus on dessert and slow the pacing.',
});While project generation is running, regenerateProject returns 409 generation_in_progress.
listProjects returns projects newest first, each with every version and the brief behind it. Pass nextCursor for the next page.