Video Creative

Make sure you have a Video Asset File for the Main Video and optionally an HTML or Image Asset File for the End Card. Also make sure to have Tracker Asset as it is required.

📘

If you have your own VAST Code or VAST URL then End Card and Tracker Asset are ignored

Following are the relevant parameters to use with Create Creative API:

  • asset_file_id
  • end_card_id
  • end_time
  • name
  • rewarded_type
  • start_time
  • tracker_id
  • type: must be video

Guidelines for Managing Large Video Files (More Than 10MB)

If a video asset file is larger than 10MB, it will be automatically compressed. The video asset file cannot be used to create a creative until it has been compressed. Attempting to use it before compression will result in a validation error when calling the creative creation API.

To determine if the compression process is complete, check the processing field. If compression is in progress, the value will be:

"processing": {  
  "type": "mk_compress",  
  "status": "COMPRESSING",

If you try to create a creative at this moment, a validation error will occur.

Therefore, the logic for creating a video creative should be as follows:

  1. Upload the file.
  2. Create a video asset file.
  3. Check the asset file API response
    • If processing.type == 'mk_screenshot' || (processing.type == 'mk_compress' && processing.status == 'COMPLETE'),
      then create the creative.
    • If processing.type == 'mk_compress' && processing.status == 'COMPRESSING',
      then wait two minutes, load the asset file, and repeat step 3.
    • If processing.type == 'mk_compress' && processing.status == 'ERROR',
      then stop the script and contact support team or wait some time (an hour or more) and perform step 2 again - create asset file again.