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,
"selectedAssetIds": ["asset_logo", "asset_product1"],
"assetUsageMode": "direct",
"resolution": { "width": 1080, "height": 1920 }
}
FieldTypeRequiredDescription
namestringNoWork name.
modestringNostyle_transfer or content_remix.
productNamestringNoProduct/subject name.
productDescriptionstringNoDescription.
targetAudiencestringNoTarget audience.
languagestringNoLanguage code (e.g. en, tr).
videoDurationnumberNoTarget duration in seconds.
sceneCountnumberNoNumber of scenes to generate.
selectedAssetIdsstring[]NoAsset IDs to use in video generation.
assetUsageModestringNoHow to use assets: reference or direct.
resolutionobjectNoOutput resolution { width, height }. Determines image/video provider sizing and initial exportSettings. Default: { width: 1080, height: 1920 } (Portrait 9:16).

New work inherits project’s default prompts and instructions.

The resolution field controls the output dimensions for image and video generation in this work. It is stored on the work and passed to each provider during generation.

Standard presets:

PresetwidthheightDescription
Portrait 9:1610801920Default. Vertical/mobile format.
Landscape 16:919201080Horizontal/widescreen format.
Square 1:110801080Square format.

Provider mapping:

ProviderPortrait 9:16Landscape 16:9Square 1:1
DALL-E 3 (dalle)size: "1024x1792"size: "1792x1024"size: "1024x1024"
Runway (runway)ratio: "768:1280"ratio: "1280:768"(omitted)
Gemini Veo (gemini video)aspectRatio: "9:16"aspectRatio: "16:9"aspectRatio: "1:1"
Gemini Image (gemini image)(no resolution parameter)(no resolution parameter)(no resolution parameter)

The exportSettings in the work’s editorState is also initialized from resolution when a new work is created.

When you specify selectedAssetIds, control how those assets are used with assetUsageMode:

ModeDescription
referenceAI analyzes assets and generates similar-looking images. Best for style consistency. Assets should have descriptions (use the analyze endpoint first).
directSkip AI image generation. Use actual asset images directly and only generate video (animation). Best for product photos, screenshots. Scene count auto-adjusts to match asset count.
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, selectedAssetIds, assetUsageMode, resolution, currentStep, hasReferenceVideo, systemPrompt, analyzerPrompt, imageSystemPrompt, videoSystemPrompt, analysis, scenes, generatedScenes, editorState, createdAt, updatedAt.