Generating a video manually

You can generate a video by sending us a video-generation-job descriptor JSON. This is essentially a recipe for a video. Constructing such a recipe manually for complex videos can become tedious very quickly. Due to this we strongly recommend to either:


Important concepts

To better understand the API, it's recommended to get an understanding of the following building blocks first:

  • Scenes

    • A scene is a logical consolidation of related content.

    • A video can consist of multiple scenes. These scenes are concatenated together. Think of them as slides on a presentation. Each scene is meant to aggregate and encapsulate related content.

    • Scenes offer a lot of convenience in timing their content, however it is completely up to the individual to decide how to divide the content into scenes.

  • Tracks

    • Tracks are the building blocks of scenes. You define the content of the video in tracks.

    • There are different types of tracks, for different purposes. To differentiate between them we use the type property.

Here you can see the details of the endpoint below.

Create a video generation job

post

Submits a new video generation job for processing.

Authorizations
Body
dynamicVariablesobjectoptional

Dynamic variables to be loaded into the template.

callbackstringoptional

URL for the callback.

callbackPayloadobjectoptional

Payload for the callback.

videoCreativeobjectrequired

The video creative details.

Responses
curl -L \
  --request POST \
  --url 'https://app.colossyan.com/api/v1/video-generation-jobs' \
  --header 'Authorization: Bearer JWT' \
  --header 'Content-Type: application/json' \
  --data '{
    "dynamicVariables": {},
    "callback": "text",
    "callbackPayload": {},
    "videoCreative": {
      "settings": {
        "videoSize": {
          "width": 1,
          "height": 1
        },
        "name": "text",
        "alphaChannel": true
      },
      "scenes": [
        {
          "name": "text",
          "duration": 1,
          "intrinsicDurationTrackReference": "text",
          "transition": {
            "type": "fade",
            "duration": 1
          },
          "tracks": [
            {
              "type": "actor",
              "variant": "full_body",
              "view": "front",
              "actor": "text",
              "audioUrl": "text",
              "text": "text",
              "speakerId": "text",
              "position": {
                "x": 1,
                "y": 1
              },
              "size": {
                "width": 1,
                "height": 1
              },
              "rotation": 1,
              "referenceId": "text"
            }
          ]
        }
      ]
    }
  }'
{
  "id": "text",
  "videoId": "text"
}

For advanced use-cases and customisations (such as advanced timings or animations), please reach out to us, so we can help out with a solution engineer to make sure you achieve what you are after. Read more here: Advanced use-cases.

Last updated

Was this helpful?