How can we help?

Using the Upload API Endpoint Follow

It's possible to upload local files to the platform using the Upload API Endpoint using a POST request, sending the video file as binary in the payload. 

  1. Using Insomnia/Postman
  2. Python Script Example

To get familiar with the endpoint we recommend testing the endpoint with Insomnia, Postman, or a similar tool. 

Note: At the moment, only local files are supported by the endpoint

Using Insomnia/Postman

To upload a video using Insomnia, you have to set the body as multipart and add the file and all the other necessary parameters.  

The upload[file] parameter needs to be changed to type 'File' using the small arrow at the right side of the row.

The Multipart body should look similar to the sample image.



The response of the API will be a '201 - Created' with the JSON of the new video object as Body.



Python Script Example:

This a quick sample of a python script using the requests and requests_toolbelt libraries to create the multipart body and send the POST request. The clint library is used for monitoring the upload.

import requests
from clint.textui.progress import Bar as ProgressBar # Library to monitor the upload
from requests_toolbelt.multipart.encoder import MultipartEncoder, MultipartEncoderMonitor

# Optional callback to monitor the upload
def create_callback(encoder):
encoder_len = encoder.len
bar = ProgressBar(expected_size=encoder_len, filled_char='■')
def callback(monitor):
return callback

file_path = '/Users/user/video.mp4' # file path
api_key = 'YOUR_API_KEY' # You API_key

file = open(file_path, 'rb')

# Sample Payload
e = MultipartEncoder({'upload[file]': (, file, 'application/octet-stream'),
'upload[active]': 'True',
'upload[title]': 'Title From Python - Monitored with bar'})

callback = create_callback(e)

payload = MultipartEncoderMonitor(e, callback)
url = "{}".format(api_key)

print('Uploading {}'.format(
r =, data=payload, headers={'Content-Type': payload.content_type})
except Exception as x:
print('Status: Error ', x)
print('Status: Success ', r.status_code)


Please sign in to leave a comment.