API Walkthrough
The following is a detailed, step-by-step walkthrough of an example enhancement with the Video AI API
1
Step 1: Create a Video Request
curl --request POST \
--url https://api.topazlabs.com/video/ \
--header 'X-API-Key: Your-API-Key' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"source": {
"resolution": {
"width": 800,
"height": 448
},
"container": "mp4",
"size": 477010,
"duration": 4,
"frameRate": 24,
"frameCount": 97
},
"output": {
"resolution": {
"width": 800,
"height": 448
},
"audioCodec": "AAC",
"audioTransfer": "Copy",
"frameRate": 24,
"dynamicCompressionLevel": "High",
"container": "mp4"
},
"filters": [ {
"model": "apo-8",
"slowmo": 1,
"fps": 60,
"duplicate": true,
"duplicateThreshold": 0.1
} ]
}'2
Step 2: Accept and Upload the Video Request
Accept
curl --request PATCH \
--url https://api.topazlabs.com/video/[your-requestID]/accept \
--header 'X-API-Key: Your-API-Key' \
--header 'accept: application/json'Upload
S3_UPLOAD_URL=[https://...]
curl --verbose --request PUT \
--upload-file "Your-Video-File" \
--header "Content-Type: video/mp4" \
"$S3_UPLOAD_URL"3
Step 3: Complete the Video Upload
curl --request PATCH \
--url https://api.topazlabs.com/video/[your-requestID]/complete-upload \
--header 'X-API-Key: Your-API-Key' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"uploadResults": [
{
"partNum": 1,
"eTag": "your-eTag"
}
]
}'Last updated