LightFlow API documentation (1.0.2)

Download OpenAPI specification:Download

Authentication

bearerAuth

Security scheme type: HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

Introduction

LightFlow is a video platform that leverages the use of artificial intelligence to optimize the quality of your videos at the most effective bitrate. LightFlow is API driven and can be easily integrated in your current media workflow with a few API calls.

Get an API token

LightFlow API uses a token for authentication. A default token is generated automatically for every new user. The token can be regenerated in the Settings section of the LightFlow portal.

Token generation view

Publish an asset

An asset is a video, including the output formats used to watch it online and offline, and the set of optimizations applied to maximize the viewers quality of experience. To publish an asset, send a POST to the /assets endpoint:

curl -XPOST 'https://api.lightflow.media/assets' \
  -H 'authorization: Bearer API_KEY' \
  -H 'content-type: application/json' \
  -d '{
      "parameters": {
        "input": {
          "urlPath": "https://xx.com/your-video.mp4"
        },
        "perceptual-quality": {
          "h264": {
            "maxBitrate": 8000,
            "minBitrate": 250,
            "maxResolution": 1080,
            "targetQuality": 100
          }
        }
      }
    }'

In the example above, an optimized version of "your-video.mp4" is published, ready to be delivered as MP4 file and HLS and MPEG-DASH streams.

Watch the video

As soon as the status of the asset changes to "finished", the video is ready for playback. The status of the assets can be monitored using callbacks. See the [Using Callbacks] (https://dashboard.lightflow.media/documentation.html#tag/Using-Callbacks) section for further information. To play back the video, create a playback URL using the asset uuid and open the URL in your preferred browser


You can also create a playback URL using the asset uuid and watch the video in your preferred browser, delivered using HLS or MPEG-DASH protocols.

HLS stream URL:

https://video.lightflow.media/hls/[UUID]/master.m3u8

MPEG-DASH stream URL:

https://video.lightflow.media/dash/[UUID]/manifest.mpd

Alternatively the video can be watched in the View Asset section of the LightFlow portal, together with an analyis of the video output quality, by clicking on the view icon in the list of assets in the LightFlow portal LightFlow portal.

API call errors

The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response is a JSON with the following format:

{
  "message": "asset not found"
}

Asset processing errors

Asset object provides information on processing error. Example

{
  ...
  "assetError": {
    "code": 2404,
    "message": "Error downloading input file: remote server returned HTTP 404"
  }
  ...
}

Error codes list

General errors

  • 1001: Unknown error
  • 1002: Error on asset creation
  • 1003: Error on asset processing

Storage errors

  • 2001: Error downloading input file
  • 2002: Error downloading input file: could not connect to remote server
  • 2003: Input file is invalid or corrupt
  • 2004: Input file bitrate exceeds the allowed limit for trial accounts
  • 2005: Input file duration exceeds the allowed limit for trial accounts
  • 2006: Input file format is not valid for 4K: asset has a width below 2560 pixels
  • 24XX: Range (2400-24XX). Represents HTTP 4XX error returned by remote server while attempting to download the input file:
    • 2401: Unathorized (please review your bucket credentials)
    • 2403: Forbidden (your user have not access to the resource)
    • 2404: Not found (the resource does not exist)
    • 2429: Too many requests (the external service is overloaded, try again later)
  • 25XX: Range (2500-25XX). Represents HTTP 5XX error returned by remote server while attempting to download the input file:
    • 2500: Remote server problem (the external service is not responding, try again later or contact support)
    • 2503: Service unavailable (trythe external service is not responding, again later or contact support)
    • 2504: Gateway timeout (the external service is not responding, try again later or contact support)

Brightcove errors

  • 3001: Error connecting to Brightcove
  • 3002: Brightcove encoder: input file is invalid or corrupt
  • 3003: Reference Id assigned to this asset is already in use and could not be published in Brightcove
  • 3004: Brightcove encoder: Error creating the encoding profile for this asset
  • 3005: Error publishing asset on Brightcove

Packaging/Uploading errors

  • 4001: Error uploading MP4 result files
  • 4002: Error uploading DASH result files
  • 4003: Error uploading HLS result files
  • 4004: Error connecting to upload server
  • 4005: Unknown error preparing/uploading output files

Protection errors

  • 2050: EZDRM response is not the expected
  • 2051: EZDRM request timed out
  • 2052: EZDRM request has too many redirects
  • 2053: EZDRM returned a general http error
  • 2054: EZDRM general resquest error
  • 2055: EZDRM request returned internal server error
  • 2060: Irdeto response is not the expected
  • 2061: Irdeto request timed out
  • 2062: Irdeto request has too many redirects
  • 2063: Irdeto returned a general http error
  • 2064: Irdeto general resquest error
  • 2065: Irdeto request returned internal server error
  • 2070: Not drm protection selected

Supported video formats

LightFlow supports a wide range of media containers, video and audio codecs:

Containers 3g2, 3gp, aac (dts), asf, avi, dif,
dv, f4v, flv, m4a, m4v, mkv, mj2, mov,
mp3, mp4, mpeg, mpegts, mpg, mxf,
ogg, ps, ts, webm, wmv
Video codecs DiVX, DV, DV25, DV50, DVCPro 50,
H.263, H.264, H.265 (HEVC),
IMX 30, ProRes, Motion-JPEG,
MPEG HDV 1080i, MPEG V1 Layer 2,
MPEG2 V2 (m2v1), MPEG4 Part 2,
MPEG XDCAM HD422, VP8, VP9, WMV
Audio codecs AAC, HE-AAC, mp3 (MPEG V1 Layer 2 & 3),
PCM, WMA2, WMV (pro)

Supported Input/Output storage

LightFlow supports a wide variety of input and output storage types. If you don't see your storage solution here, please contact Lightflow support for assistance.

Input & Output

To create an storage location as source/destination of videos for Lightflow, send a POST request to the /inputs-outputs endpoint. The response will include the unique identifier of the input/output storage location, which can be later selected as input InputId and/or output OutputId when posting a video. Click on the links above for guides to configure specific storage types.

Supported Encoders

LightFlow features UltraFast Encoding, which segments the source video into chunks fed to multiple encoder instances for ultrafast encoding. Altenatively a 3rd party encoder can be used. Currently the following encoders are supported:

  • LightFlow UltraFast Encoder
  • AWS Media Convert
  • Brightcove CMS

To add your encoder to the LightFlow workflow, send a POST request to the /encoders endpoint. The response will include the unique identifier of the encoder, which can be later selected as encoder when posting a video. Please contact LightFlow support if you wish your current encoder to be added to LightFlow.

Content Aware Optimization (CAO) configuration

LightFlow uses artificial inteligence to determine the most optimal bitrate ladder and encoding configuration for every individual video. This results on significant bitrate reductions and perceptual quality improvements. Pre-set CAO configurations are available in LightFlow for the most common business requirements, and additionally a number of parameters are configurable, to adjust the video output to specific requiremments. Content Aware Optimization is applied to every new video uploaded:

  • targetQuality: Target perceptual video quality in LQIs (0-100, being 100 the highest quality). LQI is the LightFlow Quality Index - measurement for the perceptual video quality.
  • maxBitrate: Upper bitrate limit. LightFlow will consider renditions at higher bitrates until any of the following conditions are met:
    • maxBitrate is reached.
    • targetQuality is reached.
    • Next bitrate does not bring significant perceptual quality increase.
  • minBitrate: Lower bitrate limit for the the lowest rendition.
  • maxMinBitrate: Upper bitrate limit for lowest rendition. The bitrate of the lowest rendition can be forced by setting minBitrate = maxMinBitrate.
  • maxResolution: 720p or 1080p for SD/HD; 1440p or 2160p for 4K.
  • minResolution: 240, 288p or 384p.
  • maxFPS: Maximum frames per second to be used for the asset (ex: "25"). Set to "auto" to passthrough frames per second of the video source.
  • maxRenditions: Maximum number of renditions to generate. Its default value is 0, what means LightFlow will select the max number of renditions on its own.

For detailed information of the configuration parameters see the API reference guide.

Publish an asset in LightFlow Portal

To publish a video, go to the Publish section of the LightFlow portal, and follow 5 simple steps:

1. Select Input

Once the type of input (S3, NetStorage, FTP, other...) is selected, the following information is required:

  • http/s URL: URL to the video (Youtube and Vimeo URLs are supported), or alternatively
  • path: path of the input video

alternate Input

The supported input formats can be checked here (https://lightflow.media/documentation.html#section/Supported-formats).

2. Select your business priority

Ouputs generated by Lightflow can be customized to take into account your business priorities. Do you concern about video quality or costs savings? Five profiles can be applied, from left (will maximixe costs savings over quality) to right (will maximize quality over costs savings).

alternate Optimization

3. Select which Optimization you want to apply

Three optimization features can be applied: Optimization for SD/HD, Optimization for 4K or Both.

  • Optimization for SD/HD: LightFlow will calculate the optimal bitrate ladder for up to 1080p.
  • Optimization for 4K: LightFlow will calculate the optimal bitrate ladder for up to 4k.
  • Both: Both optimizations will be performed.

alternate Optimization

Input filters & packaging options

The following filtering and packaging options can be configured:

  • Input Filters: to deinterlace the input video, check the Deinterlace input video box.
  • Output Packaging:
    • Enable MP4 files: Default option.
      • Enable DASH packaging: The transcoded .mp4 content will be packaged into DASH format. This option is ENABLED by default if LightFlow is selected as delivery platform.
      • Enable HLS packaging: The transcoded .mp4 content will be packaged into HLS format. This option is ENABLED by default if LightFlow is selected as delivery platform.

4. Select Encoder

Three options available:

  • LightFlow UltraFast encoder: default option.
  • Your own encoder: Currently AWS MediaConvert and Brightcove encoders are supported.
  • No encoder: The output will be the list of optimal bitrates/resolutions.

alternate Delivery

5. Select Output/delivery

Select the location in which your optimized videos should be stored:

  • LightFlow: LightFlow platform will store and deliver the video.
  • Other Output location: In this case, the following information is required:
    • Path: path of the output directory where the resulting .mp4 files (and HLS/DASH files if selected) for each bitrate/resoluiton will be stored. For example, if the input file name is VideoSample.mp4, and the output path is /OutputDirectory/VideoSampleOutput/, then the resulting output .mp4 files will be uploaded in the output path as follows:
      • /OutputDirectory/VideoSampleOutuput/ output_300.mp4
        • /OutputDirectory/VideoSampleOutuput/ output_720.mp4
        • /OutputDirectory/VideoSampleOutuput/ output_1080.mp4

alternate Encoder

5. Review and publish your asset

Click "Publish Asset!" and you are done!

alternate Review

Set up an S3 storage

To define an S3 bucket as input/output for the videos, go to the Input & Output section of the LightFlow portal, and click on the Amazon S3 icon. To create a new S3 storage location, the following information is required:

Create a Storage location

  • Name: Name of the S3 Location as it will be displayed in LightFlow.
  • Bucket: AWS bucket name.
  • Access key: S3 account access key.
  • Secret key: S3 account secret key.
  • Type: Select either input, output or both input+output (the same bucket can be selected as input and also as repository for the output files).

alternate Input-Output

Create an S3 Storage with the API

curl -XPOST 'https://api.lightflow.media/inputs-outputs' \
  -H 'authorization: Bearer API_KEY' \
  -H 'content-type: application/json' \
  -d '{
      "storageId": "s3",
      "storageType": "input-output",
      "name": "S3 bucket",
      "args": [{
        "id": "bucket",
        "value": "custom_bucket"
      },{
        "id": "accessKey",
        "value": "access_key"
      },{
        "id": "secretKey",
        "value": "secret_key"
      }]
    }'

The response will include the unique identifier of the input/output storage location, which can be later selected as input InputId and/or output OutputId when posting a video.

Set up Akamai Netstorage

To define Akamai NetStorage as input/output for the videos, go to the Input & Output section of the LightFlow portal, and click on the Akamai NetStorage icon. To create a new Netstorage location, the following information is required:

Create Storage endpoint

  • Name: Name of the NetStorage Location as it will be displayed in LightFlow.
  • Hostname: NetStorage hostname, as provided by Akamai.
  • Username: username for an FTP Upload account in Akamai NetStorage(1).
  • Password: password for the FTP Upload account in Akamai NetStorage.
  • Type: Select either input, output or both input+output (the same bucket can be selected as input and also as repository for the output files).

alternate Input-Output

(1) An FTP Upload Account in NetStorage is required.

Create an Akamai NetStorage with the API

curl -XPOST 'https://api.lightflow.media/inputs-outputs' \
  -H 'authorization: Bearer API_KEY' \
  -H 'content-type: application/json' \
  -d '{
      "storageId": "netstorage",
      "name": "My own NetStorage account",
      "storageType": "input-output",
      "args": [{
            "id": "host",
            "value": "netstorage.hostname"
        }, {
            "id": "username",
            "value": "username"
        }, {
            "id": "password",
            "value": "password"
        }]
    }'

The response will include the unique identifier of the input/output storage location, which can be later selected as input InputId and/or output OutputId when publishing a video asset.

Set up a GCS storage

To define a Google Cloud Storage bucket as input/output for the videos, go to the Input & Output section of the LightFlow portal, and click on the Google Cloud Storage icon. To create a new Google Storage location, the following information is required:

Create Storage endpoint

  • Name: Name of the Google Cloud Storage Location as it will be displayed in LightFlow.
  • Bucket: Google Cloud Storage bucket name.
  • Access key: Google Cloud Storage account access key.
  • Secret key: Google Cloud Storage account secret key.
  • Type: Select either input, output or both input+output (the same location can be selected as input and also as repository for the output files).

alternate Input-Output

Create a Google Cloud Storage location with the API

curl -XPOST 'https://api.lightflow.media/inputs-outputs' \
  -H 'authorization: Bearer API_KEY' \
  -H 'content-type: application/json' \
  -d '{
      "storageId": "gcs",
      "storageType": "input-output",
      "name": "My Google Storage bucket",
      "args": [{
        "id": "bucket",
        "value": "custom_bucket"
      },{
        "id": "accessKey",
        "value": "access_key"
      },{
        "id": "secretKey",
        "value": "secret_key"
      }]
  }'

The response will include the unique identifier of the input/output storage location, which can be later selected as input InputId and/or output OutputId when publishing a video asset.

Set up a FTP or SFTP storage

To define a FTP/SFTP repository as input/output for the videos, go to the Input & Output section of the LightFlow portal, and click on the FTP/SFTP icon. To create a new FTP/SFTP location, the following information is required:

Create Storage endpoint

  • name: Name of the FTP/SFTP Location as it will be displayed in LightFlow.
  • hostname: FTP/SFTP server hostname.
  • port: FTP/SFTP server port.
  • username: user name in the FTP/SFTP server.
  • password: password of the FTP/SFTP user.
  • Is secure server: Checked for SFTP.
  • type: select input, output or input/output.

Create an FTP/SFTP location with the API

curl 'https://api.lightflow.media/inputs-outputs'
-H 'authorization: Bearer
-H 'content-type: application/json'
--data-binary '{
    "storageId":"ftp",
    "storageType":"input-output",
    "name":"My own FTP storage"
    "args":[{
        "id":"host",
        "value":"ftp.lightflow.com"
    },{
        "id":"port",
        "value":21"
    },{
        "id":"username",
        "value"user"
    },{
        "id":"password",
        "value"pwd"
    },{
        "id":"secure",
        "value"false"

    }]
  }'

The response will include the unique identifier of the input/output storage location, which can be later selected as input InputId and/or output OutputId when publishing a video asset.

Set up EZDRM

To define EZDRM as the DRM provider used to protect your videos, go to the DRM section of the LightFlow portal, and click on the EZDRM icon. The following information is required:

Setup your EZDRM drm account

  • Name: Name of the DRM as it will be displayed in LightFlow.
  • Username: EZDRM username.
  • Password: EZDRM password.

drm

Setup your EZDRM DRM account with the API

curl -XPOST 'https://api.lightflow.media/drms' \
  -H 'authorization: Bearer API_KEY' \
  -H 'content-type: application/json' \
  -d '{
      "name": "EZDRM Universal over MPEG DASH",
      "type": "ezdrm",
      "username": "username",
      "password": "password"
    }'

The response will include the unique identifier (UUID) of the DRM, which can be later used to apply DRM to a video.

Watermarks

LightFlow supports adding one or more watermarks to your assets. A watermark is an image overlaid on a video which is often used for security and/or branding reasons.

You can add watermarks to your video using the watermarks filter of the [Asset Creation API](https://dashboard.lightflow.media/documentation.html#tag/Assets/paths/~1assets/post). You will need to indicate from where the overlay image should be retrieved (HTTP url or using any of the storage providers supported by LightFlow) and the watermark placement options.

curl -XPOST 'https://api.lightflow.media/assets' \
  -H 'authorization: Bearer API_TOKEN' \
  -H 'content-type: application/json' \
  -d '{ \
      "parameters": { \
          "input": { \
              "urlPath": "http://someserver.com/VideoSample.mp4" \
            }, \
            "output": { \
              "filters": { \
                  "watermarks": [{ \
                      "input": { \
                          "urlPath": "https://dashboard.lightflow.media/assets/img/lightflow-135x42-bw.png" \
                      }, \
                      "config": { \
                          "opacity": 100, \
                          "top": "100", \
                          "left": "100" \
                      } \
                    }] \
                } \
            }, \
            "perceptual-quality": { \
              "h264": { \
                  "maxBitrate": 8000, \
                    "minBitrate": 250, \
                    "maxResolution": 1080, \
                    "targetQuality": 100 \
                } \
            } \
      } \
    }'

Placement settings

  • opacity: How opaque the overlay should appear (0-100).
  • top: Top position of the watermark as a percent ("5%") of the video height or as an absolute pixel value ("100").
  • bottom: Bottom position of the watermark as a percent ("5%") of the video height or as an absolute pixel value ("100").
  • left: Left position of the watermark as a percent ("5%") of the video width or as an absolute pixel value ("100").
  • right: Right position of the watermark as a percent ("5%") of the video width or as an absolute pixel value ("100").
  • width: Width of the watermark as a percent ("20%") of the video width or as an absolute pixel value ("120"). If both, width and height are empty, source image width and height will be used. If only height is specified, width is automatically calculated to keep aspect ratio.
  • height: Height of the watermark as a percent ("20%") of the video width or as an absolute pixel value ("150"). If both, width and height are empty, source image width and height will be used. If only width is specified, height is automatically calculated to keep aspect ratio.

Using Callbacks

LightFlow uses callbacks to let your applications track the status of the assets aynchronously. Upon completion of a new video publishing, LightFlow will make a request to the callback URL reporting the the processes was succesful or if there was any error.

Callbacks are defined in the endpoint responsible of publishing new assets

curl -XPOST 'https://api.lightflow.media/assets' \
  -H 'authorization: Bearer API_TOKEN' \
  -H 'content-type: application/json' \
  -d '{ \
      "parameters": { \
          "input": { \
              "urlPath": "http://someserver.com/VideoSample.mp4" \
          }, \
          "perceptual-quality": { \
              "h264": { \
                  "maxBitrate": 8000, \
                  "minBitrate": 250, \
                  "maxResolution": 1080, \
                  "targetQuality": 100 \
              } \
          }, \
          "callbacks": [ \
              { \
                  "url":"https://callback.epiclabs/ingest", \
                  "headers":[ \
                    { \
                      "name": "Authorization", \
                      "value" : "Bearer <JWT TOKEN>" \
                    }, \
                    { \
                        "name": "X-Custom-Header", \
                        "value" : "X-Custom-Header-Value"
                    } \
                  ], \
                  "method":"POST", \
              } \
          ] \'
      } \
    }'

Arguments

  • url: Defines the public accesible endpoint exposed by you and that will be called by LightFlow when the callback mechanism is triggered. Mail adressess are also supported following the format "mailto:johndoe@epiclabs.io". A mail will be delivered to the specified address.

  • headers: Optional field, its default value is empty. Accepts an array of objects with the keys 'name' and 'value'. List of HTTP headers that will be sent by LightFlow when doing a request to your endpoint.

  • method: Optional field, its default value is 'POST'. HTTP request methods. Possible values

    • GET: As it is a GET request, request body will be empty. Parameters 'status' and 'endDate' are variables provided by LighFlow to your endpoint as query params.

    • POST: This is the default method. Request body format:

        {
          "uuid": "6b48fbce-cd10-459c-b397-5673e4bbafaf",
          "assetName": "T1S03",
          "inputUrl": "https://storage.googleapis.com/T1S03.mp4"
          "username": "jonhdoe@epiclabs.io",
          "startDate": "2019-02-14T20:32:48.898Z",
          "endDate": "2019-02-14T20:43:11.825Z",
          "status": "finished",
          "metadata": {},
          "duration": 120,
          "assetUrl": "https://dashboard.lightflow.media/perceptual-quality/6b48fbce-cd10-459c-b397-5673e4bbafaf",
          "thumbnail": "http://video.lightflow.media/thumb/6b48fbce-cd10-459c-b397-5673e4bbafaf?time=50&width=320"
        }

      Description of callback properties:

      • uuid: uuid of the published asset.
      • assetName: Name of the asset as it was set during its creation.
      • inputUrl: Url or path from which the asset video source was retrieved.
      • username: User who published the asset.
      • startDate: When the asset started to be processed.
      • endDate: When the asset ended to be processed.
      • status: Asset status
      • metadata: Metadata associated with the asset as it was set during its creation.
      • duration: Duration of the asset, in seconds.
      • assetUrl: Link in LightFlow dashboard that shows information about the published asset.
      • thumbnail: Link to a thumbnail extracted from the asset.
    • PUT: Request body:

        {
          "uuid": "6b48fbce-cd10-459c-b397-5673e4bbafaf",
          "assetName": "T1S03",
          "inputUrl": "https://storage.googleapis.com/T1S03.mp4"
          "username": "jonhdoe@epiclabs.io",
          "startDate": "2019-02-14T20:32:48.898Z",
          "endDate": "2019-02-14T20:43:11.825Z",
          "status": "finished",
          "metadata": {},
          "duration": 120,
          "assetUrl": "https://dashboard.lightflow.media/perceptual-quality/6b48fbce-cd10-459c-b397-5673e4bbafaf",
          "thumbnail": "http://video.lightflow.media/thumb/6b48fbce-cd10-459c-b397-5673e4bbafaf?time=50&width=320"
        }
  • source: Optional field, its default value is 'lightflow'. When you are publishing an asset in LightFlow you can define which type of encoder you would like to use: use LightFlow encoder (the preffered method) or leverage any encoder resource that you already have (ex: Brightcove ZEncoder). These third party encoders tipically have their own callback mechanisms. With this field you can define which callbacks you would like to use, the ones raised by LightFlow or the ones raised by your encoder provider. Possible values:

    • lightflow: default option. Lightflow responsible of doing callbacks.
    • encoder: only applicable if client is using a third party encoder. LighFlow will pass callback information to the specified encoder, so the encoder will be one triggering the callback when encoding is done.
  • onSuccess: Optional field, its default value is 'true'. Defines in which cases the callback should be executed. Possible values:

    • true: callback is executed when the asset is published successfully.
    • false: callback won't be executed when the asset is published successfully.
  • on Failure: Optional field, its default value is 'true'. Defines in which cases the callback should be executed. Possible values:

    • true: callback is executed when there was an error while publishing the asset.
    • false: callback won't be executed when the asset could not be published due to any error.

Assets

An asset is a video, including the output formats used to watch it online and offline, and the set of optimizations applied to maximize the viewers quality of experience. The assets generated by LightFlow are ready to be streamed through Internet.

List assets

Returns history of assets.

Authorizations:
query Parameters
pageIndex
number

Pagination page index

pageSize
number

Pagination page size

creationDateFrom
ISO format date

Created date from filter

creationDateTo
ISO format date

Created date to filter

features
Comma-separated string values

Features filter (perceptual-quality, perceptual-quality-per-scene, content-moderation, archive-enrichment, taxonomy-classifier, face-recognition)

status
Comma-separated string values

Status filter (queued, running, error, finished, canceled)

inputUrlPath
string

Input URL filter

uuid
string

Asset UUID filter

name
string

Name filter

referenceId
string

Reference ID filter

tags
string

Tags filter

Responses

200

List of assets

401

Access token is missing or invalid

get /assets

Production API Url

https://api.lightflow.media//assets

Request samples

Copy
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
  
xhr.addEventListener('readystatechange', function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});
    
xhr.open('GET', '/assets');
xhr.setRequestHeader('Authorization', 'Bearer eyJh...');
xhr.setRequestHeader('Accept', 'application/json');
xhr.setRequestHeader('Content-Type', 'application/json');

xhr.send(data);

Response samples

application/json
Copy
Expand all Collapse all
{
  • "totalItems": 0,
  • "pageIndex": 0,
  • "pageSize": 0,
  • "pages": 0,
  • "items":
    [
    ]
}

Create an asset

Creates a new asset for video optimization or cognitive services.

Authorizations:
Request Body schema: application/json
label
string

The asset will be tagged with a label. Usage and billing information for assets /reports/usage-metrics can be then filtered by the label (100 characters max).

priority
number
Default: 50

Priority of the asset processing to start. Value between 0 (lowest) to 100 (highest).

parameters
object

Asset configuration.

callbacks
Array of objects

List of callbacks that will be used to notify when the asset processing task is done.

metadata
object

Asset metadata.

Responses

200

Created asset

401

Access token is missing or invalid

post /assets

Production API Url

https://api.lightflow.media//assets

Request samples

application/json
Copy
Expand all Collapse all
{
  • "label": "string",
  • "priority": 50,
  • "parameters":
    {
    },
  • "callbacks":
    [
    ],
  • "metadata":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "uuid": "string",
  • "username": "string",
  • "accountName": "string",
  • "creationDate": "2019-07-09",
  • "status": "string",
  • "stage": "string",
  • "priority": 50,
  • "assetError":
    {
    },
  • "parameters":
    {
    },
  • "callbacks":
    [
    ],
  • "playbackManifests":
    [