/videosList all the video objects that are associated with the current workspace.
titlestringThe title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles.
tags[]arrayA tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned.
metadataobjectVideos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter.
descriptionstringRetrieve video objects by description.
liveStreamIdstringRetrieve video objects that were recorded from a live stream by liveStreamId.
sortBystringUse this parameter to sort videos by the their created time, published time, updated time, or by title.
sortOrderstringUse this parameter to sort results. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A.
currentPageintChoose the number of search results to return per page. Minimum value: 1
pageSizeintResults per page. Allowed values 1-100, default is 25.
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#list
require __DIR__ . '/vendor/autoload.php';
$client = new \ApiVideo\Client\Client(
'https://ws.api.video',
'YOUR_API_KEY',
new \Symfony\Component\HttpClient\Psr18Client()
);
// list all videos (all pages)
$allVideos = [];
do {
$currentPage = $client->videos()->list([]);
$allVideos = array_merge($allVideos, $currentPage->getData());
} while($currentPage->getPagination()->getCurrentPage() < $currentPage->getPagination()->getPagesTotal());
// list videos that have all the given tags (only first results page)
$videosWithTag = $client->videos()->list(['tags' => ['TAG2','TAG1']]);
// list videos that have all the given metadata values (only first results page)
$videosWithMetadata = $client->videos()->list(['metadata' => ['key1' => 'key1value1', 'key2' => 'key2value1']]);
Success
{
"data": [
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"playerId": "pl45KFKdlddgk654dspkze",
"title": "Maths video",
"description": "An amazing video explaining the string theory",
"language": "en",
"languageOrigin": "api",
"public": false,
"panoramic": false,
"mp4Support": true,
"tags": [
"maths",
"string theory",
"video"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"publishedAt": "2019-12-16T08:25:51+00:00",
"updatedAt": "2019-12-16T08:48:49+00:00",
"discarded": false,
"discardedAt": null,
"deletesAt": null,
"source": {
"uri": "/videos/c188ed58-3403-46a2-b91b-44603d10b2c9/source"
},
"assets": {
"iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
"player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
"hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
"thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
"mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
}
},
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"title": "Video Title",
"description": "A description for your video.",
"language": "en",
"languageOrigin": "api",
"public": false,
"panoramic": false,
"mp4Support": true,
"tags": [
"books",
"short stories"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Science Fiction",
"value": "Cyberpunk"
},
{
"key": "Technology",
"value": "Computers"
}
],
"publishedAt": "2019-12-16T08:25:51+00:00",
"updatedAt": "2019-12-16T08:48:49+00:00",
"discarded": false,
"discardedAt": null,
"deletesAt": null,
"source": {
"uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
},
"assets": {
"iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
"player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
"hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
"thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
"mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
}
},
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"playerId": "pl45KFKdlddgk654dspkze",
"title": "My Video Title",
"description": "A brief description of the video.",
"language": "fr",
"languageOrigin": "api",
"public": false,
"panoramic": false,
"mp4Support": true,
"tags": [
"General",
"Videos"
],
"metadata": [
{
"key": "Length",
"value": "Short"
}
],
"publishedAt": "2019-12-16T08:25:51+00:00",
"updatedAt": "2019-12-16T08:48:49+00:00",
"discarded": false,
"discardedAt": null,
"deletesAt": null,
"source": {
"uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
},
"assets": {
"iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
"player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
"hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
"thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
"mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
}
}
],
"pagination": {
"currentPage": 1,
"pageSize": 25,
"pagesTotal": 1,
"itemsTotal": 11,
"currentPageItems": 11,
"links": [
{
"rel": "self",
"uri": "https://ws.api.video/videos?currentPage=1"
},
{
"rel": "first",
"uri": "https://ws.api.video/videos?currentPage=1"
},
{
"rel": "last",
"uri": "https://ws.api.video/videos?currentPage=1"
}
]
}
}/videosCreates a video object. More information on video objects can be found here.
titlestringrequired
The title of your new video.
descriptionstringA brief description of your video.
sourcestringYou can either add a video already on the web, by entering the URL of the video, or you can also enter the videoId of one of the videos you already have on your api.video acccount, and this will generate a copy of your video. Creating a copy of a video can be especially useful if you want to keep your original video and trim or apply a watermark onto the copy you would create.
publicbooleanDefault: True. If set to false the video will become private. More information on private videos can be found here
panoramicbooleanIndicates if your video is a 360/immersive video.
mp4SupportbooleanEnables mp4 version in addition to streamed version.
playerIdstringThe unique identification number for your video player.
tagsarrayA list of tags you want to use to describe your video.
metadataarrayA list of key value pairs that you use to provide metadata for your video.
keystringThe constant that defines the data set.
valuestringA variable which belongs to the data set.
clipobject (video-clip)Use this object to create a smaller clip from a video you upload.
startTimecodestringThe timestamp that defines the beginning of the video clip you want to create. The value must follow the HH:MM:SS format.
endTimecodestringThe timestamp that defines the end of the video clip you want to create. The value must follow the HH:MM:SS format.
watermarkobject (video-watermark)idstringid of the watermark
topstringDistance expressed in px or % between the top-border of the video and the watermark-image.
leftstringDistance expressed in px or % between the left-border of the video and the watermark-image.
bottomstringDistance expressed in px or % between the bottom-border of the video and the watermark-image.
rightstringDistance expressed in px or % between the right-border of the video and the watermark-image.
widthstringWidth of the watermark-image relative to the video if expressed in %. Otherwise a fixed width. NOTE: To keep intrinsic watermark-image width use initial.
heightstringHeight of the watermark-image relative to the video if expressed in %. Otherwise a fixed height. NOTE: To keep intrinsic watermark-image height use initial.
opacitystringOpacity expressed in % only to specify the degree of the watermark-image transparency with the video.
languagestring or nullUse this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the IETF language tag format.
language is a permanent attribute of the video. You can update it to another language using the PATCH /videos/{videoId} operation. This triggers the API to generate a new transcript using a different language.
transcriptbooleanUse this parameter to enable transcription.
true, the API generates a transcript for the video.false.language parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video.transcriptSummarybooleanUse this parameter to enable summarization. We recommend using this parameter together with transcript: true.
true, the API generates a summary for the video, based on the transcription.false.language parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video.transcriptSummaryAttributesarrayUse this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. The possible values are abstract and takeaways.
{
"title": "Maths video",
"description": "An amazing video explaining string theory.",
"public": false,
"panoramic": false,
"mp4Support": true,
"playerId": "pl45KFKdlddgk654dspkze",
"language": "en",
"transcript": true,
"transcriptSummary": true,
"transcriptSummaryAttributes": [
"abstract",
"takeaways"
],
"tags": [
"maths",
"string theory",
"video"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"watermark": {
"id": "watermark_1BWr2L5MTQwxGkuxKjzh6i",
"bottom": "10px",
"right": "10px",
"width": "50%",
"opacity": "70%"
}
}Created
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"title": "Maths video",
"description": "An amazing video explaining the string theory",
"language": "en",
"languageOrigin": "api",
"public": false,
"panoramic": false,
"mp4Support": true,
"playerId": "pl4k0jvEUuaTdRAEjQ4Jfrgz",
"tags": [
"maths",
"string theory",
"video"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"publishedAt": "2024-07-14T23:36:07+00:00",
"discarded": false,
"discardedAt": null,
"deletesAt": null,
"source": {
"uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
},
"assets": {
"iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
"player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
"hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
"thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
"mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
}
}/videos/{videoId}/sourceIngest a video from a source or file.
filefilerequired
The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the "/videos" endpoint and add the "source" parameter when you create a new video.
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#upload
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main() {
client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
// if you rather like to use the sandbox environment:
// client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz"
// string | Enter the videoId you want to use to upload your video.
file := os.NewFile(1234, "some_file")
// *os.File | The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the "/videos" endpoint and add the "source" parameter when you create a new video.
res, err := client.Videos.UploadFile(videoId, file)
// you can also use a Reader instead of a File:
// client.Videos.Upload(videoId, fileName, fileReader, fileSize)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Videos.Upload``: %v\
", err)
}
// response from `Upload`: Video
fmt.Fprintf(os.Stdout, "Response from `Videos.Upload`: %v\
", res)
}
}
Created
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"title": "Maths video",
"description": "An amazing video explaining the string theory.",
"public": false,
"panoramic": false,
"mp4Support": true,
"playerId": "pl45KFKdlddgk654dspkze",
"tags": [
"maths",
"string theory",
"video"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"publishedAt": "2024-07-14T23:36:07+00:00",
"discarded": false,
"discardedAt": null,
"deletesAt": null,
"source": {
"uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
},
"assets": {
"iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
"player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
"hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
"thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
"mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
}
}/videos/{videoId}/thumbnailUpload a thumbnail for a certain video.
filefilerequired
The image to be added as a thumbnail. The mime type should be image/jpeg, image/png or image/webp. The max allowed size is 8 MiB.
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#uploadThumbnail
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main() {
client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
// if you rather like to use the sandbox environment:
// client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
videoId := "videoId_example" // string | Unique identifier of the chosen video
file := os.NewFile(1234, "some_file") // *os.File | The image to be added as a thumbnail.
res, err := client.Videos.UploadThumbnailFile(videoId, file)
// you can also use a Reader instead of a File:
// client.Videos.UploadThumbnail(videoId, fileName, fileReader)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Videos.UploadThumbnail``: %v\
", err)
}
// response from `UploadThumbnail`: Video
fmt.Fprintf(os.Stdout, "Response from `Videos.UploadThumbnail`: %v\
", res)
}
Success
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"playerId": "pl45KFKdlddgk654dspkze",
"title": "Maths video",
"description": "An amazing video explaining the string theory",
"public": false,
"panoramic": false,
"mp4Support": true,
"tags": [
"maths",
"string theory",
"video"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"createdAt": "2020-03-03T12:52:03+00:00",
"publishedAt": "2020-07-14T23:36:07+00:00",
"discarded": false,
"discardedAt": null,
"deletesAt": null,
"source": {
"uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
},
"assets": {
"iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
"player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
"hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
"thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
"mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
}
}/videos/{videoId}/thumbnailSet a thumbnail from a specific time interval within a video.
timecodestringrequired
Frame in video to be used as a placeholder before the video plays. Example: '"00:01:00.000" for 1 minute into the video.' Valid Patterns: "hh:mm:ss.ms" "hh:mm:ss:frameNumber" "124" (integer value is reported as seconds) If selection is out of range, "00:00:00.00" will be chosen.
{
"timecode": "00:00:00.000"
}Success
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"playerId": "pl45KFKdlddgk654dspkze",
"title": "Maths video",
"description": "An amazing video explaining string theory",
"public": false,
"panoramic": false,
"mp4Support": true,
"tags": [
"maths",
"string theory",
"video"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"publishedAt": "2024-07-14T23:36:07+00:00",
"discarded": false,
"discardedAt": null,
"deletesAt": null,
"source": {
"uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
},
"assets": {
"iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
"player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
"hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
"thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
"mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
}
}/videos/{videoId}Retrieve the video details by video id.
videoIdstringrequired
The unique identifier for the video you want details about.
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#get
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main() {
client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
// if you rather like to use the sandbox environment:
// client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
videoId := "videoId_example" // string | The unique identifier for the video you want details about.
res, err := client.Videos.Get(videoId)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Videos.Get``: %v\
", err)
}
// response from `Get`: Video
fmt.Fprintf(os.Stdout, "Response from `Videos.Get`: %v\
", res)
}
Success
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"playerId": "pl45KFKdlddgk654dspkze",
"title": "Maths video",
"description": "An amazing video explaining string theory",
"language": "en",
"languageOrigin": "api",
"public": false,
"panoramic": false,
"mp4Support": true,
"tags": [
"maths",
"string theory",
"video"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"publishedAt": "2019-12-16T08:25:51+00:00",
"updatedAt": "2019-12-16T08:48:49+00:00",
"discarded": false,
"discardedAt": null,
"deletesAt": null,
"source": {
"uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
},
"assets": {
"iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
"player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
"hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
"thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
"mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
}
}/videos/{videoId}Delete a video object by video ID.
By default, deleted videos cannot be recovered. If you have the Video Restore feature enabled, this operation will discard the video instead of permanently deleting it. Make sure you subscribe to the Video Restore feature if you want to be able to restore deleted videos!
The Video Restore feature retains videos for 90 days, after which the videos are permanently deleted.
videoIdstringrequired
The video ID for the video you want to delete.
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#delete
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main() {
client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
// if you rather like to use the sandbox environment:
// client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The video ID for the video you want to delete.
err := client.Videos.Delete(videoId)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Videos.Delete``: %v\
", err)
}
}
No Content
Empty response
/videos/{videoId}Update the parameters associated with a video ID.
playerIdstringThe unique ID for the player you want to associate with your video.
titlestringThe title you want to use for your video.
descriptionstringA brief description of the video.
publicbooleanWhether the video is publicly available or not. False means it is set to private. Default is true. Tutorials on private videos.
panoramicbooleanWhether the video is a 360 degree or immersive video.
mp4SupportbooleanWhether the player supports the mp4 format.
tagsarrayA list of terms or words you want to tag the video with. Make sure the list includes all the tags you want as whatever you send in this list will overwrite the existing list for the video.
metadataarrayA list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video.
keystringThe constant that defines the data set.
valuestringA variable which belongs to the data set.
languagestring or nullUse this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the IETF language tag format.
language is a permanent attribute of the video. You can update it to another language using the PATCH /videos/{videoId} operation. This triggers the API to generate a new transcript using a different language.
transcriptbooleanUse this parameter to enable transcription.
true, the API generates a transcript for the video.false.language parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video.transcriptSummarybooleanUse this parameter to enable summarization.
true, the API generates a summary for the video, based on the transcription.false.language parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video.transcriptSummaryAttributesarrayUse this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. The possible values are abstract and takeaways.
{
"playerId": "pl45KFKdlddgk654dspkze",
"title": "String theory",
"description": "An amazing video explaining the string theory",
"public": false,
"language": "en",
"transcript": true,
"transcriptSummary": true,
"transcriptSummaryAttributes": [
"abstract",
"takeaways"
],
"panoramic": false,
"mp4Support": true,
"tags": [
"maths",
"string theory",
"video"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
]
}Success
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"playerId": "pl45KFKdlddgk654dspkze",
"title": "Maths video",
"description": "An amazing video explaining the string theory",
"language": "en",
"languageOrigin": "api",
"public": false,
"panoramic": false,
"mp4Support": true,
"tags": [
"maths",
"string theory",
"video"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"publishedAt": "2019-12-16T08:25:51+00:00",
"updatedAt": "2019-12-16T08:48:49+00:00",
"discarded": false,
"discardedAt": null,
"deletesAt": null,
"source": {
"uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
},
"assets": {
"iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
"player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
"hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
"thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
"mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
}
}/discarded/videosList all the video objects that are associated with the current workspace.
titlestringThe title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles.
tags[]arrayA tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned.
metadataobjectVideos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter.
descriptionstringRetrieve video objects by description.
liveStreamIdstringRetrieve video objects that were recorded from a live stream by liveStreamId.
sortBystringUse this parameter to sort videos by the their created time, published time, updated time, or by title.
sortOrderstringUse this parameter to sort results. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A.
currentPageintChoose the number of search results to return per page. Minimum value: 1
pageSizeintResults per page. Allowed values 1-100, default is 25.
Success
{
"data": [
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"playerId": "pl45KFKdlddgk654dspkze",
"title": "Maths video",
"description": "An amazing video explaining the string theory",
"public": false,
"panoramic": false,
"mp4Support": true,
"tags": [
"maths",
"string theory",
"video"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"publishedAt": "2019-12-16T08:25:51+00:00",
"updatedAt": "2019-12-16T08:48:49+00:00",
"discarded": true,
"discardedAt": "2024-10-16T08:48:49+00:00",
"deletesAt": "2024-11-16T08:48:49+00:00",
"source": {
"uri": "/videos/c188ed58-3403-46a2-b91b-44603d10b2c9/source"
},
"assets": null
},
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"title": "Video Title",
"description": "A description for your video.",
"public": false,
"panoramic": false,
"mp4Support": true,
"tags": [
"books",
"short stories"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Science Fiction",
"value": "Cyberpunk"
},
{
"key": "Technology",
"value": "Computers"
}
],
"publishedAt": "2019-12-16T08:25:51+00:00",
"updatedAt": "2019-12-16T08:48:49+00:00",
"discarded": true,
"discardedAt": "2024-10-16T08:48:49+00:00",
"deletesAt": "2024-11-16T08:48:49+00:00",
"source": {
"uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
},
"assets": null
},
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"playerId": "pl45KFKdlddgk654dspkze",
"title": "My Video Title",
"description": "A brief description of the video.",
"public": false,
"panoramic": false,
"mp4Support": true,
"tags": [
"General",
"Videos"
],
"metadata": [
{
"key": "Length",
"value": "Short"
}
],
"publishedAt": "2019-12-16T08:25:51+00:00",
"updatedAt": "2019-12-16T08:48:49+00:00",
"discarded": true,
"discardedAt": "2024-10-16T08:48:49+00:00",
"deletesAt": "2024-11-16T08:48:49+00:00",
"source": {
"uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
},
"assets": null
}
],
"pagination": {
"currentPage": 1,
"pageSize": 25,
"pagesTotal": 1,
"itemsTotal": 11,
"currentPageItems": 11,
"links": [
{
"rel": "self",
"uri": "https://ws.api.video/videos?currentPage=1"
},
{
"rel": "first",
"uri": "https://ws.api.video/videos?currentPage=1"
},
{
"rel": "last",
"uri": "https://ws.api.video/videos?currentPage=1"
}
]
}
}/discarded/videos/{videoId}Retrieve the video details of a discarded video object by video id.
videoIdstringrequired
The unique identifier for the video you want details about.
Success
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"playerId": "pl45KFKdlddgk654dspkze",
"title": "Maths video",
"description": "An amazing video explaining string theory",
"public": false,
"panoramic": false,
"mp4Support": true,
"tags": [
"maths",
"string theory",
"video"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"publishedAt": "2019-12-16T08:25:51+00:00",
"updatedAt": "2019-12-16T08:48:49+00:00",
"discarded": true,
"discardedAt": "2024-10-16T08:48:49+00:00",
"deletesAt": "2024-11-16T08:48:49+00:00",
"source": {
"uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
},
"assets": null
}/discarded/videos/{videoId}Restore a discarded video
discardedbooleanUse this parameter to restore a discarded video when you have the Video Restore feature enabled. This parameter only accepts false as a value!
{
"discarded": false
}Success
{
"videoId": "vi4blUQJFrYWbaG44NChkH27",
"playerId": "pl45KFKdlddgk654dspkze",
"title": "Maths video",
"description": "An amazing video explaining the string theory",
"public": false,
"panoramic": false,
"mp4Support": true,
"tags": [
"maths",
"string theory",
"video"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"publishedAt": "2019-12-16T08:25:51+00:00",
"updatedAt": "2019-12-16T08:48:49+00:00",
"discarded": true,
"discardedAt": "2024-10-16T08:48:49+00:00",
"deletesAt": "2024-11-16T08:48:49+00:00",
"source": {
"uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
},
"assets": null
}/videos/{videoId}/statusRetrieve upload status and encoding status to determine when the video is uploaded or ready to playback. Once encoding is completed, the response also lists the available stream qualities.
videoIdstringrequired
The unique identifier for the video you want the status for.
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#getStatus
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main() {
client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
// if you rather like to use the sandbox environment:
// client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The unique identifier for the video you want the status for.
res, err := client.Videos.GetStatus(videoId)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Videos.GetStatus``: %v\
", err)
}
// response from `GetStatus`: VideoStatus
fmt.Fprintf(os.Stdout, "Response from `Videos.GetStatus`: %v\
", res)
}
Success
{
"ingest": {
"status": "uploaded",
"filesize": 273579401,
"receivedBytes": [
{
"to": 134217727,
"from": 0,
"total": 273579401
},
{
"to": 268435455,
"from": 134217728,
"total": 273579401
},
{
"to": 273579400,
"from": 268435456,
"total": 273579401
}
]
},
"encoding": {
"playable": true,
"qualities": [
{
"quality": "360p",
"status": "encoded"
},
{
"quality": "480p",
"status": "encoded"
},
{
"quality": "720p",
"status": "encoded"
},
{
"quality": "1080p",
"status": "encoding"
},
{
"quality": "2160p",
"status": "waiting"
}
],
"metadata": {
"width": 424,
"height": 240,
"bitrate": 411.218,
"duration": 4176,
"framerate": 24,
"samplerate": 48000,
"videoCodec": "h264",
"audioCodec": "aac",
"aspectRatio": "16/9"
}
}
}/uploadUploading a video with the delegated upload token.
filefilerequired
The path to the video you want to upload.
videoIdstringThe video id returned by the first call to this endpoint in a large video upload scenario.
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#uploadWithUploadToken
Created
{
"videoId": "vi4k0jvEUuaTdRAEjQ4Jfrgz",
"playerId": "pl45KFKdlddgk654dspkze",
"title": "Maths video",
"description": "An amazing video explaining the string theory",
"language": "en",
"languageOrigin": "api",
"public": false,
"panoramic": false,
"tags": [
"maths",
"string theory",
"video"
],
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"publishedAt": "2024-07-14T23:36:07+00:00",
"discarded": false,
"discardedAt": null,
"deletesAt": null,
"source": {
"uri": "/videos/vi4k0jvEUuaTdRAEjQ4Jfrgz/source"
},
"assets": {
"iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
"player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
"hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
"thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
"mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
}
}Was this page helpful?