Skip to content

Works API

A work is one video pipeline inside a project. Endpoints are under /api/projects/:projectId/works.

MethodEndpointAuthScopeDescription
GET/api/projects/:projectId/worksYesworks:readList works in the project.
POST/api/projects/:projectId/worksYesworks:writeCreate work.
GET/api/projects/:projectId/works/:workIdYesworks:readGet full work (scenes, generatedScenes, editorState).
PUT/api/projects/:projectId/works/:workIdYesworks:writeUpdate work.
DELETE/api/projects/:projectId/works/:workIdYesworks:writeDelete work and its media.

Request body:

{
"name": "My Video",
"mode": "content_remix",
"productName": "EcoBottle",
"productDescription": "Eco-friendly bottle",
"targetAudience": "Consumers",
"language": "en",
"videoDuration": 30,
"sceneCount": 5
}

name and mode are required; others optional. New work gets project’s default prompts and instructions.

MethodEndpointDescription
POST.../works/:workId/media/referenceUpload reference video (multipart).
GET.../works/:workId/media/referenceDownload reference video.
POST.../works/:workId/media/scene/:index/imageUpload scene image (generated).
GET.../works/:workId/media/scene/:index/imageGet scene image.
POST.../works/:workId/media/scene/:index/videoUpload scene video.
GET.../works/:workId/media/scene/:index/videoGet scene video.
POST.../works/:workId/media/audioUpload work-level audio.

All require auth and appropriate scope. Scene index is 0-based. Media URLs returned in the work (e.g. in generatedScenes) point to these endpoints; use the same auth when fetching (e.g. for preview or video provider).

Includes: id, projectId, name, mode, productName, productDescription, targetAudience, language, videoDuration, sceneCount, currentStep, hasReferenceVideo, systemPrompt, analyzerPrompt, imageSystemPrompt, videoSystemPrompt, analysis, scenes, generatedScenes, editorState, createdAt, updatedAt.