Step 1: Create Upload URL
POST /v1/gallery/upload/direct
Request Body
string
Desired filename for the video.
string
Destination folder ID.
integer
Maximum video duration in seconds. Default: 21600 (6 hours).
integer
How long the upload URL remains valid. Default: 30, max: 360.
object
Custom metadata to attach to the video.
Headers
string
required
Bearer token (e.g.
Authorization: Bearer YOUR_API_KEY)Response
string
The TUS upload URL. Use this with a TUS client to upload the video.
string
The file ID. Use this to check upload status.
string
ISO timestamp when the upload URL expires.
string
TUS protocol version (
1.0.0).object
Upload instructions including required headers and status check URL.
Step 2: Upload the Video
Use any TUS client to upload directly to theuploadUrl. The upload is resumable—if interrupted, it can continue from where it left off.
JavaScript Example (tus-js-client)
Python Example (tuspy)
Step 3: Check Status
Poll the file endpoint or subscribe to webhooks to know when processing completes.Status Values
Webhooks
Subscribe to these events for real-time notifications:gallery.file.ready— Video processing completed successfullygallery.file.failed— Video processing failed