This Hello World guide should provide you with a basic understanding of how quick and easy it is to create a simple video using styled text, a soundtrack and a simple fade transition.
Before you begin ensure you have registered and received your API Keys.
This tutorial uses Curl to create your first 'Hello World' video. Curl is a cross platform command line utility that can be used to POST data to an API. Curl is included by default on most modern operating systems including Windows 10, Linux and OS X.
To check if Curl is installed on your operating system open your terminal on Linux/OS X or the Command Prompt in Windows then type:
You should see an output like:
We'll use a text file to define the JSON data so that it is easy to edit and format. Open your preferred text editor and copy and paste the following JSON, save the file as hello.json:
You can now go ahead and POST the hello.json edit data to the API for rendering, to do this we'll use the render endpoint (using the staging sandbox URL). From the same directory as the hello.json file run the following Curl command:
Replace the x-api-key value with your own sandbox API key.
You should receive a 201 response code and payload similar to:
Take a note of the id, it will be different from the example above, you will need this in the next step.
Your video is now either waiting in a queue to be rendered or is being processed. To check the status and know when rendering is complete and the video file is ready we need to poll the API.
Using the id noted in the previous step and your own key, call the staging API using the following command:
Replace the UUID at the end of the render URL with the id output in the previous step.
In less than one minute you should receive a 200 response code and payload similar to the output below. The status parameter tells you what stage the render is at, done means the video is ready for download. Other status are queued, fetching, rendering, saving and failed.
If the status is failed then there has been an error and the render will not continue. You can try again or contact us for support.
When the status returned from polling is done then the video is ready for download. Videos are stored online for a 24 hour period at the following locations:
Download the video using the URL returned in the get render status response:
Videos are only stored temporarily for 24 hours, rate limits will apply if too many requests to stream or download the file are attempted.
Hopefully you will now have a basic understanding of the key steps needed to create a simple edit:
- Prepare the edit data
- POST the edit data to the API
- Poll the API and wait for the render to complete
- Download the video