Starts the export process for a complete video project. All chapters are rendered and combined into a single video file. The export typically takes 2-5 minutes depending on project complexity.
Ensure all chapter prompts have completed processing before exporting. The export will only include completed chapters.
{ "error": "An export is already in progress for this project", "code": "CONFLICT", "hint": "Wait for the current export to complete or check its status"}
Check that all chapters have completed processing:
Copy
async function ensureChaptersReady(projectId: string) { const { chapters } = await listChapters(projectId); if (chapters.length === 0) { throw new Error('Project has no chapters'); } for (const chapter of chapters) { const fullChapter = await getChapter(projectId, chapter.id); const latestPrompt = fullChapter.prompts?.[fullChapter.prompts.length - 1]; if (!latestPrompt || latestPrompt.status !== 'completed') { throw new Error(`Chapter "${chapter.name}" is not ready for export`); } } return true;}// Use before exportingawait ensureChaptersReady('prj_abc123xyz');await startExport('prj_abc123xyz');
Handle existing exports
If an export is already in progress, wait for it to complete: