BevylDevelopers

Exporting

Export a finished project as an MP4 and download it.

Start an export once project generation is completed:

const started = await bevyl.startExport({ projectId });

Poll getExportStatus until the export is ready:

const result = await bevyl.getExportStatus({ exportId: started.exportId });

if (result.export.status === 'ready') {
  const response = await fetch(result.export.exportDownloadUrl!);
  const mp4 = await response.arrayBuffer();
}
StatusMeaning
workingExporting. Poll again after pollIntervalMs.
readyexportDownloadUrl downloads the MP4. exportUrl streams it.
failedThe export failed.

exportDownloadUrl expires at exportLinkExpiresAt. Call getExportStatus again for a new one.

Bevyl sends an export.ready webhook when the export finishes.

listExports returns the workspace's exports, newest first.