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();
}| Status | Meaning |
|---|---|
working | Exporting. Poll again after poll. |
ready | export downloads the MP4. export streams it. |
failed | The 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.