Authorizationheader. Make sure you have your API key ready. You can find it in your dashboard and it should look something like this:
urlwhere the video is stored, or try out our
assetservice to upload and store the video yourself. (This walkthrough will show you how to render video via a public
urlbut you can also check out our creating an asset guide for more info on the assets feature)
elementsarray. We'll start off with the source video shown above. When making the request, change the
source.urlstring to match the location of the video you are planning to use:
cropobject, as a member of the video element
params. The following picture shows how the
cropobject acts on the video element:
trimobject to the video elements
params. (Note that trim values are in seconds)
textelement to our
value(the string of text you want to include), but we will also provide a
positionobject, to place it using alignment string enums. You can, of course, use precise pixel values if you wish.
render.jsonfile. Then, from the directory where the file is saved, run the
curlcommand with the file name as a POST body. Make sure to change the API key to match the one from your dashboard:
idrepresents the task that is in charge of rendering. The
idis used to track the progress of the render and get the final result.
PROGRESS, which will look like this:
payloadobject you will get a
progressfield, which indicates the percentage of rendering complete. Once it reaches 100 your render is done, and you need to poll the API once more:
urlyou can download the resulting render and enjoy your new video!