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 { VideoGen, pollProjectExport } from "@videogen/sdk";
2
3const client = new VideoGen({ apiKey: "sk_videogen_live_..." });
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.

Watermark and end screen

Exporting requires a paid plan in the app, but the API lets you export for free. Free exports carry two pieces of VideoGen branding: a watermark overlaid on the video (watermarkMode) and a short “Made with VideoGen” end screen appended to it (endScreenMode). Both are account-level entitlements controlled by the Production API add-on: with the add-on you can remove either or both, without it a request to remove them returns an error.

To export with no VideoGen branding, purchase the Production API add-on and set both to NONE:

1const { exportId } = await client.projects.exportProject({
2 projectId,
3 watermarkMode: "NONE",
4 endScreenMode: "NONE",
5});

watermarkMode accepts:

ValueBehavior
AUTO (default)Applies the VideoGen watermark unless you have the Production API add-on.
VIDEO_GENAlways applies the VideoGen watermark.
NONERemoves the watermark. Requires the Production API add-on; returns an error otherwise.

endScreenMode accepts the same values and behaves the same way, for the “Made with VideoGen” end screen:

ValueBehavior
AUTO (default)Appends the “Made with VideoGen” end screen unless you have the Production API add-on.
VIDEO_GENAlways appends the end screen.
NONERemoves the end screen. Requires the Production API add-on; returns an error otherwise.

Both default to AUTO, so leaving them unset keeps your exports working whether or not the add-on is active: branding is applied when required and dropped once the add-on is in place.

Signed URLs and expiry

downloadUrl and thumbnailUrl are private signed URLs. Each is valid for 7 days from when it was signed (downloadUrlExpiresAt and thumbnailUrlExpiresAt give the exact expiry, in seconds since epoch). Getting the export re-signs a URL automatically when it is within an hour of expiring, so a fresh call to GET /v1/projects/{projectId}/exports/{exportId} always returns a URL that is valid long enough to use. Once the export has finished, you can rely on this endpoint to always hand back a working URL: don’t cache the URL string long-term, just fetch the export again when you need it.

A succeeded export also returns the full hydrated export file object (same shape as GET /v1/files/{fileId}), so you have the file’s metadata and every rendition’s signed URLs in one call.

Every endpoint that returns hydrated files auto-rehydrates. Any response that carries signed file URLs — GET /v1/projects/{projectId}/exports/{exportId}, GET /v1/tools/executions/{toolExecutionId}, and the like — re-signs URLs that are within an hour of expiring before returning them, so you never receive an already-expired URL from these endpoints. The only exceptions are the file endpoints themselves — GET /v1/files/{fileId} and POST /v1/files/{fileId}/hydrate — which are the explicit, on-demand hydration paths you call directly when you’re holding just a file id.

The response also includes exportFileId, the file id of the exported MP4. Pass it to POST /v1/files/{fileId}/hydrate to fetch fresh signed URLs straight from the file at any time (useful if you kept only the file id and the 24-hour URLs have since expired).

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 (includes optional projectUrl for the app editor).
POST/v1/projects/{projectId}/exportStart an export; returns { exportId }.
GET/v1/projects/{projectId}/exportsList a project’s export ids, newest first.
GET/v1/projects/{projectId}/exports/{exportId}Poll export status; downloadUrl when status is succeeded.

Next steps