Skip to navigation
REST API ReferenceEndpointsWorkflows

Video to video

Creates a project from a video and restyles it from a text prompt. The output keeps the restyled part’s length and timing. Pass an uploaded video as videoFileId, or a public link as videoUrl and the run imports it for you. Up to 120 seconds of the video is restyled per run: choose the part with trimStartSeconds and trimEndSeconds, or omit them to restyle the first 120 seconds. Returns immediately with a workflow run id; poll or subscribe to webhooks for completion.

Authentication

AuthorizationBearer

API key from app.videogen.io/api. The full key is only shown once when you create it.

Request

This endpoint expects an object.
promptstringRequired

Text prompt describing how the restyled video should look (e.g. Hand-made claymation with soft studio lighting). Must be non-empty.

videoFileIdstringOptional

Id of the video to restyle (e.g. vg_file_...), uploaded via POST /v1/files/upload. Provide exactly one of videoFileId or videoUrl.

videoUrlstringOptional<=2048 characters

Public http:// or https:// link to a video page or a video file to restyle. The run imports it before restyling, so you do not need to import it first. Private, login-only, and DRM-protected videos cannot be imported, and an unusable link fails the run. Provide exactly one of videoFileId or videoUrl.

trimStartSecondsdoubleOptional>=0

Second of the video where the restyled part starts. Optional; defaults to 0. Must leave at least 2 seconds before the end of the video.

trimEndSecondsdoubleOptional>=0

Second of the video where the restyled part ends. Optional; defaults to trimStartSeconds plus 120, capped at the end of the video. The restyled part must be between 2 and 120 seconds long.

imageFileIdslist of stringsOptional

Optional ids of up to 10 previously uploaded reference images (e.g. vg_file_...) that guide the look of the restyle.

aspectRatioobjectOptional

Aspect ratio for the output video. With videoFileId, defaults to the supported aspect ratio (16:9, 9:16, or 1:1) closest to the source video when omitted. With videoUrl, defaults to 16:9, so pass it for vertical or square videos.

qualityenumOptional

Restyle quality (LOW, STANDARD, HIGH, or MAX). Higher tiers cost more and follow the source more faithfully. Optional; defaults to HIGH.

Allowed values:
audioenumOptional

KEEP_ORIGINAL keeps the source video’s audio under the restyled picture. GENERATE uses newly generated audio instead. Optional; defaults to KEEP_ORIGINAL.

Allowed values:
remixActionslist of objectsOptional

Optional edits applied to the project after the video is built, in order. Each action runs asynchronously; the response returns one remix action id per action. See the Remix actions guide.

isOutputTemporarybooleanOptionalDefaults to false

When true, the generated OUTPUT files (the restyled video clips) are created as temporary: guaranteed available for 24 hours, after which they may be archived and later deleted. Use this when your integration downloads or re-hosts the results itself and does not need VideoGen to retain them. The project and its metadata are unaffected. Defaults to false.

autoExportbooleanOptionalDefaults to false

When true, VideoGen exports an MP4 after the video is built (and after any remixActions on this request finish). The workflow run stays running until that export succeeds or fails. On success, poll GET /v1/workflows/runs/{workflowRunId} and use downloadUrl. Defaults to false.

exportOptionsobjectOptional

Export settings used when autoExport is true. Ignored when autoExport is false. Omitted fields use the same defaults as POST /v1/projects/{projectId}/export.

Response

Workflow run accepted.
workflowRunIdstring

Opaque workflow run id (e.g. vg_work_...).

projectIdstring

Id of the project created for this workflow run (e.g. vg_proj_...).

projectUrlstringformat: "uri"

Deep link to open this project in the VideoGen web editor. Not required for an API-only integration: store projectId and use the Projects API (export, remix, metadata). Use projectUrl when a person should open the project in the app to review or edit it manually. The project is visible only to members of your team and any project collaborators, the same access model as a project created in the dashboard.

remixActionIdslist of strings

Opaque remix action ids (e.g. vg_rmix_...), one per remixActions entry in request order. Empty when no remix actions were requested. Each runs after the video is built; poll GET /v1/projects/{projectId}/remix-actions.