Regular video upload
api.video provides different ways to upload your videos. There are two ways to upload with tokens, and then there are two ways to upload depending on whether your video is over 200MiB or under. This guide walks through how to do regular video upload for a video under 200MiB in size.
Check out the guide on Progressive upload to understand how to upload videos larger than 200MiB in size.
Megabyte (MB) and Mebibyte (MiB) are both used to measure units of information on computer storage. 1 MB is 1000Kb (kilobytes), and 1 MiB is 1048.576Kb. api.video uses MiB.
Video upload overview
This section gives you an overview of your upload options. This guide walks through regular uploads but describes all the available choices here.
If you want to learn about delegated uploads, which are useful for creating private videos, or allowing your viewers to upload content themselves, or even just making it easier for you to do uploads, check out the Delegated upload tokens guide.
The two token-based upload methods are:
- Regular upload - you use an access token you retrieved when you authenticate to do a two-step process where you create a video object with metadata, retrieve the video ID, and use that to upload your video into the object.
- Delegated upload - you create a token and use the token to upload your video in one step. You can change the metadata later on.
There are two types of upload depending on whether your video is over 200MiB or under. You can use either a regular or delegated upload for a video under 200MiB. If your video is over 200MiB, you can do a progressive upload, where you break a video into chunks and then upload the pieces using parts in the header. You can also use bytes in the header, which is a bit more complicated. If you use one of the clients, big uploads are handled for you using the bytes method. You can also use the progressive upload method if you wish, though the steps require a bit more effort.
Create an account
Before you can start uploading your first video, you need to create an api.video account.
Once you are logged in to the Dashboard, select the environment of your choice (sandbox or production) and copy your API key.
Choose an API client
The clients offered by api.video include:
To install your selected client, do the following:
Upload a video file
Create the video object
The first step to uploading a video is to create a video object. Once you create the object, you can use it to upload a video. Here is the basic minimal code to create the object:
your_api_key by the key you have already copied from dashboard.api.video
The response to your API request will return the following, along with other params:
If you are using one of our API clients, you will find the above information in the returned response's
Upload your file into the video object
In the first step, you created the video object. Next, you need to upload the video file into the video object using this API request:
Watch and share your video
To watch your video, just paste the link into your favorite browser. Use the same link to share your video.
If you're just getting started, this two-part upload process is ideal for you. If you choose to use one of our clients, handling large files is done for you by the client. If you want to try a progressive upload, these are best when you're working with huge files and you want to send the parts of them concurrently.
Was this page helpful?