Upload A Remote Video
POST /videos/upload
Upload a video which is hosted on a remote URL, such as in an AWS S3 bucket, DropBox, GCP, or Azure. Successful requests sync to your SpatialGen account.
Upload Request Parameters
name
: stringdescription
: stringlayout
: “2D”, “MVHEVC”, “SBS”, “TB”, “Separate”perspective
: “Regular”, “180”, “360”videoUrl
: string = The URL to the video file. This URL needs to be accessible from within the SpatialGen newtork.secondaryVideoUrl
: (optional) string = Used for videos with separate left and right eye videos.folderName
: (optional) string = The folder to store the video in. Defaults to the ‘Home’ folder.
Example request to upload a video
const uploadData = { name: 'video.mp4', description: 'An example video', layout: '2D', perspective: 'Regular', videoUrl: 'https://example.com/video.mp4}
fetch('https://spatialgen.com/api/videos/upload', { method: 'POST', headers: { 'X-SPATIALGEN-APPKEY': apiKey }, body: JSON.stringify(uploadData)})
Example Response
{ "createdAt": string, // Date in string format "description": string, // Description of the video "fileFormat3D": string, // Format of the 3D file "id": number, // ID of the video "is3D": boolean, // If the video is in 3D "isStreaming": boolean, // If the video is streaming "perspective": number, // Perspective "thumbnailUrl": string, // Thumbnail URL "videoLength": number, // Length of the video in seconds "videoHeight": number, // Height of the video "videoName": string // Name of the video}