Generating video

Personalized video generation is the essential functionality of Motionlab APIs. With this endpoint is possible to configure all personalized values, get video ID which is essential for another APIs, or Player and Thumbnails URL before video is fully rendered.

Test mode

Generating of videos is consuming credits. For scenarios where is needed to test functionality without generating correct video set the "isTest": "true". This will trigger action which will result in same result like "standard" video generation except video is not generated, no credit is subtracted and universal video video is returned (also with thumbnails and other data).

Especially useful when another 3th party devs are integrating Motionlab platform (custom landing pages for example).

Also callback is sent in this mode. Only the "renderStatus" message is se to: TestMode

{
  "videoData": {
    "paramTextName": "Hello World!",
    ...
  },
  "isTest": "true"
}

Error codes

In case data in the API request are not valid or not accessible (e.g. images), the status code 400 (Bad Request) is returned.
In case the API endpoint is not launched, the status code 401 (Unauthorized) is returned.

Callback when video is ready or notify about error

When video is generated and ready to be seen the Callback is sent to target Webhook url. This is useful when some 3th party application should be notified, especially needed for marketing automation scenarios.

{
  "paramTextName": "Hello World!",
  "paramNumberName": "123",
  "paramBooleanName": "true",
  "paramImageName": "https://www.motionlab.io/photo.jpg",
  "paramPlaceName": "Prague",
  "paramEnumName": "prg",
  "paramPageName": "https://www.motionlab.io",
  "id": "{id}",
  "campaignKey": "{campaignKey}",
  "renderStatus": "Rendered",
  "statusMessage": "",
  "Mastercomp": "https://api.motionlab.io/videos/...",
  "Thumbnail0": "https://api.motionlab.io/images/...?type=thumbnail_0",
  "Thumbnail1": "https://api.motionlab.io/images/...?type=thumbnail_1"
}

Also there are possibilities of errors during video generation process like when external image could not be downloaded, or when another external error happened. For these cases the callback informing about problem is also sent to target webhook url.

{
  "paramTextName": "Hello World!",
  "paramNumberName": "123",
  "paramBooleanName": "true",
  "paramImageName": "https://www.motionlab.io/photo.jpg",
  "paramPlaceName": "Prague",
  "paramEnumName": "prg",
  "paramPageName": "https://www.motionlab.io",
  "id": "{id}",
  "campaignKey": "{campaignKey}",
  "renderStatus": "Failed",
  "statusMessage": "",
  "Mastercomp": "https://api.motionlab.io/videos/...",
  "Thumbnail0": "https://api.motionlab.io/images/...?type=thumbnail_0",
  "Thumbnail1": "https://api.motionlab.io/images/...?type=thumbnail_1"
}

Example values for Render status

Rendered

When video is successfully generated

Failed

When some error is blocking the generating of video

TestMode

When video is not created, but is used the TestMode

statusMessage

The additional information about video status

Language
Authentication
Query
Click Try It! to start a request and see the response here!