Skip to main content
For videos larger than 100MB, use the resumable upload flow. This two-step process generates an upload URL, then your client uploads directly using the TUS protocol.

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 the uploadUrl. 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 successfully
  • gallery.file.failed — Video processing failed
For videos under 100MB, you can use the simpler Upload File endpoint with multipart form data.
Upload URLs expire after the specified expiryMinutes. If the URL expires before upload completes, you’ll need to create a new one.