Skip to main content
PATCH

Overview

Makes a few targeted changes to a finished project. Each one is saved to the project’s editor timeline the same way the Hooked editor saves it, so the project opens in the dashboard with your changes. What you can edit through the API: Everything else is edited in the dashboard: the voice and the script, clips with their own sound, timing, text layers, transitions, colours and fonts of a caption style. A field this endpoint does not know is refused with a 400 that names it, and nothing is saved. Editing is free and does not render anything. When you are done, call Render Project to get a new video.

How each edit is applied

  • Caption text. The line keeps its start and end time; its words share that time evenly, as when you retype a line in the editor. Read the lines first with Get Project Captions: index counts from 0 across the whole video.
  • Caption style. A project made from a template has one caption layer per scene; the style, alignment and switch apply to all of them. A new style re-cuts the lines to its box, so line numbers change: read the captions again before correcting text. In one request, captionSegments is applied first, with the indexes you read.
  • Music. The new track takes the old one’s place and timing, and plays from its start. A project without music gets the track from start to end at volume 0.5. A track shorter than the video stops when it ends. The song of a Music to Video project cannot be swapped (its volume can).
  • Logo. The new image replaces the logo where it is. Without a logo yet, logoMediaId adds one over the whole video, bottom-right at 100 px unless you say otherwise. The image must be COMPLETED in your library.
  • Scenes. The new image or clip takes the scene’s place, size and timing, as the editor’s Regenerate swaps it: an image for an image scene, a clip at least as long as the scene for a clip scene, COMPLETED in your library. To make a new version, generate an image or a clip from the scene’s prompt and swap it in once it is COMPLETED. A clip that plays its own sound (an avatar speaking, a character’s lines) is replaceable: false and is edited in the dashboard.
If the project is open in the dashboard editor, its autosave can overwrite what you change here. Close it, or reload it after editing.

When it is refused

Response

data shows the editable parts of the project after the edit: caption, music and branding are null when the project has none. changed lists what this request changed. branding.logoMediaId is null for a logo added when the project was created.

Errors

Authorizations

x-api-key
string
header
required

Path Parameters

projectId
string
required

The projectId a create endpoint answered, or one from GET /v1/project/list.

Body

application/json

Send at least one of the five groups. A field that is not listed here is refused with a 400: edit anything else in the dashboard.

caption
object

The captions' style, position and on/off switch. Applies to every caption layer of the project (a template project has one per scene).

captionSegments
object[]

New text for caption lines, by the index Get Project Captions answered (each index once). The line keeps its start and end; its words share that time evenly, as when you retype a line in the editor. Applied before caption.preset, so the indexes are the ones you read.

Required array length: 1 - 500 elements
music
object

The background music. Not available for the song of a Music to Video project.

branding
object

The logo over the video (the branding logo a create request can add). Without a logo yet, logoMediaId adds one over the whole video.

scenes
object[]

Another image or clip of your media library for scenes, by the index Get Project Scenes answered (each index once). The new media takes the scene's place, size and timing, as the editor's Regenerate swaps it. An image scene takes a COMPLETED image; a clip scene takes a COMPLETED clip at least as long as the scene. A scene with replaceable: false (a clip with its own voice or dialogue) is refused.

Required array length: 1 - 200 elements

Response

The project was edited

success
boolean
message
string
data
object