List all video objects

get /videos

List all the video objects that are associated with the current workspace.

HTTP basic apiKey

title

string

The 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.

Example
"My Video.mp4"

tags[]

array[string]

A 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.

Example
"[\"captions\", \"dialogue\"]"

string

metadata

object (metadata)

Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. Dynamic Metadata allows you to define a key that allows any value pair.

Example
"metadata[Author]=John Doe&metadata[Format]=Tutorial"

description

string

Retrieve video objects by description.

Example
"New Zealand"

liveStreamId

string

Retrieve video objects that were recorded from a live stream by liveStreamId.

Example
"li400mYKSgQ6xs7taUeSaEKr"

sortBy

string

Use this parameter to sort videos by the their created time, published time, updated time, or by title.

Enum
  • title
  • createdAt
  • publishedAt
  • updatedAt
Example
"publishedAt"

sortOrder

string

Use this parameter to sort results. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A.

Enum
  • asc
  • desc
Example
"asc"

currentPage

int

Choose the number of search results to return per page. Minimum value: 1

Default
1
Example
2

pageSize

int

Results per page. Allowed values 1-100, default is 25.

Default
25
Example
30

Request

<?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']]);
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#list

ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
VideosApi videosApi = client.videos();

// list all videos (all pages)
Page<Video> videosPages = videosApi.list().execute();
videosPages.forEach(videosPage -> videosPage.getItems().forEach(video ->
    System.out.println(video.getVideoId())
));

// list videos that have all the given tags (only first results page)
List<Video> videosWithTags = videosApi.list()
    .tags(Arrays.asList("tag1", "tag2"))
    .execute()
    .getItems();

// list videos that have all the given metadata values (only first results page)
List<Video> videosWithMetadata = videosApi.list()
    .metadata(Map.of("key1", "value1", "key2", "value2"))
    .execute()
    .getItems();
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#list

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

// list all videos (all pages)
let allVideos = [];
for(let currentPage=1 ; ; currentPage++) {
  const res = await client.videos.list({ currentPage });
  allVideos = [...allVideos, ...res.data];
  if(currentPage >= res.pagination.pagesTotal) {
    break;
  }
}

// list videos that have all the given tags (only first results page)
const videosWithTags = await client.videos.list({ tags: ["tag1", "tag2"] });

// list videos that have all the given metadata values (only first results page)
const videosWithMetadata = await client.videos.list({ metadata: { "key1": "value1", "key2": "value2" } })
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#list
// 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#list
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#list
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#list

Response

Examples Schema

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.000Z",
      "updatedAt": "2019-12-16T08:48:49.000Z",
      "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.",
      "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.000Z",
      "updatedAt": "2019-12-16T08:48:49.000Z",
      "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.",
      "public": false,
      "panoramic": false,
      "mp4Support": true,
      "tags": [
        "General",
        "Videos"
      ],
      "metadata": [
        {
          "key": "Length",
          "value": "Short"
        }
      ],
      "publishedAt": "2019-12-16T08:25:51.000Z",
      "updatedAt": "2019-12-16T08:48:49.000Z",
      "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"
      }
    ]
  }
}

Bad Request

{
  "title": "This parameter is out of the allowed range of values.",
  "name": "page",
  "status": 400,
  "range": {
    "min": 1
  },
  "problems": [
    {
      "title": "This parameter is out of the allowed range of values.",
      "name": "page",
      "range": {
        "min": 1
      }
    },
    {
      "title": "This parameter is out of the allowed range of values.",
      "name": "pageSize",
      "range": {
        "min": 10,
        "max": 100
      }
    }
  ]
}

data

array[object (Video)]

required

Video

object (Video)

Example
{ "videoId": "vi4k0jvEUuaTdRAEjQ4Jfrgz", "title": "Maths video", "description": "An amazing video explaining the string theory", "tags": [ "maths", "string theory", "video" ], "metadata": [ { "key": "Author", "value": "John Doe" }, { "key": "Format", "value": "Tutorial" } ], "createdAt": "4251-03-03T12:52:03.085Z", "publishedAt": "4665-07-14T23:36:18.598Z", "actions": [ "video_delete", "video_download", "video_update" ] }

videoId

string

required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"

createdAt

string

date-time

When a video was created, presented in ISO-8601 format.

Example
"2019-06-24T11:45:01.109+00"

title

string

The title of the video content.

Example
"Maths video"

description

string

A description for the video content.

Example
"An amazing video explaining string theory."

publishedAt

string

date-time

The date and time the API created the video. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:25:51.000Z"

updatedAt

string

date-time

The date and time the video was updated. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:15:51.000Z"

tags

array[string]

One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces.

Example
"\"tags\": [\"maths\", \"string theory\", \"video\"]"

string

metadata

array[object (Metadata)]

Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. Dynamic Metadata allows you to define a key that allows any value pair.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"

Metadata

object (Metadata)

key

string

The constant that defines the data set.

Example
"Color"

value

string

A variable which belongs to the data set.

Example
"Green"

source

object (source)

Source information about the video.

uri

string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"

type

string

liveStream

object (liveStream)

This appears if the video is from a Live Record.

liveStreamId

string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"

links

array[object]

object

rel

string

uri

string

assets

object (assets)

Collection of details about the video object that you can use to work with the video object.

hls

string

uri

This is the manifest URL. For HTTP Live Streaming (HLS), when a HLS video stream is initiated, the first file to download is the manifest. This file has the extension M3U8, and provides the video player with information about the various bitrates available for streaming.

iframe

string

Code to use video from a third party website

Example
"<iframe src=\"//embed.api.video/c188ed58-3403-46a2-b91b-44603d10b2c9?token=831a9bd9-9f50-464c-a369-8e9d914371ae\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>"

player

string

uri

Raw url of the player.

Example
"https://embed.api.video/1b9d6ae8-8f57-4b6d-8552-d636926b4f5f?token=831a9bd9-9f50-464c-a369-8e9d914371ae"

thumbnail

string

uri

Poster of the video.

Example
"https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/thumbnail.jpg"

mp4

string

uri

Available only if mp4Support is enabled. Raw mp4 url.

Example
"https://cdn.api.video/vod/vi4k0jvEUuaTdRAEjQ4Jfrgz/token/8fd70443-d9f0-45d2-b01c-12c8cfc707c9/mp4/source.mp4"

playerId

string

The id of the player that will be applied on the video.

Example
"pl45KFKdlddgk654dspkze"

public

boolean

Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on private videos.

Example
false

panoramic

boolean

Defines if video is panoramic.

Example
false

mp4Support

boolean

This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video.

Example
true

pagination

object (pagination)

required

Example
{ "itemsTotal": 123, "pagesTotal": 7, "pageSize": 20, "currentPage": 3, "currentPageItems": 20, "links": { "first": { "rel": "first", "uri": "/videos/search?currentPage=1&pageSize=20" }, "previous": { "rel": "previous", "uri": "/videos/search?currentPage=2&pageSize=20" }, "next": { "rel": "next", "uri": "/videos/search?currentPage=4&pageSize=20" }, "last": { "rel": "last", "uri": "/videos/search?currentPage=6&pageSize=20" } } }

itemsTotal

int

Total number of items that exist.

pagesTotal

int

Number of items listed in the current page.

pageSize

int

Maximum number of item per page.

currentPage

int

The current page index.

currentPageItems

int

The number of items on the current page.

links

array[object (PaginationLink)]

required

PaginationLink

object (PaginationLink)

rel

string

uri

string

uri

type

string

A link to the error documentation.

title

string

A description of the error that occurred.

name

string

The name of the parameter that caused the error.

status

int

The HTTP status code.

problems

array[object (BadRequest)]

Returns any additional problems in the request in an array of objects.

BadRequest

object (BadRequest)

type

string

A link to the error documentation.

title

string

A description of the error that occurred.

name

string

The name of the parameter that caused the error.

status

int

The HTTP status code.

Create a video object

post /videos

Creates a video object. More information on video objects can be found here.

HTTP basic apiKey

video to create

title

string

required

The title of your new video.

Example
"Maths video"

description

string

A brief description of your video.

Example
"A video about string theory."

source

string

You 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.

Example
"https://www.myvideo.url.com/video.mp4 OR vi4k0jvEUuaTdRAEjQ4JfOyl"

public

boolean

Default: True. If set to false the video will become private. More information on private videos can be found here

Default
true
Example
true

panoramic

boolean

Indicates if your video is a 360/immersive video.

Default
false
Example
false

mp4Support

boolean

Enables mp4 version in addition to streamed version.

Default
true
Example
true

playerId

string

The unique identification number for your video player.

Example
"pl45KFKdlddgk654dspkze"

tags

array[string]

A list of tags you want to use to describe your video.

Example
"[\"maths\", \"string theory\", \"video\"]"

string

metadata

array[object (Metadata)]

A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. Read more on dynamic metadata.

Example
"[{\"key\": \"Author\", \"value\": \"John Doe\"}]"

Metadata

object (Metadata)

key

string

The constant that defines the data set.

Example
"Color"

value

string

A variable which belongs to the data set.

Example
"Green"

clip

object (clip)

Use this object to create a smaller clip from a video you upload.

  • You can only create video clips in the same request where you create the video container.
  • You cannot update the starting or ending timestamps of a video clip after you created the video container.
  • When you upload a video file into a container where you defined a starting and ending timestamp, the API trims the video according to those timestamps to create a clip.

startTimecode

string

^(?:\d{2,3}:[0-5]\d:[0-5]\d(?:\.\d{1,3}|\:\d{1,2})?|\d{1,7})$

The timestamp that defines the beginning of the video clip you want to create. The value must follow the HH:MM:SS format.

Example
"00:01:15"

endTimecode

string

^(?:\d{2,3}:[0-5]\d:[0-5]\d(?:\.\d{1,3}|\:\d{1,2})?|\d{1,7})$

The timestamp that defines the end of the video clip you want to create. The value must follow the HH:MM:SS format.

Example
"00:02:33"

watermark

object (watermark)

id

string

id of the watermark

Example
"watermark_1BWr2L5MTQwxGkuxKjzh6i"

top

string

Distance expressed in px or % between the top-border of the video and the watermark-image.

Example
"10px"

left

string

Distance expressed in px or % between the left-border of the video and the watermark-image.

Example
"10px"

bottom

string

Distance expressed in px or % between the bottom-border of the video and the watermark-image.

Example
"10px"

right

string

Distance expressed in px or % between the right-border of the video and the watermark-image.

Example
"10px"

width

string

Width of the watermark-image relative to the video if expressed in %. Otherwise a fixed width. NOTE: To keep intrinsic watermark-image width use initial.

Example
"initial"

height

string

Height of the watermark-image relative to the video if expressed in %. Otherwise a fixed height. NOTE: To keep intrinsic watermark-image height use initial.

Example
"initial"

opacity

string

Opacity expressed in % only to specify the degree of the watermark-image transparency with the video.

Example
"70%"

Request

{
  "title": "Maths video",
  "description": "An amazing video explaining 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"
    }
  ],
  "watermark": {
    "id": "watermark_1BWr2L5MTQwxGkuxKjzh6i",
    "bottom": "10px",
    "right": "10px",
    "width": "50%",
    "opacity": "70%"
  }
}
// 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#create

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()
        
    videoCreationPayload := *apivideosdk.NewVideoCreationPayload("Maths video") // VideoCreationPayload | video to create

    
    res, err := client.Videos.Create(videoCreationPayload)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `Videos.Create``: %v\
", err)
    }
    // response from `Create`: Video
    fmt.Fprintf(os.Stdout, "Response from `Videos.Create`: %v\
", res)
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#create

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

// create a simple video
const video = await client.videos.create({ title: "Maths video" });

// create a video using an existing source
const existingSourceVideo = await client.videos.create({
  title: "Video using an existing source", 
  source: "https://www.myvideo.url.com/video.mp4", 
});

// create a private video
const privateVideo = await client.videos.create({
  title: "Video using an existing source", 
  _public: false,
});

// create a video using all available attributes
const video = await client.videos.create({
  title: "Maths video", // The title of your new video.
  description: "A video about string theory.", // A brief description of your video.
  source: "https://www.myvideo.url.com/video.mp4", // If you add a video already on the web, this is where you enter the url for the video.
  _public: true, // Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view.
  panoramic: false, // Indicates if your video is a 360/immersive video.
  mp4Support: true, // Enables mp4 version in addition to streamed version.
  playerId: "pl45KFKdlddgk654dspkze", // The unique identification number for your video player.
  tags: ["maths", "string theory", "video"], // A list of tags you want to use to describe your video.
  metadata: [{"key": "Author", "value": "John Doe"}], // A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos.
});
<?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#create

require __DIR__ . '/vendor/autoload.php';

$client = new \ApiVideo\Client\Client(
    'https://ws.api.video',
    'YOUR_API_KEY',
    new \Symfony\Component\HttpClient\Psr18Client()
);

// create a simple video
$video = $client->videos()->create((new \ApiVideo\Client\Model\VideoCreationPayload())->setTitle("Maths video"));

// create a video using an existing source
$existingSourceVideo = $client->videos()->create((new \ApiVideo\Client\Model\VideoCreationPayload())
    ->setTitle("Maths video")
    ->setSource("https://www.myvideo.url.com/video.mp4"));

// create a private video
$privateVideo = $client->videos()->create((new \ApiVideo\Client\Model\VideoCreationPayload())
    ->setTitle("Maths video")
    ->setPublic(false));

// create a video using all available attributes
$anotherVideo = $client->videos()->create((new \ApiVideo\Client\Model\VideoCreationPayload())
    ->setTitle("Maths video") // The title of your new video.
    ->setDescription("A video about string theory.") // A brief description of your video.
    ->setSource("https://www.myvideo.url.com/video.mp4") // If you add a video already on the web, this is where you enter the url for the video.
    ->setPublic(true) // Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view.
    ->setPanoramic(false) // Indicates if your video is a 360/immersive video.
    ->setMp4Support(true) // Enables mp4 version in addition to streamed version.
    ->setPlayerId("pl45KFKdlddgk654dspkze") // The unique identification number for your video player.
    ->setTags(array("TAG1", "TAG2")) // A list of tags you want to use to describe your video.
    ->setMetadata(array( // A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos.
        new \ApiVideo\Client\Model\Metadata(['key' => 'key1', 'value' => 'key1value1']),
        new \ApiVideo\Client\Model\Metadata(['key' => 'key2', 'value' => 'key2value1']))));
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#create

import apivideo
from apivideo.api import videos_api
from apivideo.model.video_creation_payload import VideoCreationPayload
from apivideo.model.bad_request import BadRequest
from apivideo.model.video import Video
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = videos_api.VideosApi(api_client)
    video_creation_payload = VideoCreationPayload(
        title="Maths video",
        description="A video about string theory.",
        source="https://www.myvideo.url.com/video.mp4",
        public=True,
        panoramic=False,
        mp4_support=True,
        player_id="pl45KFKdlddgk654dspkze",
        tags=["maths", "string theory", "video"],
        metadata=[
            Metadata(
                key="Color",
                value="Green",
            ),
        ],
    ) # VideoCreationPayload | video to create

    # example passing only required values which don't have defaults set
    try:
        # Create a video
        api_response = api_instance.create(video_creation_payload)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling VideosApi->create: %s\n" % e)
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#create

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.VideosApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    VideosApi apiInstance = client.videos();
    
    VideoCreationPayload videoCreationPayload = new VideoCreationPayload(); // video to create
    videoCreationPayload.setTitle("Maths video"); // The title of your new video.
    videoCreationPayload.setDescription("A video about string theory."); // A brief description of your video.
    videoCreationPayload.setSource("https://www.myvideo.url.com/video.mp4"); // If you add a video already on the web, this is where you enter the url for the video.
    videoCreationPayload.setPublic(true); // Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view.
    videoCreationPayload.setPanoramic(false); // Indicates if your video is a 360/immersive video.
    videoCreationPayload.setMp4Support(true); // Enables mp4 version in addition to streamed version.
    videoCreationPayload.setPlayerId("pl45KFKdlddgk654dspkze"); // The unique identification number for your video player.
    videoCreationPayload.setTags(Arrays.asList("maths", "string theory", "video")); // A list of tags you want to use to describe your video.
    videoCreationPayload.setMetadata(Collections.<Metadata>emptyList()); // A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos.


    try {
      Video result = apiInstance.create(videoCreationPayload);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling VideosApi#create");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#create

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class createExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var videoCreationPayload = new VideoCreationPayload(); // VideoCreationPayload | video to create
            var apiVideosInstance = apiInstance.Videos();
            try
            {
                // Create a video
                Video result = apiVideosInstance.create(videoCreationPayload);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling VideosApi.create: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#create

Response

Examples Schema

Created

{
  "videoId": "vi4blUQJFrYWbaG44NChkH27",
  "title": "Maths video",
  "description": "An amazing video explaining the string theory",
  "public": false,
  "panoramic": false,
  "mp4Support": true,
  "playerId": "pl4k0jvEUuaTdRAEjQ4Jfrgz",
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "publishedAt": "4665-07-14T23:36:18.598Z",
  "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"
  }
}

Accepted

{
  "videoId": "vi4k0jvEUuaTdRAEjQ4Jfrgz",
  "title": "Maths video",
  "description": "An amazing video explaining the string theory",
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "createdAt": "4251-03-03T12:52:03.085Z",
  "publishedAt": "4665-07-14T23:36:18.598Z",
  "actions": [
    "video_delete",
    "video_download",
    "video_update"
  ]
}

Bad Request

{
  "type": "https://docs.api.video/docs/attributerequired",
  "title": "This attribute is required.",
  "name": "title",
  "status": 400,
  "problems": [
    {
      "type": "https://docs.api.video/docs/attributerequired",
      "title": "This attribute is required.",
      "name": "title"
    },
    {
      "type": "https://docs.api.video/docs/attributeinvalid",
      "title": "This attribute must be a ISO8601 date.",
      "name": "scheduledAt"
    },
    {
      "type": "https://docs.api.video/docs/attributeinvalid",
      "title": "This attribute must be an array.",
      "name": "tags"
    },
    {
      "type": "https://docs.api.video/docs/attributeinvalid",
      "title": "This attribute must be an array.",
      "name": "metadata"
    }
  ]
}

videoId

string

required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"

createdAt

string

date-time

When a video was created, presented in ISO-8601 format.

Example
"2019-06-24T11:45:01.109+00"

title

string

The title of the video content.

Example
"Maths video"

description

string

A description for the video content.

Example
"An amazing video explaining string theory."

publishedAt

string

date-time

The date and time the API created the video. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:25:51.000Z"

updatedAt

string

date-time

The date and time the video was updated. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:15:51.000Z"

tags

array[string]

One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces.

Example
"\"tags\": [\"maths\", \"string theory\", \"video\"]"

string

metadata

array[object (Metadata)]

Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. Dynamic Metadata allows you to define a key that allows any value pair.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"

Metadata

object (Metadata)

key

string

The constant that defines the data set.

Example
"Color"

value

string

A variable which belongs to the data set.

Example
"Green"

source

object (source)

Source information about the video.

uri

string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"

type

string

liveStream

object (liveStream)

This appears if the video is from a Live Record.

liveStreamId

string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"

links

array[object]

object

rel

string

uri

string

assets

object (assets)

Collection of details about the video object that you can use to work with the video object.

hls

string

uri

This is the manifest URL. For HTTP Live Streaming (HLS), when a HLS video stream is initiated, the first file to download is the manifest. This file has the extension M3U8, and provides the video player with information about the various bitrates available for streaming.

iframe

string

Code to use video from a third party website

Example
"<iframe src=\"//embed.api.video/c188ed58-3403-46a2-b91b-44603d10b2c9?token=831a9bd9-9f50-464c-a369-8e9d914371ae\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>"

player

string

uri

Raw url of the player.

Example
"https://embed.api.video/1b9d6ae8-8f57-4b6d-8552-d636926b4f5f?token=831a9bd9-9f50-464c-a369-8e9d914371ae"

thumbnail

string

uri

Poster of the video.

Example
"https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/thumbnail.jpg"

mp4

string

uri

Available only if mp4Support is enabled. Raw mp4 url.

Example
"https://cdn.api.video/vod/vi4k0jvEUuaTdRAEjQ4Jfrgz/token/8fd70443-d9f0-45d2-b01c-12c8cfc707c9/mp4/source.mp4"

playerId

string

The id of the player that will be applied on the video.

Example
"pl45KFKdlddgk654dspkze"

public

boolean

Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on private videos.

Example
false

panoramic

boolean

Defines if video is panoramic.

Example
false

mp4Support

boolean

This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video.

Example
true

videoId

string

required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"

createdAt

string

date-time

When a video was created, presented in ISO-8601 format.

Example
"2019-06-24T11:45:01.109+00"

title

string

The title of the video content.

Example
"Maths video"

description

string

A description for the video content.

Example
"An amazing video explaining string theory."

publishedAt

string

date-time

The date and time the API created the video. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:25:51.000Z"

updatedAt

string

date-time

The date and time the video was updated. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:15:51.000Z"

tags

array[string]

One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces.

Example
"\"tags\": [\"maths\", \"string theory\", \"video\"]"

string

metadata

array[object (Metadata)]

Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. Dynamic Metadata allows you to define a key that allows any value pair.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"

Metadata

object (Metadata)

key

string

The constant that defines the data set.

Example
"Color"

value

string

A variable which belongs to the data set.

Example
"Green"

source

object (source)

Source information about the video.

uri

string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"

type

string

liveStream

object (liveStream)

This appears if the video is from a Live Record.

liveStreamId

string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"

links

array[object]

object

rel

string

uri

string

assets

object (assets)

Collection of details about the video object that you can use to work with the video object.

hls

string

uri

This is the manifest URL. For HTTP Live Streaming (HLS), when a HLS video stream is initiated, the first file to download is the manifest. This file has the extension M3U8, and provides the video player with information about the various bitrates available for streaming.

iframe

string

Code to use video from a third party website

Example
"<iframe src=\"//embed.api.video/c188ed58-3403-46a2-b91b-44603d10b2c9?token=831a9bd9-9f50-464c-a369-8e9d914371ae\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>"

player

string

uri

Raw url of the player.

Example
"https://embed.api.video/1b9d6ae8-8f57-4b6d-8552-d636926b4f5f?token=831a9bd9-9f50-464c-a369-8e9d914371ae"

thumbnail

string

uri

Poster of the video.

Example
"https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/thumbnail.jpg"

mp4

string

uri

Available only if mp4Support is enabled. Raw mp4 url.

Example
"https://cdn.api.video/vod/vi4k0jvEUuaTdRAEjQ4Jfrgz/token/8fd70443-d9f0-45d2-b01c-12c8cfc707c9/mp4/source.mp4"

playerId

string

The id of the player that will be applied on the video.

Example
"pl45KFKdlddgk654dspkze"

public

boolean

Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on private videos.

Example
false

panoramic

boolean

Defines if video is panoramic.

Example
false

mp4Support

boolean

This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video.

Example
true

type

string

A link to the error documentation.

title

string

A description of the error that occurred.

name

string

The name of the parameter that caused the error.

status

int

The HTTP status code.

problems

array[object (BadRequest)]

Returns any additional problems in the request in an array of objects.

BadRequest

object (BadRequest)

type

string

A link to the error documentation.

title

string

A description of the error that occurred.

name

string

The name of the parameter that caused the error.

status

int

The HTTP status code.

Upload a video

post /videos/{videoId}/source

Ingest a video from a source or file.

HTTP basic apiKey

Content-Range

string

/(?:bytes (?<from>\d+)-(?<to>\d+)|part (?<part>\d+))\/(?<total>\d+|\*)/

part <part>/<total_parts> ; bytes <from_byte>-<to_byte>/<total_bytes>

Example
"bytes 209715200-419430399/524288000 OR part 2/3"

videoId

string

required

Enter the videoId you want to use to upload your video.

Example
"vi4k0jvEUuaTdRAEjQ4Jfrgz"

file

file

required

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.

Example
"@/path/to/video.mp4"

Request

// 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)
    }
      }
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#upload

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Enter the videoId you want to use to upload your video.
const file = './my-video.mp4'; // 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.
      
const video = await client.videos.upload(videoId, file);

// if needed you can define an upload progress listener:
const video2 = await client.videos.upload(videoId, file, (event) => {
  console.log("uploadedBytes: " + event.uploadedBytes);
  console.log("totalBytes: " + event.totalBytes);
  console.log("chunksCount: " + event.chunksCount);
  console.log("currentChunk: " + event.currentChunk);
  console.log("currentChunkTotalBytes: " + event.currentChunkTotalBytes);
  console.log("currentChunkUploadedBytes: " + event.currentChunkUploadedBytes);
});
<?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#upload

require __DIR__ . '/vendor/autoload.php';

$client = new \ApiVideo\Client\Client(
    'https://ws.api.video',
    'YOUR_API_KEY',
    new \Symfony\Component\HttpClient\Psr18Client()
);

// create a new video & upload a video file
$myVideo = $client->videos()->create((new \ApiVideo\Client\Model\VideoCreationPayload())->setTitle('Uploaded video'));
$client->videos()->upload($myVideo->getVideoId(), new SplFileObject(__DIR__ . '/558k.mp4'));

// create a new video & upload a video file using progressive upload (the file is uploaded by parts)
$myVideo2 = $client->videos()->create((new \ApiVideo\Client\Model\VideoCreationPayload())->setTitle('Uploaded video (progressive upload)'));

$progressiveSession = $client->videos()->createUploadProgressiveSession($myVideo2->getVideoId());

$progressiveSession->uploadPart(new SplFileObject(__DIR__ . '/10m.mp4.part.a'));
$progressiveSession->uploadPart(new SplFileObject(__DIR__ . '/10m.mp4.part.b'));

$progressiveSession->uploadLastPart(new SplFileObject(__DIR__ . '/10m.mp4.part.c')); 
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#upload

import apivideo
from apivideo.api import videos_api
from apivideo.model.bad_request import BadRequest
from apivideo.model.not_found import NotFound
from apivideo.model.video import Video
from apivideo.configuration import Configuration
from pprint import pprint

# Enter a context with an instance of the API client
# When uploading a file you can change the chunk size (in octet)
configuration = Configuration(chunk_size=10 * 1024 * 1024)
with apivideo.AuthenticatedApiClient(__API_KEY__, configuration=configuration) as api_client:
    # Create an instance of the API class
    api_instance = videos_api.VideosApi(api_client)
    video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | Enter the videoId you want to use to upload your video.
    file = open('/path/to/file', 'rb') # file_type | 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.

    # example passing only required values which don't have defaults set
    try:
        # Upload a video
        api_response = api_instance.upload(video_id, file)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling VideosApi->upload: %s\n" % e)
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#upload

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.VideosApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    VideosApi apiInstance = client.videos();

    String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // Enter the videoId you want to use to upload your video.
    File file = new File("/path/to/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.

    try {
      Video result = apiInstance.upload(videoId, file);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling VideosApi#upload");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First add the "video.api:android-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-android-client/blob/main/docs/VideosApi.md#upload

VideosApiStore.initialize("YOUR_API_KEY")
// if you rather like to use the sandbox environment:
// VideosApiStore.initialize("YOUR_SANDBOX_API_KEY", Environment.SANDBOX)

val workManager = WorkManager.getInstance(context) // WorkManager comes from package "androidx.work:work-runtime"

val videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz" // The videoId you want to use to upload your video.
val file = File("/path/to/file") // The path to the video you want to upload.

workManager.upload(videoId, file) // Dispatch the upload with the WorkManager
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#upload

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class uploadExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | Enter the videoId you want to use to upload your video.
            var file = BINARY_DATA_HERE;  // System.IO.Stream | 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.
            var apiVideosInstance = apiInstance.Videos();
            try
            {
                // Upload a video
                Video result = apiVideosInstance.upload(videoId, file);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling VideosApi.upload: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#upload

Response

Examples Schema

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": "4665-07-14T23:36:18.598Z",
  "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"
  }
}

Bad Request

{
  "type": "https://docs.api.video/docs/filealreadyuploaded",
  "title": "The source of the video is already uploaded.",
  "name": "file",
  "status": 400,
  "problems": [
    {
      "type": "https://docs.api.video/docs/filealreadyuploaded",
      "title": "The source of the video is already uploaded.",
      "name": "file"
    },
    {
      "type": "https://docs.api.video/docs/filealreadyuploaded",
      "title": "The video xxxx has already been uploaded.",
      "name": "video"
    },
    {
      "type": "https://docs.api.video/docs/filemissing",
      "title": "There is no uploaded file in the request.",
      "name": "file"
    },
    {
      "type": "https://docs.api.video/docs/multiplefilesuploaded",
      "title": "There is more than one uploaded file in the request.",
      "name": "file"
    }
  ]
}

Not Found

{
  "type": "https://docs.api.video/docs/resourcenot_found",
  "title": "The requested resource was not found.",
  "name": "videoId",
  "status": 404
}

videoId

string

required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"

createdAt

string

date-time

When a video was created, presented in ISO-8601 format.

Example
"2019-06-24T11:45:01.109+00"

title

string

The title of the video content.

Example
"Maths video"

description

string

A description for the video content.

Example
"An amazing video explaining string theory."

publishedAt

string

date-time

The date and time the API created the video. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:25:51.000Z"

updatedAt

string

date-time

The date and time the video was updated. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:15:51.000Z"

tags

array[string]

One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces.

Example
"\"tags\": [\"maths\", \"string theory\", \"video\"]"

string

metadata

array[object (Metadata)]

Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. Dynamic Metadata allows you to define a key that allows any value pair.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"

Metadata

object (Metadata)

key

string

The constant that defines the data set.

Example
"Color"

value

string

A variable which belongs to the data set.

Example
"Green"

source

object (source)

Source information about the video.

uri

string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"

type

string

liveStream

object (liveStream)

This appears if the video is from a Live Record.

liveStreamId

string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"

links

array[object]

object

rel

string

uri

string

assets

object (assets)

Collection of details about the video object that you can use to work with the video object.

hls

string

uri

This is the manifest URL. For HTTP Live Streaming (HLS), when a HLS video stream is initiated, the first file to download is the manifest. This file has the extension M3U8, and provides the video player with information about the various bitrates available for streaming.

iframe

string

Code to use video from a third party website

Example
"<iframe src=\"//embed.api.video/c188ed58-3403-46a2-b91b-44603d10b2c9?token=831a9bd9-9f50-464c-a369-8e9d914371ae\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>"

player

string

uri

Raw url of the player.

Example
"https://embed.api.video/1b9d6ae8-8f57-4b6d-8552-d636926b4f5f?token=831a9bd9-9f50-464c-a369-8e9d914371ae"

thumbnail

string

uri

Poster of the video.

Example
"https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/thumbnail.jpg"

mp4

string

uri

Available only if mp4Support is enabled. Raw mp4 url.

Example
"https://cdn.api.video/vod/vi4k0jvEUuaTdRAEjQ4Jfrgz/token/8fd70443-d9f0-45d2-b01c-12c8cfc707c9/mp4/source.mp4"

playerId

string

The id of the player that will be applied on the video.

Example
"pl45KFKdlddgk654dspkze"

public

boolean

Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on private videos.

Example
false

panoramic

boolean

Defines if video is panoramic.

Example
false

mp4Support

boolean

This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video.

Example
true

type

string

A link to the error documentation.

title

string

A description of the error that occurred.

name

string

The name of the parameter that caused the error.

status

int

The HTTP status code.

problems

array[object (BadRequest)]

Returns any additional problems in the request in an array of objects.

BadRequest

object (BadRequest)

type

string

A link to the error documentation.

title

string

A description of the error that occurred.

name

string

The name of the parameter that caused the error.

status

int

The HTTP status code.

type

string

title

string

name

string

status

int

Upload a thumbnail

post /videos/{videoId}/thumbnail

Upload a thumbnail for a certain video.

HTTP basic apiKey

videoId

string

required

Unique identifier of the chosen video

file

file

required

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.

Request

// 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)
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#uploadThumbnail

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const videoId = 'videoId_example'; // Unique identifier of the chosen video 
const file = './thumbnail.jpg'; // The image to be added as a thumbnail.

const video = await client.videos.uploadThumbnail(videoId, file);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#uploadThumbnail

import apivideo
from apivideo.api import videos_api
from apivideo.model.bad_request import BadRequest
from apivideo.model.not_found import NotFound
from apivideo.model.video import Video
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = videos_api.VideosApi(api_client)
    video_id = "videoId_example" # str | Unique identifier of the chosen video 
    file = open('/path/to/file', 'rb') # file_type | The image to be added as a thumbnail.

    # example passing only required values which don't have defaults set
    try:
        # Upload a thumbnail
        api_response = api_instance.upload_thumbnail(video_id, file)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling VideosApi->upload_thumbnail: %s\
" % e)
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#uploadThumbnail

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.VideosApi;
import java.util.*;

public class Example {
 public static void main(String[] args) {
   ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
   // if you rather like to use the sandbox environment:
   // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

   VideosApi apiInstance = client.videos();

   String videoId = "videoId_example"; // Unique identifier of the chosen video 
   File file = new File("/path/to/file"); // The image to be added as a thumbnail.

   try {
     Video result = apiInstance.uploadThumbnail(videoId, file);
     System.out.println(result);
   } catch (ApiException e) {
     System.err.println("Exception when calling VideosApi#uploadThumbnail");
     System.err.println("Status code: " + e.getCode());
     System.err.println("Reason: " + e.getMessage());
     System.err.println("Response headers: " + e.getResponseHeaders());
     e.printStackTrace();
   }
 }
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#uploadThumbnail

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class uploadThumbnailExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var videoId = videoId_example;  // string | Unique identifier of the chosen video 
            var file = BINARY_DATA_HERE;  // System.IO.Stream | The image to be added as a thumbnail.
            var apiVideosInstance = apiInstance.Videos();
            try
            {
                // Upload a thumbnail
                Video result = apiVideosInstance.uploadThumbnail(videoId, file);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling VideosApi.uploadThumbnail: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
<?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#uploadWithUploadToken

require __DIR__ . '/vendor/autoload.php';

$client = new \ApiVideo\Client\Client(
    'https://ws.api.video',
    'YOUR_API_KEY',
    new \Symfony\Component\HttpClient\Psr18Client()
); 

$videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Unique identifier of the chosen video
$thumbnail = new SplFileObject(__DIR__ . '/thumbnail.jpg'); // The image to be added as a thumbnail.

$client->videos()->uploadThumbnail($videoId, $thumbnail); 
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#uploadThumbnail

Response

Examples Schema

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.085Z",
  "publishedAt": "2020-07-14T23:36:18.598Z",
  "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"
  }
}

Bad Request

{
  "status": 400,
  "type": "https://docs.api.video/docs/fileextension",
  "title": "Only [jpeg, jpg, JPG, JPEG] extensions are supported.",
  "name": "file"
}

Not Found

{
  "type": "https://docs.api.video/docs/resourcenot_found",
  "title": "The requested resource was not found.",
  "name": "videoId",
  "status": 404
}

videoId

string

required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"

createdAt

string

date-time

When a video was created, presented in ISO-8601 format.

Example
"2019-06-24T11:45:01.109+00"

title

string

The title of the video content.

Example
"Maths video"

description

string

A description for the video content.

Example
"An amazing video explaining string theory."

publishedAt

string

date-time

The date and time the API created the video. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:25:51.000Z"

updatedAt

string

date-time

The date and time the video was updated. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:15:51.000Z"

tags

array[string]

One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces.

Example
"\"tags\": [\"maths\", \"string theory\", \"video\"]"

string

metadata

array[object (Metadata)]

Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. Dynamic Metadata allows you to define a key that allows any value pair.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"

Metadata

object (Metadata)

key

string

The constant that defines the data set.

Example
"Color"

value

string

A variable which belongs to the data set.

Example
"Green"

source

object (source)

Source information about the video.

uri

string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"

type

string

liveStream

object (liveStream)

This appears if the video is from a Live Record.

liveStreamId

string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"

links

array[object]

object

rel

string

uri

string

assets

object (assets)

Collection of details about the video object that you can use to work with the video object.

hls

string

uri

This is the manifest URL. For HTTP Live Streaming (HLS), when a HLS video stream is initiated, the first file to download is the manifest. This file has the extension M3U8, and provides the video player with information about the various bitrates available for streaming.

iframe

string

Code to use video from a third party website

Example
"<iframe src=\"//embed.api.video/c188ed58-3403-46a2-b91b-44603d10b2c9?token=831a9bd9-9f50-464c-a369-8e9d914371ae\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>"

player

string

uri

Raw url of the player.

Example
"https://embed.api.video/1b9d6ae8-8f57-4b6d-8552-d636926b4f5f?token=831a9bd9-9f50-464c-a369-8e9d914371ae"

thumbnail

string

uri

Poster of the video.

Example
"https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/thumbnail.jpg"

mp4

string

uri

Available only if mp4Support is enabled. Raw mp4 url.

Example
"https://cdn.api.video/vod/vi4k0jvEUuaTdRAEjQ4Jfrgz/token/8fd70443-d9f0-45d2-b01c-12c8cfc707c9/mp4/source.mp4"

playerId

string

The id of the player that will be applied on the video.

Example
"pl45KFKdlddgk654dspkze"

public

boolean

Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on private videos.

Example
false

panoramic

boolean

Defines if video is panoramic.

Example
false

mp4Support

boolean

This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video.

Example
true

type

string

A link to the error documentation.

title

string

A description of the error that occurred.

name

string

The name of the parameter that caused the error.

status

int

The HTTP status code.

problems

array[object (BadRequest)]

Returns any additional problems in the request in an array of objects.

BadRequest

object (BadRequest)

type

string

A link to the error documentation.

title

string

A description of the error that occurred.

name

string

The name of the parameter that caused the error.

status

int

The HTTP status code.

type

string

title

string

name

string

status

int

Set a thumbnail

patch /videos/{videoId}/thumbnail

Set a thumbnail from a specific time interval within a video.

HTTP basic apiKey

videoId

string

required

Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.

Example
"vi4k0jvEUuaTdRAEjQ4Jfrgz"

timecode

string

\d{2}:\d{2}:\d{2}(\.\d{2})?

required

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.

Request

{
  "timecode": "00:00:00.000"
}
// 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#pickThumbnail

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 | Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.
    videoThumbnailPickPayload := *apivideosdk.NewVideoThumbnailPickPayload("Timecode_example") // VideoThumbnailPickPayload | 

    
    res, err := client.Videos.PickThumbnail(videoId, videoThumbnailPickPayload)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `Videos.PickThumbnail``: %v\
", err)
    }
    // response from `PickThumbnail`: Video
    fmt.Fprintf(os.Stdout, "Response from `Videos.PickThumbnail`: %v\
", res)
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#pickThumbnail

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.
const videoThumbnailPickPayload = {
  timecode: "00:01:00.000",  // Frame in video to be used as a placeholder before the video plays. 
}; 

const video = await client.videos.pickThumbnail(videoId, videoThumbnailPickPayload);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#pickThumbnail

import apivideo
from apivideo.api import videos_api
from apivideo.model.video_thumbnail_pick_payload import VideoThumbnailPickPayload
from apivideo.model.not_found import NotFound
from apivideo.model.video import Video
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = videos_api.VideosApi(api_client)
    video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.
    video_thumbnail_pick_payload = VideoThumbnailPickPayload(
        timecode="04:80:72",
    ) # VideoThumbnailPickPayload | 

    # example passing only required values which don't have defaults set
    try:
        # Pick a thumbnail
        api_response = api_instance.pick_thumbnail(video_id, video_thumbnail_pick_payload)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling VideosApi->pick_thumbnail: %s\
" % e)
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#pickThumbnail

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.VideosApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    VideosApi apiInstance = client.videos();
    
    String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.
    VideoThumbnailPickPayload videoThumbnailPickPayload = new VideoThumbnailPickPayload(); // 
    videoThumbnailPickPayload.setTimecode("null"); // Frame in video to be used as a placeholder before the video plays.
Example: &#39;&quot;00:01:00.000&quot; for 1 minute into the video.&#39;
Valid Patterns:
&quot;hh:mm:ss.ms&quot;
&quot;hh:mm:ss:frameNumber&quot;
&quot;124&quot; (integer value is reported as seconds)
If selection is out of range, &quot;00:00:00.00&quot; will be chosen.


    try {
      Video result = apiInstance.pickThumbnail(videoId, videoThumbnailPickPayload);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling VideosApi#pickThumbnail");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}        
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#pickThumbnail

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class pickThumbnailExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.
            var videoThumbnailPickPayload = new VideoThumbnailPickPayload(); // VideoThumbnailPickPayload | 
            var apiVideosInstance = apiInstance.Videos();
            try
            {
                // Pick a thumbnail
                Video result = apiVideosInstance.pickThumbnail(videoId, videoThumbnailPickPayload);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling VideosApi.pickThumbnail: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}              
<?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#pickThumbnail

require __DIR__ . '/vendor/autoload.php';

$client = new \ApiVideo\Client\Client(
    'https://ws.api.video',
    'YOUR_API_KEY',
    new \Symfony\Component\HttpClient\Psr18Client()
);
 
$videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.

$video = $client->videos()->pickThumbnail($videoId, (new \ApiVideo\Client\Model\VideoThumbnailPickPayload())
    ->setTimecode("00:01:00.000")); // Frame in video to be used as a placeholder before the video plays. 
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#pickThumbnail

Response

Examples Schema

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": "4665-07-14T23:36:18.598Z",
  "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"
  }
}

Not Found

{
  "type": "https://docs.api.video/docs/resourcenot_found",
  "title": "The requested resource was not found.",
  "name": "videoId",
  "status": 404
}

videoId

string

required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"

createdAt

string

date-time

When a video was created, presented in ISO-8601 format.

Example
"2019-06-24T11:45:01.109+00"

title

string

The title of the video content.

Example
"Maths video"

description

string

A description for the video content.

Example
"An amazing video explaining string theory."

publishedAt

string

date-time

The date and time the API created the video. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:25:51.000Z"

updatedAt

string

date-time

The date and time the video was updated. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:15:51.000Z"

tags

array[string]

One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces.

Example
"\"tags\": [\"maths\", \"string theory\", \"video\"]"

string

metadata

array[object (Metadata)]

Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. Dynamic Metadata allows you to define a key that allows any value pair.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"

Metadata

object (Metadata)

key

string

The constant that defines the data set.

Example
"Color"

value

string

A variable which belongs to the data set.

Example
"Green"

source

object (source)

Source information about the video.

uri

string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"

type

string

liveStream

object (liveStream)

This appears if the video is from a Live Record.

liveStreamId

string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"

links

array[object]

object

rel

string

uri

string

assets

object (assets)

Collection of details about the video object that you can use to work with the video object.

hls

string

uri

This is the manifest URL. For HTTP Live Streaming (HLS), when a HLS video stream is initiated, the first file to download is the manifest. This file has the extension M3U8, and provides the video player with information about the various bitrates available for streaming.

iframe

string

Code to use video from a third party website

Example
"<iframe src=\"//embed.api.video/c188ed58-3403-46a2-b91b-44603d10b2c9?token=831a9bd9-9f50-464c-a369-8e9d914371ae\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>"

player

string

uri

Raw url of the player.

Example
"https://embed.api.video/1b9d6ae8-8f57-4b6d-8552-d636926b4f5f?token=831a9bd9-9f50-464c-a369-8e9d914371ae"

thumbnail

string

uri

Poster of the video.

Example
"https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/thumbnail.jpg"

mp4

string

uri

Available only if mp4Support is enabled. Raw mp4 url.

Example
"https://cdn.api.video/vod/vi4k0jvEUuaTdRAEjQ4Jfrgz/token/8fd70443-d9f0-45d2-b01c-12c8cfc707c9/mp4/source.mp4"

playerId

string

The id of the player that will be applied on the video.

Example
"pl45KFKdlddgk654dspkze"

public

boolean

Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on private videos.

Example
false

panoramic

boolean

Defines if video is panoramic.

Example
false

mp4Support

boolean

This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video.

Example
true

type

string

title

string

name

string

status

int

Retrieve a video object

get /videos/{videoId}

Retrieve the video details by video id.

HTTP basic apiKey

videoId

string

required

The unique identifier for the video you want details about.

Request

// 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)
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#get

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to retrieve.
const result = await client.videos.get(videoId);  
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#get

import apivideo
from apivideo.api import videos_api
from apivideo.model.not_found import NotFound
from apivideo.model.video import Video
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = videos_api.VideosApi(api_client)
    video_id = "videoId_example" # str | The unique identifier for the video you want details about.

    # example passing only required values which don't have defaults set
    try:
        # Show a video
        api_response = api_instance.get(video_id)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling VideosApi->get: %s\n" % e)
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#get

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.VideosApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    VideosApi apiInstance = client.videos();
    
    String videoId = "videoId_example"; // The unique identifier for the video you want details about.

    try {
      Video result = apiInstance.get(videoId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling VideosApi#get");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}  
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#get

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class getExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var videoId = videoId_example;  // string | The unique identifier for the video you want details about.
            var apiVideosInstance = apiInstance.Videos();
            try
            {
                // Show a video
                Video result = apiVideosInstance.get(videoId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling VideosApi.get: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
} 
<?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#getStatus

require __DIR__ . '/vendor/autoload.php';

$client = new \ApiVideo\Client\Client(
    'https://ws.api.video',
    'YOUR_API_KEY',
    new \Symfony\Component\HttpClient\Psr18Client()
);

$videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want the status for.
$videoStatus = $client->videos()->getStatus($videoId);  
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#get

Response

Examples Schema

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.000Z",
  "updatedAt": "2019-12-16T08:48:49.000Z",
  "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"
  }
}

Not Found

{
  "type": "https://docs.api.video/docs/resourcenot_found",
  "title": "The requested resource was not found.",
  "name": "videoId",
  "status": 404
}

videoId

string

required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"

createdAt

string

date-time

When a video was created, presented in ISO-8601 format.

Example
"2019-06-24T11:45:01.109+00"

title

string

The title of the video content.

Example
"Maths video"

description

string

A description for the video content.

Example
"An amazing video explaining string theory."

publishedAt

string

date-time

The date and time the API created the video. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:25:51.000Z"

updatedAt

string

date-time

The date and time the video was updated. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:15:51.000Z"

tags

array[string]

One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces.

Example
"\"tags\": [\"maths\", \"string theory\", \"video\"]"

string

metadata

array[object (Metadata)]

Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. Dynamic Metadata allows you to define a key that allows any value pair.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"

Metadata

object (Metadata)

key

string

The constant that defines the data set.

Example
"Color"

value

string

A variable which belongs to the data set.

Example
"Green"

source

object (source)

Source information about the video.

uri

string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"

type

string

liveStream

object (liveStream)

This appears if the video is from a Live Record.

liveStreamId

string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"

links

array[object]

object

rel

string

uri

string

assets

object (assets)

Collection of details about the video object that you can use to work with the video object.

hls

string

uri

This is the manifest URL. For HTTP Live Streaming (HLS), when a HLS video stream is initiated, the first file to download is the manifest. This file has the extension M3U8, and provides the video player with information about the various bitrates available for streaming.

iframe

string

Code to use video from a third party website

Example
"<iframe src=\"//embed.api.video/c188ed58-3403-46a2-b91b-44603d10b2c9?token=831a9bd9-9f50-464c-a369-8e9d914371ae\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>"

player

string

uri

Raw url of the player.

Example
"https://embed.api.video/1b9d6ae8-8f57-4b6d-8552-d636926b4f5f?token=831a9bd9-9f50-464c-a369-8e9d914371ae"

thumbnail

string

uri

Poster of the video.

Example
"https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/thumbnail.jpg"

mp4

string

uri

Available only if mp4Support is enabled. Raw mp4 url.

Example
"https://cdn.api.video/vod/vi4k0jvEUuaTdRAEjQ4Jfrgz/token/8fd70443-d9f0-45d2-b01c-12c8cfc707c9/mp4/source.mp4"

playerId

string

The id of the player that will be applied on the video.

Example
"pl45KFKdlddgk654dspkze"

public

boolean

Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on private videos.

Example
false

panoramic

boolean

Defines if video is panoramic.

Example
false

mp4Support

boolean

This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video.

Example
true

type

string

title

string

name

string

status

int

Delete a video object

delete /videos/{videoId}

Delete a video object by video ID.

HTTP basic apiKey

videoId

string

required

The video ID for the video you want to delete.

Example
"vi4k0jvEUuaTdRAEjQ4Jfrgz"

Request

// 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)
    }
}  
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#delete

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // the id of the video to delete
await client.videos.delete(videoId); 
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#delete

import apivideo
from apivideo.api import videos_api
from apivideo.model.not_found import NotFound
from pprint import pprint
# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = videos_api.VideosApi(api_client)
    video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The video ID for the video you want to delete.
    # example passing only required values which don't have defaults set
    try:
        # Delete a video
        api_instance.delete(video_id)
    except apivideo.ApiException as e:
        print("Exception when calling VideosApi->delete: %s\n" % e)
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#delete

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.VideosApi;
import java.util.*;
  
public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);
    
    VideosApi apiInstance = client.videos();
    
    String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The video ID for the video you want to delete.
    
    try {
      apiInstance.delete(videoId);
    } catch (ApiException e) {
      System.err.println("Exception when calling VideosApi#delete");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#delete

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class deleteExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";
            var apiInstance = new ApiVideoClient(apiKey,basePath);
            var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | The video ID for the video you want to delete.
            var apiVideosInstance = apiInstance.Videos();
            try
            {
                // Delete a video
                apiVideosInstance.delete(videoId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling VideosApi.delete: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
} 
<?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#delete

require __DIR__ . '/vendor/autoload.php';

$client = new \ApiVideo\Client\Client(
    'https://ws.api.video',
    'YOUR_API_KEY',
    new \Symfony\Component\HttpClient\Psr18Client()
);

$videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // the id of the video to delete
$client->videos()->delete($videoId); 
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#delete

Response

Examples Schema

No Content

Empty response

Not Found

{
  "type": "https://docs.api.video/docs/resourcenot_found",
  "title": "The requested resource was not found.",
  "name": "videoId",
  "status": 404
}

No schema

type

string

title

string

name

string

status

int

Update a video object

patch /videos/{videoId}

Update the parameters associated with a video ID.

HTTP basic apiKey

videoId

string

required

The video ID for the video you want to update.

Example
"vi4k0jvEUuaTdRAEjQ4Jfrgz"

playerId

string

The unique ID for the player you want to associate with your video.

Example
"pl4k0jvEUuaTdRAEjQ4Jfrgz"

title

string

The title you want to use for your video.

description

string

A brief description of the video.

Example
"A film about good books."

public

boolean

Whether the video is publicly available or not. False means it is set to private. Default is true. Tutorials on private videos.

Example
true

panoramic

boolean

Whether the video is a 360 degree or immersive video.

Example
false

mp4Support

boolean

Whether the player supports the mp4 format.

Example
true

tags

array[string]

A 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.

Example
"[\"maths\", \"string theory\", \"video\"]"

string

metadata

array[object (Metadata)]

A 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. Dynamic Metadata allows you to define a key that allows any value pair.

Metadata

object (Metadata)

key

string

The constant that defines the data set.

Example
"Color"

value

string

A variable which belongs to the data set.

Example
"Green"

Request

{
  "playerId": "pl45KFKdlddgk654dspkze",
  "title": "String theory",
  "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"
    }
  ]
}
// 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#update

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.
    videoUpdatePayload := *apivideosdk.NewVideoUpdatePayload() // VideoUpdatePayload | 

    
    res, err := client.Videos.Update(videoId, videoUpdatePayload)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `Videos.Update``: %v\
", err)
    }
    // response from `Update`: Video
    fmt.Fprintf(os.Stdout, "Response from `Videos.Update`: %v\
", res)
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#update

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The video ID for the video you want to update.

// define the value you want to update
const videoUpdatePayload = {
    playerId: "pl4k0jvEUuaTdRAEjQ4Jfrgz", // The unique ID for the player you want to associate with your video.
    title: "title_example", // The title you want to use for your video.
    description: "A film about good books.", // A brief description of the video.
    _public: true, // Whether the video is publicly available or not. False means it is set to private.
    panoramic: false, // Whether the video is a 360 degree or immersive video.
    mp4Support: true, // Whether the player supports the mp4 format.
    tags: ["maths", "string theory", "video"], // A 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.
    metadata: [{"key": "Author", "value": "John Doe"}], // A 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.
}; 


const updatedVideo = await client.videos.update(videoId, videoUpdatePayload);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#update

import apivideo
from apivideo.api import videos_api
from apivideo.model.video_update_payload import VideoUpdatePayload
from apivideo.model.bad_request import BadRequest
from apivideo.model.not_found import NotFound
from apivideo.model.video import Video
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = videos_api.VideosApi(api_client)
    video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The video ID for the video you want to delete.
    video_update_payload = VideoUpdatePayload(
        player_id="pl4k0jvEUuaTdRAEjQ4Jfrgz",
        title="title_example",
        description="A film about good books.",
        public=True,
        panoramic=False,
        mp4_support=True,
        tags=["maths", "string theory", "video"],
        metadata=[
            Metadata(
                key="Color",
                value="Green",
            ),
        ],
    ) # VideoUpdatePayload | 

    # example passing only required values which don't have defaults set
    try:
        # Update a video
        api_response = api_instance.update(video_id, video_update_payload)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling VideosApi->update: %s\
" % e)              
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#update

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.VideosApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    VideosApi apiInstance = client.videos();
    
    String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The video ID for the video you want to delete.
    VideoUpdatePayload videoUpdatePayload = new VideoUpdatePayload(); // 
    videoUpdatePayload.setPlayerId("pl4k0jvEUuaTdRAEjQ4Jfrgz"); // The unique ID for the player you want to associate with your video.
    videoUpdatePayload.setTitle("null"); // The title you want to use for your video.
    videoUpdatePayload.setDescription("A film about good books."); // A brief description of the video.
    videoUpdatePayload.setPublic(true); // Whether the video is publicly available or not. False means it is set to private.
    videoUpdatePayload.setPanoramic(false); // Whether the video is a 360 degree or immersive video.
    videoUpdatePayload.setMp4Support(true); // Whether the player supports the mp4 format.
    videoUpdatePayload.setTags(Arrays.asList("maths", "string theory", "video")); // A 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.
    videoUpdatePayload.setMetadata(Collections.<Metadata>emptyList()); // A 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.


    try {
      Video result = apiInstance.update(videoId, videoUpdatePayload);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling VideosApi#update");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#update

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class updateExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | The video ID for the video you want to delete.
            var videoUpdatePayload = new VideoUpdatePayload(); // VideoUpdatePayload | 
            var apiVideosInstance = apiInstance.Videos();
            try
            {
                // Update a video
                Video result = apiVideosInstance.update(videoId, videoUpdatePayload);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling VideosApi.update: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
<?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#update

require __DIR__ . '/vendor/autoload.php';

$client = new \ApiVideo\Client\Client(
    'https://ws.api.video',
    'YOUR_API_KEY',
    new \Symfony\Component\HttpClient\Psr18Client()
);

$videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The video ID for the video you want to update.

$client->videos()->update($videoId, (new \ApiVideo\Client\Model\VideoUpdatePayload())
    ->setPlayerId("pl4k0jvEUuaTdRAEjQ4Jfrgz") // The unique ID for the player you want to associate with your video.
    ->setTitle("The new title") // The title you want to use for your video.
    ->setDescription("A new description") // A brief description of the video.
    ->setPublic(false) // Whether the video is publicly available or not. False means it is set to private.
    ->setPanoramic(false) // Whether the video is a 360 degree or immersive video.
    ->setMp4Support(true) // Whether the player supports the mp4 format.
    ->setTags(["tag1", "tag2"]) // A 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.
    ->setMetadata(array( // A 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.
        new \ApiVideo\Client\Model\Metadata(["key" => "aa", 'value' => "bb"]),
        new \ApiVideo\Client\Model\Metadata(["key" => "aa2", 'value' => "bb2"])))); 
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#update

Response

Examples Schema

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.000Z",
  "updatedAt": "2019-12-16T08:48:49.000Z",
  "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"
  }
}

Bad Request

{
  "type": "https://docs.api.video/docs/attributeinvalid",
  "title": "This attribute must be a ISO-8601 date.",
  "name": "scheduledAt",
  "status": 400,
  "problems": [
    {
      "type": "https://docs.api.video/docs/attributeinvalid",
      "title": "This attribute must be a ISO-8601 date.",
      "name": "scheduledAt"
    },
    {
      "type": "https://docs.api.video/docs/attributeinvalid",
      "title": "This attribute must be an array.",
      "name": "tags"
    },
    {
      "type": "https://docs.api.video/docs/attributeinvalid",
      "title": "This attribute must be an array.",
      "name": "metadata"
    }
  ]
}

Not Found

{
  "type": "https://docs.api.video/docs/resourcenot_found",
  "title": "The requested resource was not found.",
  "name": "videoId",
  "status": 404
}

videoId

string

required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"

createdAt

string

date-time

When a video was created, presented in ISO-8601 format.

Example
"2019-06-24T11:45:01.109+00"

title

string

The title of the video content.

Example
"Maths video"

description

string

A description for the video content.

Example
"An amazing video explaining string theory."

publishedAt

string

date-time

The date and time the API created the video. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:25:51.000Z"

updatedAt

string

date-time

The date and time the video was updated. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:15:51.000Z"

tags

array[string]

One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces.

Example
"\"tags\": [\"maths\", \"string theory\", \"video\"]"

string

metadata

array[object (Metadata)]

Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. Dynamic Metadata allows you to define a key that allows any value pair.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"

Metadata

object (Metadata)

key

string

The constant that defines the data set.

Example
"Color"

value

string

A variable which belongs to the data set.

Example
"Green"

source

object (source)

Source information about the video.

uri

string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"

type

string

liveStream

object (liveStream)

This appears if the video is from a Live Record.

liveStreamId

string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"

links

array[object]

object

rel

string

uri

string

assets

object (assets)

Collection of details about the video object that you can use to work with the video object.

hls

string

uri

This is the manifest URL. For HTTP Live Streaming (HLS), when a HLS video stream is initiated, the first file to download is the manifest. This file has the extension M3U8, and provides the video player with information about the various bitrates available for streaming.

iframe

string

Code to use video from a third party website

Example
"<iframe src=\"//embed.api.video/c188ed58-3403-46a2-b91b-44603d10b2c9?token=831a9bd9-9f50-464c-a369-8e9d914371ae\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>"

player

string

uri

Raw url of the player.

Example
"https://embed.api.video/1b9d6ae8-8f57-4b6d-8552-d636926b4f5f?token=831a9bd9-9f50-464c-a369-8e9d914371ae"

thumbnail

string

uri

Poster of the video.

Example
"https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/thumbnail.jpg"

mp4

string

uri

Available only if mp4Support is enabled. Raw mp4 url.

Example
"https://cdn.api.video/vod/vi4k0jvEUuaTdRAEjQ4Jfrgz/token/8fd70443-d9f0-45d2-b01c-12c8cfc707c9/mp4/source.mp4"

playerId

string

The id of the player that will be applied on the video.

Example
"pl45KFKdlddgk654dspkze"

public

boolean

Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on private videos.

Example
false

panoramic

boolean

Defines if video is panoramic.

Example
false

mp4Support

boolean

This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video.

Example
true

type

string

A link to the error documentation.

title

string

A description of the error that occurred.

name

string

The name of the parameter that caused the error.

status

int

The HTTP status code.

problems

array[object (BadRequest)]

Returns any additional problems in the request in an array of objects.

BadRequest

object (BadRequest)

type

string

A link to the error documentation.

title

string

A description of the error that occurred.

name

string

The name of the parameter that caused the error.

status

int

The HTTP status code.

type

string

title

string

name

string

status

int

Retrieve video status and details

get /videos/{videoId}/status

Retrieve 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.

HTTP basic apiKey

videoId

string

required

The unique identifier for the video you want the status for.

Example
"vi4k0jvEUuaTdRAEjQ4Jfrgz"

Request

// 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)
}             
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#getStatus

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want the status for.
const result = await client.videos.getStatus(videoId); 
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#getStatus

import apivideo
from apivideo.api import videos_api
from apivideo.model.video_status import VideoStatus
from apivideo.model.not_found import NotFound
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = videos_api.VideosApi(api_client)
    video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want the status for.

    # example passing only required values which don't have defaults set
    try:
        # Show video status
        api_response = api_instance.get_status(video_id)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling VideosApi->get_status: %s\n" % e)
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#getStatus

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.VideosApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    VideosApi apiInstance = client.videos();
    
    String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The unique identifier for the video you want the status for.

    try {
      VideoStatus result = apiInstance.getStatus(videoId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling VideosApi#getStatus");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#getStatus

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class getStatusExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | The unique identifier for the video you want the status for.
            var apiVideosInstance = apiInstance.Videos();
            try
            {
                // Show video status
                VideoStatus result = apiVideosInstance.getStatus(videoId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling VideosApi.getStatus: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
<?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#getStatus

require __DIR__ . '/vendor/autoload.php';

$client = new \ApiVideo\Client\Client(
    'https://ws.api.video',
    'YOUR_API_KEY',
    new \Symfony\Component\HttpClient\Psr18Client()
);

$videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want the status for.
$videoStatus = $client->videos()->getStatus($videoId);  
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#getStatus

Response

Examples Schema

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"
    }
  }
}

Not Found

{
  "type": "https://docs.api.video/docs/resourcenot_found",
  "title": "The requested resource was not found.",
  "name": "videoId",
  "status": 404
}

ingest

object (ingest)

Details about the capturing, transferring, and storing of your video for use immediately or in the future.

status

string

There are four possible statuses depending on how you provide a video file:

  • uploading - the API is gathering the video source file from an upload.
  • uploaded - the video file is fully uploaded.
  • ingesting - the API is gathering the video source file from either a URL, or from cloning.
  • ingested - the video file is fully stored.
Enum
  • uploading
  • uploaded
  • ingesting
  • ingested
Example
"uploaded"

filesize

int or null

The size of your file in bytes.

Example
200000

receivedBytes

array[object (BytesRange)]

The total number of bytes received, listed for each chunk of the upload.

BytesRange

object (BytesRange)

from

int

The starting point for the range of bytes for a chunk of a video.

Example
0

to

int

The ending point for the range of bytes for a chunk of a video.

Example
9999

total

int

The total number of expected bytes.

Example
10000

receivedParts

object (receivedParts)

parts

array[int]

The parts that have been uploaded, ordered. For example, if part 2 was sent before part 1, and both have been uploaded, the output will be [1, 2].

Example
"[1, 2, 3]"

int

total

int or null

Contains the number of expected parts. The total will be listed as "null" until the total number of parts is known.

Example
3

encoding

object (encoding)

playable

boolean

Whether the video is playable or not.

Example
true

qualities

array[object (Quality)]

Available qualities the video can be viewed in.

Quality

object (Quality)

type

string

The type of video (hls or mp4).

Enum
  • hls
  • mp4
Example
"hls"

quality

string

The quality of the video you have, in pixels. Choices include 360p, 480p, 720p, 1080p, and 2160p.

Enum
  • 240p
  • 360p
  • 480p
  • 720p
  • 1080p
  • 2160p
Example
"720p"

status

string

The status of your video. Statuses include waiting - the video is waiting to be encoded. encoding - the video is in the process of being encoded. encoded - the video was successfully encoded. failed - the video failed to be encoded.

Enum
  • waiting
  • encoding
  • encoded
  • failed

metadata

object (metadata)

width

int or null

The width of the video in pixels.

height

int or null

The height of the video in pixels.

bitrate

number or null

The number of bits processed per second.

duration

int or null

The length of the video.

framerate

int or null

The frequency with which consecutive images or frames appear on a display. Shown in this API as frames per second (fps).

Example
60

samplerate

int or null

How many samples per second a digital audio system uses to record an audio signal. The higher the rate, the higher the frequencies that can be recorded. They are presented in this API using hertz.

Example
48000

videoCodec

string or null

The method used to compress and decompress digital video. API Video supports all codecs in the libavcodec library.

audioCodec

string or null

The method used to compress and decompress digital audio for your video.

aspectRatio

string or null

type

string

title

string

name

string

status

int

Upload with an delegated upload token

post /upload

Uploading a video with the delegated upload token.

Content-Range

string

^bytes [0-9]*-[0-9]*\/[0-9]*$

Content-Range represents the range of bytes that will be returned as a result of the request. Byte ranges are inclusive, meaning that bytes 0-999 represents the first 1000 bytes in a file or object.

Example
"Content-Range: bytes 200-100/5000"

token

string

required

The unique identifier for the token you want to use to upload a video.

Example
"to1tcmSFHeYY5KzyhOqVKMKb"

file

file

required

The path to the video you want to upload.

Example
"path/to/video/video.mp4"

videoId

string

The video id returned by the first call to this endpoint in a large video upload scenario.

Request

// 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
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#uploadWithUploadToken

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const token = 'to4k0jvEUuaTdRAEjQ4Jfrgz'; // Enter the unique identifier for the token you want to use to upload a video.
const file = './my-video.mp4'; // 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.
      
const video = await client.videos.uploadWithUploadToken(token, file);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#uploadWithUploadToken
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#uploadWithUploadToken
// First add the "video.api:android-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-android-client/blob/main/docs/VideosApi.md#uploadWithUploadToken

VideosApiStore.initialize()

val workManager = WorkManager.getInstance(context) // WorkManager comes from package "androidx.work:work-runtime"

val token = "to1tcmSFHeYY5KzyhOqVKMKb" // The unique identifier for the token you want to use to upload a video.
val file = File("/path/to/file") // The path to the video you want to upload.

workManager.uploadWithUploadToken(token, file) // Dispatch the upload with the WorkManager
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#uploadWithUploadToken
<?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#pickThumbnail

require __DIR__ . '/vendor/autoload.php';

$client = new \ApiVideo\Client\Client(
    'https://ws.api.video',
    'YOUR_API_KEY',
    new \Symfony\Component\HttpClient\Psr18Client()
);
 
$videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.

$video = $client->videos()->pickThumbnail($videoId, (new \ApiVideo\Client\Model\VideoThumbnailPickPayload())
    ->setTimecode("00:01:00.000")); // Frame in video to be used as a placeholder before the video plays. 
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#uploadWithUploadToken

Response

Examples Schema

Created

{
  "videoId": "vi4k0jvEUuaTdRAEjQ4Jfrgz",
  "playerId": "pl45KFKdlddgk654dspkze",
  "title": "Maths video",
  "description": "An amazing video explaining the string theory",
  "public": false,
  "panoramic": false,
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "publishedAt": "4665-07-14T23:36:18.598Z",
  "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"
  }
}

Bad Request

{
  "type": "string",
  "title": "string",
  "name": "string",
  "status": 123,
  "problems": [
    {
      "type": "string",
      "title": "string",
      "name": "string",
      "status": 123
    }
  ]
}

videoId

string

required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"

createdAt

string

date-time

When a video was created, presented in ISO-8601 format.

Example
"2019-06-24T11:45:01.109+00"

title

string

The title of the video content.

Example
"Maths video"

description

string

A description for the video content.

Example
"An amazing video explaining string theory."

publishedAt

string

date-time

The date and time the API created the video. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:25:51.000Z"

updatedAt

string

date-time

The date and time the video was updated. Date and time are provided using ISO-8601 UTC format.

Example
"2019-12-16T08:15:51.000Z"

tags

array[string]

One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces.

Example
"\"tags\": [\"maths\", \"string theory\", \"video\"]"

string

metadata

array[object (Metadata)]

Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. Dynamic Metadata allows you to define a key that allows any value pair.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"

Metadata

object (Metadata)

key

string

The constant that defines the data set.

Example
"Color"

value

string

A variable which belongs to the data set.

Example
"Green"

source

object (source)

Source information about the video.

uri

string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"

type

string

liveStream

object (liveStream)

This appears if the video is from a Live Record.

liveStreamId

string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"

links

array[object]

object

rel

string

uri

string

assets

object (assets)

Collection of details about the video object that you can use to work with the video object.

hls

string

uri

This is the manifest URL. For HTTP Live Streaming (HLS), when a HLS video stream is initiated, the first file to download is the manifest. This file has the extension M3U8, and provides the video player with information about the various bitrates available for streaming.

iframe

string

Code to use video from a third party website

Example
"<iframe src=\"//embed.api.video/c188ed58-3403-46a2-b91b-44603d10b2c9?token=831a9bd9-9f50-464c-a369-8e9d914371ae\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>"

player

string

uri

Raw url of the player.

Example
"https://embed.api.video/1b9d6ae8-8f57-4b6d-8552-d636926b4f5f?token=831a9bd9-9f50-464c-a369-8e9d914371ae"

thumbnail

string

uri

Poster of the video.

Example
"https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/thumbnail.jpg"

mp4

string

uri

Available only if mp4Support is enabled. Raw mp4 url.

Example
"https://cdn.api.video/vod/vi4k0jvEUuaTdRAEjQ4Jfrgz/token/8fd70443-d9f0-45d2-b01c-12c8cfc707c9/mp4/source.mp4"

playerId

string

The id of the player that will be applied on the video.

Example
"pl45KFKdlddgk654dspkze"

public

boolean

Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on private videos.

Example
false

panoramic

boolean

Defines if video is panoramic.

Example
false

mp4Support

boolean

This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video.

Example
true

type

string

A link to the error documentation.

title

string

A description of the error that occurred.

name

string

The name of the parameter that caused the error.

status

int

The HTTP status code.

problems

array[object (BadRequest)]

Returns any additional problems in the request in an array of objects.

BadRequest

object (BadRequest)

type

string

A link to the error documentation.

title

string

A description of the error that occurred.

name

string

The name of the parameter that caused the error.

status

int

The HTTP status code.

Was this page helpful?