Start Upload Group
POST /api/videos/uploads
Create a new direct upload group for one SpatialGen video asset set and register every file that will be uploaded into that group.
Allowed API Key Roles
adminupload
Request Body
videoName: string, requireddescription: string, optionallayout:"2D" | "MVHEVC" | "SBS" | "TB" | "Separate" | "AIV", requiredperspective:"Regular" | "180" | "360", optionalfolderName: string, optionalfiles: array, required, minimum 1 item
Each files[] item accepts:
fileName: string, requiredfileRole:"video" | "video_left" | "video_right" | "audio" | "subtitle" | "aime" | "fcpxmld", requiredsizeBytes: positive integer, requiredlanguageTag: string, required foraudioandsubtitle, omitted for all other file roles
Validation Rules
Layout Rules
Separaterequires exactly onevideo_leftfile and exactly onevideo_rightfile.Separatedoes not allowvideo.- All other layouts require exactly one
videofile. - Non-
Separatelayouts do not allowvideo_leftorvideo_right. AIVmust use perspective180.AIVrequires either onevideofile ending in.aivu, or both anaimefile and anfcpxmldfile.
File Extension Rules
video:.aivu,.mp4, or.movvideo_left,video_right:.mp4or.movaudio:.mp4or.m4asubtitle:.srtaime:.aimefcpxmld:.zip
Metadata File Count Rules
- At most one
aimefile is allowed per upload group. - At most one
fcpxmldfile is allowed per upload group.
Language Code Rules
audio.languageTagmust be one of SpatialGen’s supported language-only tags.subtitle.languageTagmust be one of SpatialGen’s supported language-only tags.- Tags are normalized to lowercase before validation.
audioaccepts the same shared language list used in the SpatialGen dashboard, pluszxxfor instrumental audio.subtitleaccepts the shared spoken-language list and does not acceptzxx.
Supported language tags include:
en,es,fr,de,it,ja,ko,pt,ru,zhaf,am,ar,az,bg,bn,bs,ca,cs,dael,et,fa,fi,gu,he,hi,hr,hu,hyid,is,ka,kn,lt,lv,ml,mr,ms,nlno,pa,pl,ro,sk,sl,sq,sr,sv,swta,te,th,tl,tr,uk,ur,vizxxfor instrumental audio only
Response Shape
sessionId: stringexpiresAt: stringvideoName: stringfileCount: numberfiles: array of registered upload files
Each returned file includes:
uploadId: stringfileRole: stringfileName: stringtotalBytes: numberpartSizeBytes: numbertotalParts: numberuploadStrategy:"single_put" | "multipart"status: string
Example Request
fetch('https://spatialgen.com/api/videos/uploads', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-SPATIALGEN-APPKEY': apiKey, }, body: JSON.stringify({ videoName: 'My Spatial Video', description: 'Uploaded from our media pipeline', layout: 'Separate', perspective: 'Regular', folderName: 'Launch Assets', files: [ { fileName: 'left-eye.mov', fileRole: 'video_left', sizeBytes: 1287340032, }, { fileName: 'right-eye.mov', fileRole: 'video_right', sizeBytes: 1287341024, }, { fileName: 'english-audio.mp4', fileRole: 'audio', sizeBytes: 187340032, languageTag: 'en', }, { fileName: 'english-subtitles.srt', fileRole: 'subtitle', sizeBytes: 2401, languageTag: 'en', }, ], }),})Example Response
{ "sessionId": "5ea97a59-95e0-4c8b-a634-b0fa9976f6ff", "expiresAt": "2026-05-06T18:42:11.000Z", "videoName": "My Spatial Video", "fileCount": 4, "files": [ { "uploadId": "402f0bda-a0fa-4551-ae28-7300ab6678dd", "fileRole": "video_left", "fileName": "left-eye.mov", "totalBytes": 1287340032, "partSizeBytes": 104857600, "totalParts": 13, "uploadStrategy": "multipart", "status": "initialized" }, { "uploadId": "87ca2d60-52d4-4c36-a5d0-42b9f95b58ba", "fileRole": "video_right", "fileName": "right-eye.mov", "totalBytes": 1287341024, "partSizeBytes": 104857600, "totalParts": 13, "uploadStrategy": "multipart", "status": "initialized" }, { "uploadId": "f56c0c54-f212-49b2-90f9-56653791f82b", "fileRole": "audio", "fileName": "english-audio.mp4", "totalBytes": 187340032, "partSizeBytes": 104857600, "totalParts": 2, "uploadStrategy": "multipart", "status": "initialized" }, { "uploadId": "7fc29357-7475-4422-987f-a17d5524d18e", "fileRole": "subtitle", "fileName": "english-subtitles.srt", "totalBytes": 2401, "partSizeBytes": 2401, "totalParts": 1, "uploadStrategy": "single_put", "status": "initialized" } ]}