Stream Video File - Direct Upload

This guide will show you how to upload video files to LiveAPI and get them ready for streaming to your audience.

There are 2 ways to upload a video to LiveAPI:

  1. Upload via 3rd-party URL
  2. Directly upload a file from a local machine

This article will explain how to upload video files directly from a local machine.

The process involves directly uploading the file to a provided link, making it not resumable. If there is an error in your network connectivity while uploading, it will require a start over.

Directly uploading files from your local machine is recommended for file size <5GB. For files that are >5GB in size, we recommend using the Multipart Upload feature that's coming soon.

Before You Begin

You need to have access to LiveAPI Access Token. Refer to the Authentication in LiveAPI section to learn how to generate an access token via the LiveAPI dashboard.

Step 1: Create a video object

You can make a POST /videos call to create a new video object.

Sample request:

curl --location --request POST '' \
--header 'Content-Type: application/json' \
--header 'Authorization: {your_authentication}'

Sample Response:

Here you will need the _id of the video object for moving on to the next step.

    "_id": "6215df773a13b3c407dc09u8",
    "playback": {
        "embed_url": "",
        "hls_url": ""
    "user": "620e0ba1ce8f11ddde571d1c",
    "environment": "production",
    "organization": "620e0ba2ce8f11ddde571d1d",
    "creation_time": "2022-02-23T07:17:11.940Z"

Step 2: Get a Signed Link for Direct Upload

To generate a signed link for uploading a file to the video object you created in Step 1, use POST /videos/{video-id}/uploads with {video-id} taken from _id in Step 1.

Sample request:

curl --location --request POST '' \
--header 'Content-Type: application/json' \
--header 'Authorization: {your_authentication}'

Sample Response:

The response contains the Signed Link for Step 3.

    "url": ""


Signed Link expiration

The Signed Link expires after 6 hours from creation time, and you won't be able to upload to that link anymore.

Step 3: Upload a local video file to the Signed link location

Once you get the Signed link from Step 2, you can start uploading your file.

Sample request:

Replace the --data-binary field with the local link to your file.

curl --location --request PUT '' \
--header 'Content-Type: application/json' \
--data-binary '@/C:/Users/tamhm/Files/Sample_Video_LiveAPI.mp4'

After uploading the video file successfully, the response will return a 200 success code. Then you can call to GET /videos/{id} to retrieve the video details with the {id} being the video identifier.

If you wish to know more about how Direct Link Upload works, please visit this article from AWS.


Supported Formats

LiveAPI supports all formats which ffmpeg supports. For the full list, you can refer to here.

Webhook supported for Video

You can get a list of webhook events we supported for Video here.


Files are kept 15 days after account is expired

When your subscription plan ends, LiveAPI will continute to store your files for the next 15 days. After that, the files will be deleted permanently.