patch https://api.topazlabs.com/video//accept
Calling this endpoint reserves the estimated credits and returns signed URL(s) for multi-part upload.
Video uploads
The Video API uses multi-part upload to receive the video file for processing. You can use a simple byte-division function to create segments for the API to receive.
For example, if you have a 900MB video file and the system returns 3 upload URLs. You would then:
- Upload bytes 0-300,000,000 via HTTP PUT to
urls[0]
- Upload bytes 300,000,001-600,000,000 via HTTP PUT to
urls[1]
- Upload bytes 600,000,001-900,000,000 via HTTP PUT to
urls[2]
If one of the uploads fail, you may reuse the same URL to retry - the action overwrites any partially uploaded data.
A successful response from the PUT request returns an ETag
value in the header for each segment. Retain the part number and ETag pair for the next step (PATCH /video/{requestId}/complete-upload/).
Response body
Property | Type | Description |
---|---|---|
uploadId | String | Upload ID for multi-part upload |
urls | Array | URLs for multi-part uploads |
message | String | Response message |