Overview
Base path /api/videos/uploads
Use the Direct Upload API when you want to upload one complete SpatialGen video asset set directly into SpatialGen-managed storage. A single upload group represents one video and may include:
- One primary video file (
.aivu,.mp4,.mov), or seperate left-eye and right-eye video files. - Optional audio files
- Optional subtitle files
- Optional single
aimemetadata file - Optional single
fcpxmldzip file
Each upload follows four steps:
- Create an upload group with
POST /api/videos/uploads - For each file, request presigned upload URLs for that file with
POST /api/videos/uploads/{uploadSessionId}/files/{uploadId}/part-urls - Upload each file part to the presigned
PUTURLs returned from step 2. - Mark each file complete with
POST /api/videos/uploads/{uploadSessionId}/files/{uploadId}/complete
When every file in the group is completed successfully, SpatialGen will:
- Create a new
libraryentry in your Dashboard - Verify all files have been uploaded successfully
Allowed API Key Roles
adminupload
These endpoints require an API key with upload permissions.
Authentication
Send your SpatialGen API key in the X-SPATIALGEN-APPKEY header on every request.
const headers = { 'Content-Type': 'application/json', 'X-SPATIALGEN-APPKEY': apiKey,}Workflow Notes
uploadSessionIdidentifies the full upload group for one video.uploadIdidentifies one file inside that upload group.- The
part-urlsendpoint may be called multiple times for multipart uploads. - The
completeendpoint should only be called after all parts for a file have been uploaded. - The
cancelendpoint cancels the entire upload group. A cancelled group cannot be resumed. - The upload group expires after 5 days if not completed or cancelled. All partially uploaded files will be deleted.
File Role Rules
Separatelayout requires exactly onevideo_leftfile and onevideo_rightfile.- All other layouts require exactly one
videofile. - Only one
aimefile is allowed per upload group. - Only one
fcpxmldfile is allowed per upload group.