Accept Request

This section allows you to accept the created request and upload

Accept and Upload Video Request

patch

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

Authorizations
X-API-KeystringRequired
Path parameters
requestIdstring · uuidRequiredExample: c1f96dc2-c448-00e6-82ed-14ecb6403c62
Responses
patch
/video/{requestId}/accept
PATCH /video/{requestId}/accept HTTP/1.1
Host: api.topazlabs.com
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "uploadId": "GDlWC7qIaE6okS41Xf/ktpuS5XzTRabg",
  "urls": [
    "https://videocloud.s3.amazonaws.com/0193893a-a2ba-799e-b258-928f02c0f419/source.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256...x-id=UploadPart",
    "https://videocloud.s3.amazonaws.com/0193893a-a2ba-799e-b258-928f02c0f419/source.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256...x-id=UploadPart"
  ],
  "message": "Accepted"
}

Last updated