Export your video

Render a project to an MP4 and download it.

Once a workflow has built your project (and any remix actions have finished), export it to an MP4. The export runs asynchronously: start it, poll until it finishes, then download from the returned URL.

Export and download

Start the export, then poll until status is succeeded. The SDK helpers pollProjectExport (TS) and poll_project_export (Python) loop for you and return the downloadUrl.

1import { VideoGenClient, pollProjectExport } from "@videogen/sdk";
2
3const client = new VideoGenClient({ token: process.env.VIDEOGEN_API_KEY });
4
5const { exportId } = await client.projects.exportProject({ projectId });
6
7const projectExport = await pollProjectExport(client, projectId, exportId);
8console.log(projectExport.status, projectExport.downloadUrl);

Each poll response includes progressPercentage (0-100) for the current attempt, so you can render a live progress bar. The downloadUrl is present once status is succeeded.

Managing projects

The Projects API also lets you list and inspect projects:

MethodPathPurpose
GET/v1/projectsList projects (selfOnly=true scopes to the key owner; default is team-wide). API-created only by default; pass includeUiProjects=true to also include dashboard-created projects.
GET/v1/projects/{projectId}Project metadata and projectUrl.
POST/v1/projects/{projectId}/exportStart an export; returns { exportId }.
GET/v1/projects/{projectId}/exports/{exportId}Poll export status; downloadUrl when status is succeeded.

Next steps