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
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
dynamicVariablesobjectOptional

Dynamic variables to be loaded into the template.

callbackstringOptional

URL for the callback.

callbackPayloadobjectOptional

Payload for the callback.

Responses
200

Job created successfully

application/json
post
/video-generation-jobs
POST /api/v1/video-generation-jobs HTTP/1.1
Host: app.colossyan.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 505

{
  "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?