Video Quickstart
In this example, we’ll be using one of our popular video models, Apollo.
Before we proceed, you need to create an API key.
This key will be used to authenticate your requests to the Topaz Labs API.
Now, proceed with the below steps.
Create Video Request
Create a video request—just include some details about the source video, output parameters, and desired enhancements.
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
} ]
}'Accept & Upload Video Request
After submitting the video request, you can choose to continue by calling this endpoint.
curl --request PATCH \
--url https://api.topazlabs.com/video/[your-requestID]/accept \
--header 'X-API-Key: Your-API-Key' \
--header 'accept: application/json'Once this endpoint is called, you will receive a set of URL(s). You may use the following code snippet to upload the video to that link from your local device.
S3_UPLOAD_URL=[https://...]
curl --verbose --request PUT \
--upload-file "Your-Video-File" \
--header "Content-Type: video/mp4" \
"$S3_UPLOAD_URL"Once uploaded, you'll receive some information about your upload, including your eTag number. This will be useful for the next step.
Complete Video Upload
After you have finished uploading your video segments, you may use the following request to confirm that all of your video segments have been received. Once this endpoint is called, you video will begin processing with its enhancements.
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"
}
]
}'You should receive a response confirming that your request is queued for processing once you have called the endpoint.
Get Video Status
You may use the following request to view the status of your video request
curl --request GET \
--url https://api.topazlabs.com/video/[your-requestID]/status \
--header 'X-API-Key: Your-API-Key' \
--header 'accept: application/json'Once your video has finished processing, you will receive a link to download your video as a response to this endpoint.
Congratulations! You have just completed your first Video API request! 🎉
We have now made popular video models such as Starlight Precise 2.6 and Astra 2 available as ready-to-use APIs so that you can easily integrate them into your applications.
Once you find a model that you want to use in our "Models" tab, you can grab the URL from the model's dedicated page. Individual model pages also provide some important information about the model including use cases and examples of how you can call it.
Check out our API Playground to tinker with these models and let us know your feedback and questions on our Discord.
More Information
Please reach out to help@topazlabs.com with any questions.
Last updated




