Receiving a generated video
Last updated
Was this helpful?
Last updated
Was this helpful?
There are three ways to get a video, that was generated via our APIs.
You can get notified via our callback once a video is ready (recommended in production)
You can poll it using other API endpoints
You can download the video from your Colossyan Account after navigating to the workspace where the API key was created.
Upon posting a new video generation job, you have the opportunity to add a callback
and some callbackPayload
to the job. When the job is successful our service will issue a POST request to the url you provided in the callback
field.
In the body of this post message, we add the following fields:
url
Contains the public url of the generated video file.
videoUrl
and shareUrl
Contains a unique url pointing at Colossyans video sharing platform.
status
The status of the video generation. Can either be finished
or failed
...and everything that was provided at the job's generation as callbackPayload
and dynamicVariables
.
Due to the asynchronous nature of video-generations, first you need to query the video-generation-job itself, to see the status of it. To do this, use the API below.
Continue to poll the status of the job, until it returns either finished
or failed
. In case it successfully finished generating use the API below to get the generated video.
You can get the videoId
both when queueing the job itself, or when fetching it's status.
An example of a script to poll a job can be found below:
Open Colossyan
Navigate to workspace in which the API key was used to generate the video
Open the generated videos page.
The video should be listed there
You should also see it if it's currently being generated. In this case, it'll show the status of the job.