Skip to navigation

Apply video edits

Layer edits onto a project after the video is built.

Video edits are edits applied to a project after a workflow builds it: background music, a logo overlay, caption changes, transitions. This step is optional. Skip ahead to export if your video is ready as-is.

You can apply video edits two ways:

  • In the same workflow call, by passing a videoEdits array (each runs after the video is built).
  • On an existing project, by calling POST /v1/projects/{projectId}/video-edits.

Apply to an existing project

Send an ordered list of edits. Each runs asynchronously as its own video edit, and the response returns one video edit id per edit in order.

import { VideoGen } from "@videogen/sdk";
const client = new VideoGen({ apiKey: "sk_videogen_live_..." });
const { videoEditIds } = await client.projects.startVideoEdits({
projectId,
editableVideoId,
videoEdits: [
{ type: "SET_BACKGROUND_MUSIC", fileId: "vg_file_...", volume: 0.3 },
{ type: "SET_LOGO", fileId: "vg_file_..." },
{ type: "ADD_TRANSITIONS", sectionTransition: "DYNAMIC", assetTransition: "FADE" },
],
});
console.log(videoEditIds);

Poll GET /v1/projects/{projectId}/video-edits until each action’s status is terminal. Pass saveAsNewProject: true to apply the edits to a copy and leave the original untouched.

Next steps