Uploading videos with the API

Upload videos to Livid from your own code in three steps: create the video, send the file, finish the upload. Plus supported file types, limits and common errors.

The Livid API lets you upload videos from your own server, script or app, including large files. You'll need an API token with the Write permission.

Full technical details are in the Livid API reference.

The three steps

1. Create the video

Send POST /videos  with a title. You can also set the folder (parentFolderId ), privacy, description and other settings. Anything you leave out uses your organization's defaults.

👉 If you know the file's size, send it as fileSizeBytes . Livid then tells you straight away if the file won't fit in your storage, before you spend time uploading it.

You'll get back the new video, including its ID, watch link and embed link, plus an upload link (upload.url ).

2. Send the file

Send the video file to the upload link with PUT . The file itself is the body of the request. The upload link doesn't need your token, so don't send it there.

Each upload link takes one file. To send a different file, create the video again.

3. Finish the upload

Send POST /videos/{video}/upload/complete . Livid checks the file and starts processing it.

Optionally, include the file's MD5 so Livid can check the file arrived exactly as it left your computer.

👉 Finish within two days of creating the video. Unfinished uploads are removed automatically after that.

Knowing when it's ready

The video appears in your library once processing starts. To know when people can watch it, check GET /videos/{video}  every few minutes until its status  is ready . If it becomes failed , the file couldn't be processed.

Supported file types

mp4, mov, m4v, webm, mkv, avi, wmv, flv, 3gp, ogv, ts, mts and m2ts.

Livid checks the file when it processes it, so a file that isn't a video will upload fine but end up with a failed  status.

Storage

  • Uploads that would take you over your plan's storage are refused with a 403
  • A video that's been created but not finished counts toward your storage at the size you gave, so several uploads started at once all have to fit
  • See How storage is counted

Limits

Creating videos is limited to 10 requests per second for your organization. Uploading thumbnails, uploading captions, creating folders and searching videos by title each have their own limit of 10 per second too.

If you go over, you'll get a 429  response. Wait for the number of seconds in the Retry-After  header, then try again.

Common errors

Code What it usually means
400 Something in the request is wrong, like a misspelled field or a file that isn't the size you said. The message explains
401 The token is missing, wrong, revoked or expired
403 The token doesn't have the right permission, your plan doesn't include something you asked for, or there isn't enough storage
404 The video or folder doesn't exist in your organization
409 The upload was already finished
429 Too many requests. Wait and try again

FAQs

Can I upload to a specific folder? Yes. Send the folder's ID as parentFolderId  when you create the video.

Can I set privacy when uploading? Yes. Send privacy  as private , unlisted , public  or password . Unlisted and password need a plan that includes them.

Can I add captions and a thumbnail? Yes. Once the video exists, you can upload captions (SRT or WebVTT) and a thumbnail (JPEG, PNG or WebP, up to 10MB) through the API.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us