Video Asset File

There are three ways to create a Video Asset File, depending on what is available to you

1. VAST Code

If you have a VAST code already, send it via sourceparameter, and sendsubtype=vast_code to Create Asset File endpoint.

2. VAST URL

For VAST URL, send it via urlparameter and send subtype=vast_urlto Create Asset File endpoint.

3. A public URL to a video file or a local video file

  1. If you don’t have a public URL, upload the file using our File Upload API
  2. Send the public URL as url parameter, send subtype=uploadalongside width, height, mime and duration parameters to Create Asset File API endpoint.

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.