Searching...

Videos

get /videos

List all video objects

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

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.

tags[] array

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.

metadata object

Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter.

description string

Retrieve video objects by description .

liveStreamId string

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

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
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
currentPage int

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

Default
1
pageSize int

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

Default
25

Responses

Success

Response body Headers
data array required
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 required
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Bad Request

Response body Headers
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

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

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

// 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 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" } })
<?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 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

Success

{
  "data": [
    {
      "videoId": "vi4blUQJFrYWbaG44NChkH27",
      "playerId": "pl45KFKdlddgk654dspkze",
      "title": "Maths video",
      "description": "An amazing video explaining the string theory",
      "language": "en",
      "languageOrigin": "api",
      "public": false,
      "panoramic": false,
      "mp4Support": true,
      "tags": [
        "maths",
        "string theory",
        "video"
      ],
      "metadata": [
        {
          "key": "Author",
          "value": "John Doe"
        },
        {
          "key": "Format",
          "value": "Tutorial"
        }
      ],
      "publishedAt": "2019-12-16T08:25:51+00:00",
      "updatedAt": "2019-12-16T08:48:49+00:00",
      "discarded": false,
      "discardedAt": null,
      "deletesAt": null,
      "source": {
        "uri": "/videos/c188ed58-3403-46a2-b91b-44603d10b2c9/source"
      },
      "assets": {
        "iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
        "player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
        "hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
        "thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
        "mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
      }
    },
    {
      "videoId": "vi4blUQJFrYWbaG44NChkH27",
      "title": "Video Title",
      "description": "A description for your video.",
      "language": "en",
      "languageOrigin": "api",
      "public": false,
      "panoramic": false,
      "mp4Support": true,
      "tags": [
        "books",
        "short stories"
      ],
      "metadata": [
        {
          "key": "Author",
          "value": "John Doe"
        },
        {
          "key": "Science Fiction",
          "value": "Cyberpunk"
        },
        {
          "key": "Technology",
          "value": "Computers"
        }
      ],
      "publishedAt": "2019-12-16T08:25:51+00:00",
      "updatedAt": "2019-12-16T08:48:49+00:00",
      "discarded": false,
      "discardedAt": null,
      "deletesAt": null,
      "source": {
        "uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
      },
      "assets": {
        "iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
        "player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
        "hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
        "thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
        "mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
      }
    },
    {
      "videoId": "vi4blUQJFrYWbaG44NChkH27",
      "playerId": "pl45KFKdlddgk654dspkze",
      "title": "My Video Title",
      "description": "A brief description of the video.",
      "language": "fr",
      "languageOrigin": "api",
      "public": false,
      "panoramic": false,
      "mp4Support": true,
      "tags": [
        "General",
        "Videos"
      ],
      "metadata": [
        {
          "key": "Length",
          "value": "Short"
        }
      ],
      "publishedAt": "2019-12-16T08:25:51+00:00",
      "updatedAt": "2019-12-16T08:48:49+00:00",
      "discarded": false,
      "discardedAt": null,
      "deletesAt": null,
      "source": {
        "uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
      },
      "assets": {
        "iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
        "player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
        "hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
        "thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
        "mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
      }
    }
  ],
  "pagination": {
    "currentPage": 1,
    "pageSize": 25,
    "pagesTotal": 1,
    "itemsTotal": 11,
    "currentPageItems": 11,
    "links": [
      {
        "rel": "self",
        "uri": "https://ws.api.video/videos?currentPage=1"
      },
      {
        "rel": "first",
        "uri": "https://ws.api.video/videos?currentPage=1"
      },
      {
        "rel": "last",
        "uri": "https://ws.api.video/videos?currentPage=1"
      }
    ]
  }
}

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

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
post /videos

Create a video object

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

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

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

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

A list of key value pairs that you use to provide metadata for your video.

Example
"[{\"key\": \"Author\", \"value\": \"John Doe\"}]"
clip object (video-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

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

Pattern
^(?:\d{2,3}:[0-5]\d:[0-5]\d(?:\.\d{1,3}|\:\d{1,2})?|\d{1,7})$
Example
"00:01:15"
endTimecode string

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

Pattern
^(?:\d{2,3}:[0-5]\d:[0-5]\d(?:\.\d{1,3}|\:\d{1,2})?|\d{1,7})$
Example
"00:02:33"
watermark object (video-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%"
language string or null

Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the IETF language tag format.

language is a permanent attribute of the video. You can update it to another language using the PATCH /videos/{videoId} operation. This triggers the API to generate a new transcript using a different language.

Enum
  • ar
  • ca
  • cs
  • da
  • de
  • el
  • en
  • es
  • fa
  • fi
  • fr
  • he
  • hi
  • hr
  • hu
  • it
  • ja
  • ko
  • ml
  • nl
  • nn
  • no
  • pl
  • pt
  • ru
  • sk
  • sl
  • te
  • tr
  • uk
  • ur
  • vi
  • zh
Example
"fr"
transcript boolean

Use this parameter to enable transcription.

  • When true , the API generates a transcript for the video.

  • The default value is false .

  • If you define a video language using the language parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video.

  • When the API generates a transcript, it will be available as a caption for the video.

transcriptSummary boolean

Use this parameter to enable summarization. We recommend using this parameter together with transcript: true .

  • When true , the API generates a summary for the video, based on the transcription.

  • The default value is false .

  • If you define a video language using the language parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video.

transcriptSummaryAttributes array

Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. The possible values are abstract and takeaways .

Responses

Created

Response body Headers
videoId string required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"
createdAt string

When a video was created, presented in ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00: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

The date and time the API created the video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
updatedAt string

The date and time the video was updated. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discardedAt string or null

The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
deletesAt string or null

The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discarded boolean

Returns true for videos you discarded when you have the Video Restore feature enabled. Returns false for every other video.

language string

Returns the language of a video in IETF language tag format. You can set the language during video creation via the API, otherwise it is detected automatically.

Example
"en"
languageOrigin string or null

Returns the origin of the last update on the video's language attribute.

  • api means that the last update was requested from the API.

  • auto means that the last update was done automatically by the API.

Enum
  • api
  • auto
Example
"api"
tags array

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\"]"
metadata array

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.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"
source object (VideoSource)

Source information about the video.

uri string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"
type string
liveStream object (video-source-live-stream)

This appears if the video is from a Live Record.

liveStreamId string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"
links array
assets object (VideoAssets)

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

hls string

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.

Format
uri
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

Raw url of the player.

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

Poster of the video.

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

Available only if mp4Support is enabled. Raw mp4 url.

Format
uri
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
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Accepted

Response body Headers
videoId string required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"
createdAt string

When a video was created, presented in ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00: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

The date and time the API created the video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
updatedAt string

The date and time the video was updated. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discardedAt string or null

The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
deletesAt string or null

The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discarded boolean

Returns true for videos you discarded when you have the Video Restore feature enabled. Returns false for every other video.

language string

Returns the language of a video in IETF language tag format. You can set the language during video creation via the API, otherwise it is detected automatically.

Example
"en"
languageOrigin string or null

Returns the origin of the last update on the video's language attribute.

  • api means that the last update was requested from the API.

  • auto means that the last update was done automatically by the API.

Enum
  • api
  • auto
Example
"api"
tags array

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\"]"
metadata array

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.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"
source object (VideoSource)

Source information about the video.

uri string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"
type string
liveStream object (video-source-live-stream)

This appears if the video is from a Live Record.

liveStreamId string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"
links array
assets object (VideoAssets)

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

hls string

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.

Format
uri
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

Raw url of the player.

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

Poster of the video.

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

Available only if mp4Support is enabled. Raw mp4 url.

Format
uri
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
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Bad Request

Response body Headers
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

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

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

{
  "title": "Maths video",
  "description": "An amazing video explaining string theory.",
  "public": false,
  "panoramic": false,
  "mp4Support": true,
  "playerId": "pl45KFKdlddgk654dspkze",
  "language": "en",
  "transcript": true,
  "transcriptSummary": true,
  "transcriptSummaryAttributes": [
    "abstract",
    "takeaways"
  ],
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "watermark": {
    "id": "watermark_1BWr2L5MTQwxGkuxKjzh6i",
    "bottom": "10px",
    "right": "10px",
    "width": "50%",
    "opacity": "70%"
  }
}
// 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 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 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 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 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

Created

{
  "videoId": "vi4blUQJFrYWbaG44NChkH27",
  "title": "Maths video",
  "description": "An amazing video explaining the string theory",
  "language": "en",
  "languageOrigin": "api",
  "public": false,
  "panoramic": false,
  "mp4Support": true,
  "playerId": "pl4k0jvEUuaTdRAEjQ4Jfrgz",
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "publishedAt": "2024-07-14T23:36:07+00:00",
  "discarded": false,
  "discardedAt": null,
  "deletesAt": null,
  "source": {
    "uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
  },
  "assets": {
    "iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
    "player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
    "hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
    "thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
    "mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
  }
}

Accepted

{
  "videoId": "vi4k0jvEUuaTdRAEjQ4Jfrgz",
  "title": "Maths video",
  "description": "An amazing video explaining the string theory",
  "language": "en",
  "languageOrigin": "api",
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "createdAt": "2024-03-03T12:52:03+00:00",
  "publishedAt": "2024-07-14T23:36:07+00:00",
  "discarded": false,
  "discardedAt": null,
  "deletesAt": null,
  "actions": [
    "video_delete",
    "video_download",
    "video_update"
  ]
}

Bad Request

{
  "type": "https://docs.api.video/reference/attribute-required",
  "title": "This attribute is required.",
  "name": "title",
  "status": 400,
  "problems": [
    {
      "type": "https://docs.api.video/reference/attribute-required",
      "title": "This attribute is required.",
      "name": "title"
    },
    {
      "type": "https://docs.api.video/reference/invalid-attribute",
      "title": "This attribute must be a ISO-8601 date.",
      "name": "scheduledAt"
    },
    {
      "type": "https://docs.api.video/reference/invalid-attribute",
      "title": "This attribute must be an array.",
      "name": "tags"
    },
    {
      "type": "https://docs.api.video/reference/invalid-attribute",
      "title": "This attribute must be an array.",
      "name": "metadata"
    }
  ]
}
{
  "type": "https://docs.api.video/reference/invalid-attribute",
  "title": "An attribute is invalid.",
  "status": 400,
  "detail": "The \"language\" attribute must contain only letters and dashes (for example \"fr\", \"fr-BE\").",
  "name": "language"
}

This error occurs when the language tag you provided contains characters other than letters and dashes.

{
  "type": "https://docs.api.video/reference/invalid-attribute",
  "title": "An attribute is invalid.",
  "status": 400,
  "detail": "The \"language\" attribute is not valid.",
  "name": "language"
}

This error occurs when the language tag you provided does not match any supported language.

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
post /videos/{videoId}/source

Upload a video

Ingest a video from a source or file.

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"
Content-Range string

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

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

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

Responses

Created

Response body Headers
videoId string required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"
createdAt string

When a video was created, presented in ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00: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

The date and time the API created the video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
updatedAt string

The date and time the video was updated. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discardedAt string or null

The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
deletesAt string or null

The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discarded boolean

Returns true for videos you discarded when you have the Video Restore feature enabled. Returns false for every other video.

language string

Returns the language of a video in IETF language tag format. You can set the language during video creation via the API, otherwise it is detected automatically.

Example
"en"
languageOrigin string or null

Returns the origin of the last update on the video's language attribute.

  • api means that the last update was requested from the API.

  • auto means that the last update was done automatically by the API.

Enum
  • api
  • auto
Example
"api"
tags array

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\"]"
metadata array

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.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"
source object (VideoSource)

Source information about the video.

uri string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"
type string
liveStream object (video-source-live-stream)

This appears if the video is from a Live Record.

liveStreamId string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"
links array
assets object (VideoAssets)

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

hls string

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.

Format
uri
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

Raw url of the player.

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

Poster of the video.

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

Available only if mp4Support is enabled. Raw mp4 url.

Format
uri
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
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Bad Request

Response body Headers
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

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

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Not Found

Response body Headers
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.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

// 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 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 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 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 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

Created

{
  "videoId": "vi4blUQJFrYWbaG44NChkH27",
  "title": "Maths video",
  "description": "An amazing video explaining the string theory.",
  "public": false,
  "panoramic": false,
  "mp4Support": true,
  "playerId": "pl45KFKdlddgk654dspkze",
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "publishedAt": "2024-07-14T23:36:07+00:00",
  "discarded": false,
  "discardedAt": null,
  "deletesAt": null,
  "source": {
    "uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
  },
  "assets": {
    "iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
    "player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
    "hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
    "thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
    "mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
  }
}

Bad Request

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

Not Found

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

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
post /videos/{videoId}/thumbnail

Upload a thumbnail

Upload a thumbnail for a certain 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.

videoId string required

Unique identifier of the chosen video

Responses

Success

Response body Headers
videoId string required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"
createdAt string

When a video was created, presented in ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00: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

The date and time the API created the video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
updatedAt string

The date and time the video was updated. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discardedAt string or null

The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
deletesAt string or null

The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discarded boolean

Returns true for videos you discarded when you have the Video Restore feature enabled. Returns false for every other video.

language string

Returns the language of a video in IETF language tag format. You can set the language during video creation via the API, otherwise it is detected automatically.

Example
"en"
languageOrigin string or null

Returns the origin of the last update on the video's language attribute.

  • api means that the last update was requested from the API.

  • auto means that the last update was done automatically by the API.

Enum
  • api
  • auto
Example
"api"
tags array

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\"]"
metadata array

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.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"
source object (VideoSource)

Source information about the video.

uri string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"
type string
liveStream object (video-source-live-stream)

This appears if the video is from a Live Record.

liveStreamId string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"
links array
assets object (VideoAssets)

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

hls string

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.

Format
uri
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

Raw url of the player.

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

Poster of the video.

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

Available only if mp4Support is enabled. Raw mp4 url.

Format
uri
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
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Bad Request

Response body Headers
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

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

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Not Found

Response body Headers
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.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

// 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);
            }
        }
    }
}
// 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 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 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);
<?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 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 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

Success

{
  "videoId": "vi4blUQJFrYWbaG44NChkH27",
  "playerId": "pl45KFKdlddgk654dspkze",
  "title": "Maths video",
  "description": "An amazing video explaining the string theory",
  "public": false,
  "panoramic": false,
  "mp4Support": true,
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "createdAt": "2020-03-03T12:52:03+00:00",
  "publishedAt": "2020-07-14T23:36:07+00:00",
  "discarded": false,
  "discardedAt": null,
  "deletesAt": null,
  "source": {
    "uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
  },
  "assets": {
    "iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
    "player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
    "hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
    "thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
    "mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
  }
}

Bad Request

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

Not Found

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

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
patch /videos/{videoId}/thumbnail

Set a thumbnail

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

timecode string 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.

Pattern
\d{2}:\d{2}:\d{2}(\.\d{2})?
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.

Responses

Success

Response body Headers
videoId string required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"
createdAt string

When a video was created, presented in ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00: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

The date and time the API created the video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
updatedAt string

The date and time the video was updated. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discardedAt string or null

The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
deletesAt string or null

The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discarded boolean

Returns true for videos you discarded when you have the Video Restore feature enabled. Returns false for every other video.

language string

Returns the language of a video in IETF language tag format. You can set the language during video creation via the API, otherwise it is detected automatically.

Example
"en"
languageOrigin string or null

Returns the origin of the last update on the video's language attribute.

  • api means that the last update was requested from the API.

  • auto means that the last update was done automatically by the API.

Enum
  • api
  • auto
Example
"api"
tags array

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\"]"
metadata array

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.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"
source object (VideoSource)

Source information about the video.

uri string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"
type string
liveStream object (video-source-live-stream)

This appears if the video is from a Live Record.

liveStreamId string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"
links array
assets object (VideoAssets)

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

hls string

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.

Format
uri
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

Raw url of the player.

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

Poster of the video.

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

Available only if mp4Support is enabled. Raw mp4 url.

Format
uri
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
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Not Found

Response body Headers
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.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

{
  "timecode": "00:00:00.000"
}
// 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);
            }
        }
    }
}              
// 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 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 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);
<?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 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 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

Success

{
  "videoId": "vi4blUQJFrYWbaG44NChkH27",
  "playerId": "pl45KFKdlddgk654dspkze",
  "title": "Maths video",
  "description": "An amazing video explaining string theory",
  "public": false,
  "panoramic": false,
  "mp4Support": true,
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "publishedAt": "2024-07-14T23:36:07+00:00",
  "discarded": false,
  "discardedAt": null,
  "deletesAt": null,
  "source": {
    "uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
  },
  "assets": {
    "iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
    "player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
    "hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
    "thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
    "mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
  }
}

Not Found

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

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
get /videos/{videoId}

Retrieve a video object

Retrieve the video details by video id.

videoId string required

The unique identifier for the video you want details about.

Responses

Success

Response body Headers
videoId string required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"
createdAt string

When a video was created, presented in ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00: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

The date and time the API created the video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
updatedAt string

The date and time the video was updated. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discardedAt string or null

The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
deletesAt string or null

The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discarded boolean

Returns true for videos you discarded when you have the Video Restore feature enabled. Returns false for every other video.

language string

Returns the language of a video in IETF language tag format. You can set the language during video creation via the API, otherwise it is detected automatically.

Example
"en"
languageOrigin string or null

Returns the origin of the last update on the video's language attribute.

  • api means that the last update was requested from the API.

  • auto means that the last update was done automatically by the API.

Enum
  • api
  • auto
Example
"api"
tags array

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\"]"
metadata array

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.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"
source object (VideoSource)

Source information about the video.

uri string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"
type string
liveStream object (video-source-live-stream)

This appears if the video is from a Live Record.

liveStreamId string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"
links array
assets object (VideoAssets)

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

hls string

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.

Format
uri
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

Raw url of the player.

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

Poster of the video.

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

Available only if mp4Support is enabled. Raw mp4 url.

Format
uri
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
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Not Found

Response body Headers
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.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

// 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);
            }
        }
    }
} 
// 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 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 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);  
<?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 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 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

Success

{
  "videoId": "vi4blUQJFrYWbaG44NChkH27",
  "playerId": "pl45KFKdlddgk654dspkze",
  "title": "Maths video",
  "description": "An amazing video explaining string theory",
  "language": "en",
  "languageOrigin": "api",
  "public": false,
  "panoramic": false,
  "mp4Support": true,
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "publishedAt": "2019-12-16T08:25:51+00:00",
  "updatedAt": "2019-12-16T08:48:49+00:00",
  "discarded": false,
  "discardedAt": null,
  "deletesAt": null,
  "source": {
    "uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
  },
  "assets": {
    "iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
    "player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
    "hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
    "thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
    "mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
  }
}

Not Found

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

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
delete /videos/{videoId}

Delete a video object

Delete a video object by video ID.

By default, deleted videos cannot be recovered. If you have the Video Restore feature enabled, this operation will discard the video instead of permanently deleting it. Make sure you subscribe to the Video Restore feature if you want to be able to restore deleted videos!

The Video Restore feature retains videos for 90 days, after which the videos are permanently deleted.

videoId string required

The video ID for the video you want to delete.

Responses

No Content

Response body Headers

This response is empty

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Not Found

Response body Headers
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.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

// 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);
            }
        }
    }
} 
// 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 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 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); 
<?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 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 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

Not Found

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

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
patch /videos/{videoId}

Update a video object

Update the parameters associated with a video ID.

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

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\"]"
metadata 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.

language string or null

Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the IETF language tag format.

language is a permanent attribute of the video. You can update it to another language using the PATCH /videos/{videoId} operation. This triggers the API to generate a new transcript using a different language.

Enum
  • ar
  • ca
  • cs
  • da
  • de
  • el
  • en
  • es
  • fa
  • fi
  • fr
  • he
  • hi
  • hr
  • hu
  • it
  • ja
  • ko
  • ml
  • nl
  • nn
  • no
  • pl
  • pt
  • ru
  • sk
  • sl
  • te
  • tr
  • uk
  • ur
  • vi
  • zh
Example
"fr"
transcript boolean

Use this parameter to enable transcription.

  • When true , the API generates a transcript for the video.

  • The default value is false .

  • If you define a video language using the language parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video.

  • When the API generates a transcript, it will be available as a caption for the video.

transcriptSummary boolean

Use this parameter to enable summarization.

  • When true , the API generates a summary for the video, based on the transcription.

  • The default value is false .

  • If you define a video language using the language parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video.

transcriptSummaryAttributes array

Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. The possible values are abstract and takeaways .

videoId string required

The video ID for the video you want to update.

Responses

Success

Response body Headers
videoId string required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"
createdAt string

When a video was created, presented in ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00: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

The date and time the API created the video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
updatedAt string

The date and time the video was updated. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discardedAt string or null

The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
deletesAt string or null

The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discarded boolean

Returns true for videos you discarded when you have the Video Restore feature enabled. Returns false for every other video.

language string

Returns the language of a video in IETF language tag format. You can set the language during video creation via the API, otherwise it is detected automatically.

Example
"en"
languageOrigin string or null

Returns the origin of the last update on the video's language attribute.

  • api means that the last update was requested from the API.

  • auto means that the last update was done automatically by the API.

Enum
  • api
  • auto
Example
"api"
tags array

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\"]"
metadata array

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.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"
source object (VideoSource)

Source information about the video.

uri string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"
type string
liveStream object (video-source-live-stream)

This appears if the video is from a Live Record.

liveStreamId string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"
links array
assets object (VideoAssets)

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

hls string

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.

Format
uri
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

Raw url of the player.

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

Poster of the video.

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

Available only if mp4Support is enabled. Raw mp4 url.

Format
uri
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
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Bad Request

Response body Headers
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

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

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Not Found

Response body Headers
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.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Conflict

Response body Headers
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.

detail string

A solution for the error.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

{
  "playerId": "pl45KFKdlddgk654dspkze",
  "title": "String theory",
  "description": "An amazing video explaining the string theory",
  "public": false,
  "language": "en",
  "transcript": true,
  "transcriptSummary": true,
  "transcriptSummaryAttributes": [
    "abstract",
    "takeaways"
  ],
  "panoramic": false,
  "mp4Support": true,
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ]
}
// 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);
            }
        }
    }
}
// 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 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 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);
<?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 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 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

Success

{
  "videoId": "vi4blUQJFrYWbaG44NChkH27",
  "playerId": "pl45KFKdlddgk654dspkze",
  "title": "Maths video",
  "description": "An amazing video explaining the string theory",
  "language": "en",
  "languageOrigin": "api",
  "public": false,
  "panoramic": false,
  "mp4Support": true,
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "publishedAt": "2019-12-16T08:25:51+00:00",
  "updatedAt": "2019-12-16T08:48:49+00:00",
  "discarded": false,
  "discardedAt": null,
  "deletesAt": null,
  "source": {
    "uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
  },
  "assets": {
    "iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
    "player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
    "hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
    "thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
    "mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
  }
}

Bad Request

{
  "type": "https://docs.api.video/reference/invalid-attribute",
  "title": "This attribute must be a ISO-8601 date.",
  "name": "scheduledAt",
  "status": 400,
  "problems": [
    {
      "type": "https://docs.api.video/reference/invalid-attribute",
      "title": "This attribute must be a ISO-8601 date.",
      "name": "scheduledAt"
    },
    {
      "type": "https://docs.api.video/reference/invalid-attribute",
      "title": "This attribute must be an array.",
      "name": "tags"
    },
    {
      "type": "https://docs.api.video/reference/invalid-attribute",
      "title": "This attribute must be an array.",
      "name": "metadata"
    }
  ]
}
{
  "type": "https://docs.api.video/reference/invalid-attribute",
  "title": "An attribute is invalid.",
  "status": 400,
  "detail": "The \"language\" attribute must contain only letters and dashes (for example \"fr\", \"fr-BE\").",
  "name": "language"
}

This error occurs when the language tag you provided contains characters other than letters and dashes.

{
  "type": "https://docs.api.video/reference/invalid-attribute",
  "title": "An attribute is invalid.",
  "status": 400,
  "detail": "The \"language\" attribute is not valid.",
  "name": "language"
}

This error occurs when the language tag you provided does not match any supported language.

Not Found

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

Conflict

{
  "type": "https://docs.api.video/reference/summary-already-exists",
  "title": "A summary already exists or is being created on this video.",
  "status": 409,
  "detail": "You can delete the existing summary and generate a new one.",
  "name": "transcriptSummary"
}

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
get /discarded/videos

List all discarded video objects

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

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.

tags[] array

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.

metadata object

Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter.

description string

Retrieve video objects by description .

liveStreamId string

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

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
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
currentPage int

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

Default
1
pageSize int

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

Default
25

Responses

Success

Response body Headers
data array required
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 required
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Bad Request

Response body Headers
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

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

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Response examples

Success

{
  "data": [
    {
      "videoId": "vi4blUQJFrYWbaG44NChkH27",
      "playerId": "pl45KFKdlddgk654dspkze",
      "title": "Maths video",
      "description": "An amazing video explaining the string theory",
      "public": false,
      "panoramic": false,
      "mp4Support": true,
      "tags": [
        "maths",
        "string theory",
        "video"
      ],
      "metadata": [
        {
          "key": "Author",
          "value": "John Doe"
        },
        {
          "key": "Format",
          "value": "Tutorial"
        }
      ],
      "publishedAt": "2019-12-16T08:25:51+00:00",
      "updatedAt": "2019-12-16T08:48:49+00:00",
      "discarded": true,
      "discardedAt": "2024-10-16T08:48:49+00:00",
      "deletesAt": "2024-11-16T08:48:49+00:00",
      "source": {
        "uri": "/videos/c188ed58-3403-46a2-b91b-44603d10b2c9/source"
      },
      "assets": null
    },
    {
      "videoId": "vi4blUQJFrYWbaG44NChkH27",
      "title": "Video Title",
      "description": "A description for your video.",
      "public": false,
      "panoramic": false,
      "mp4Support": true,
      "tags": [
        "books",
        "short stories"
      ],
      "metadata": [
        {
          "key": "Author",
          "value": "John Doe"
        },
        {
          "key": "Science Fiction",
          "value": "Cyberpunk"
        },
        {
          "key": "Technology",
          "value": "Computers"
        }
      ],
      "publishedAt": "2019-12-16T08:25:51+00:00",
      "updatedAt": "2019-12-16T08:48:49+00:00",
      "discarded": true,
      "discardedAt": "2024-10-16T08:48:49+00:00",
      "deletesAt": "2024-11-16T08:48:49+00:00",
      "source": {
        "uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
      },
      "assets": null
    },
    {
      "videoId": "vi4blUQJFrYWbaG44NChkH27",
      "playerId": "pl45KFKdlddgk654dspkze",
      "title": "My Video Title",
      "description": "A brief description of the video.",
      "public": false,
      "panoramic": false,
      "mp4Support": true,
      "tags": [
        "General",
        "Videos"
      ],
      "metadata": [
        {
          "key": "Length",
          "value": "Short"
        }
      ],
      "publishedAt": "2019-12-16T08:25:51+00:00",
      "updatedAt": "2019-12-16T08:48:49+00:00",
      "discarded": true,
      "discardedAt": "2024-10-16T08:48:49+00:00",
      "deletesAt": "2024-11-16T08:48:49+00:00",
      "source": {
        "uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
      },
      "assets": null
    }
  ],
  "pagination": {
    "currentPage": 1,
    "pageSize": 25,
    "pagesTotal": 1,
    "itemsTotal": 11,
    "currentPageItems": 11,
    "links": [
      {
        "rel": "self",
        "uri": "https://ws.api.video/videos?currentPage=1"
      },
      {
        "rel": "first",
        "uri": "https://ws.api.video/videos?currentPage=1"
      },
      {
        "rel": "last",
        "uri": "https://ws.api.video/videos?currentPage=1"
      }
    ]
  }
}

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

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
get /discarded/videos/{videoId}

Retrieve a discarded video object

Retrieve the video details of a discarded video object by video id.

videoId string required

The unique identifier for the video you want details about.

Responses

Success

Response body Headers
videoId string required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"
createdAt string

When a video was created, presented in ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00: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

The date and time the API created the video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
updatedAt string

The date and time the video was updated. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discardedAt string or null

The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
deletesAt string or null

The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discarded boolean

Returns true for videos you discarded when you have the Video Restore feature enabled. Returns false for every other video.

language string

Returns the language of a video in IETF language tag format. You can set the language during video creation via the API, otherwise it is detected automatically.

Example
"en"
languageOrigin string or null

Returns the origin of the last update on the video's language attribute.

  • api means that the last update was requested from the API.

  • auto means that the last update was done automatically by the API.

Enum
  • api
  • auto
Example
"api"
tags array

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\"]"
metadata array

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.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"
source object (VideoSource)

Source information about the video.

uri string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"
type string
liveStream object (video-source-live-stream)

This appears if the video is from a Live Record.

liveStreamId string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"
links array
assets object (VideoAssets)

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

hls string

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.

Format
uri
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

Raw url of the player.

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

Poster of the video.

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

Available only if mp4Support is enabled. Raw mp4 url.

Format
uri
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
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Not Found

Response body Headers
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.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Response examples

Success

{
  "videoId": "vi4blUQJFrYWbaG44NChkH27",
  "playerId": "pl45KFKdlddgk654dspkze",
  "title": "Maths video",
  "description": "An amazing video explaining string theory",
  "public": false,
  "panoramic": false,
  "mp4Support": true,
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "publishedAt": "2019-12-16T08:25:51+00:00",
  "updatedAt": "2019-12-16T08:48:49+00:00",
  "discarded": true,
  "discardedAt": "2024-10-16T08:48:49+00:00",
  "deletesAt": "2024-11-16T08:48:49+00:00",
  "source": {
    "uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
  },
  "assets": null
}

Not Found

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

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
patch /discarded/videos/{videoId}

Update a discarded video object

Restore a discarded video

discarded boolean

Use this parameter to restore a discarded video when you have the Video Restore feature enabled. This parameter only accepts false as a value!

videoId string required

The video ID for the video you want to restore.

Responses

Success

Response body Headers
videoId string required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"
createdAt string

When a video was created, presented in ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00: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

The date and time the API created the video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
updatedAt string

The date and time the video was updated. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discardedAt string or null

The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
deletesAt string or null

The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discarded boolean

Returns true for videos you discarded when you have the Video Restore feature enabled. Returns false for every other video.

language string

Returns the language of a video in IETF language tag format. You can set the language during video creation via the API, otherwise it is detected automatically.

Example
"en"
languageOrigin string or null

Returns the origin of the last update on the video's language attribute.

  • api means that the last update was requested from the API.

  • auto means that the last update was done automatically by the API.

Enum
  • api
  • auto
Example
"api"
tags array

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\"]"
metadata array

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.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"
source object (VideoSource)

Source information about the video.

uri string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"
type string
liveStream object (video-source-live-stream)

This appears if the video is from a Live Record.

liveStreamId string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"
links array
assets object (VideoAssets)

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

hls string

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.

Format
uri
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

Raw url of the player.

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

Poster of the video.

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

Available only if mp4Support is enabled. Raw mp4 url.

Format
uri
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
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Bad Request

Response body Headers
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

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

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Not Found

Response body Headers
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.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

{
  "discarded": false
}
// 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);
            }
        }
    }
}
// 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 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 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);
<?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 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 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

Success

{
  "videoId": "vi4blUQJFrYWbaG44NChkH27",
  "playerId": "pl45KFKdlddgk654dspkze",
  "title": "Maths video",
  "description": "An amazing video explaining the string theory",
  "public": false,
  "panoramic": false,
  "mp4Support": true,
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "publishedAt": "2019-12-16T08:25:51+00:00",
  "updatedAt": "2019-12-16T08:48:49+00:00",
  "discarded": true,
  "discardedAt": "2024-10-16T08:48:49+00:00",
  "deletesAt": "2024-11-16T08:48:49+00:00",
  "source": {
    "uri": "/videos/vi4blUQJFrYWbaG44NChkH27/source"
  },
  "assets": null
}

Bad Request

{
  "type": "https://docs.api.video/reference/invalid-attribute",
  "title": "An attribute is invalid.",
  "detail": "Value must be false.",
  "name": "discarded",
  "status": 400
}

Not Found

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

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
get /videos/{videoId}/status

Retrieve video status and details

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.

videoId string required

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

Responses

Success

Response body Headers
ingest object (VideoStatusIngest)

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

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

receivedParts object
parts array

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]"
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 (VideoStatusEncoding)
playable boolean

Whether the video is playable or not.

Example
true
qualities array

Available qualities the video can be viewed in.

metadata object (VideoStatusEncodingMetadata)
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
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Not Found

Response body Headers
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.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

// 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);
            }
        }
    }
}
// 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 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 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); 
<?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 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 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

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/reference/resource-not-found",
  "title": "The requested resource was not found.",
  "name": "videoId",
  "status": 404
}

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
post /upload

Upload with an delegated upload token

Uploading a video with the delegated upload token.

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.

token string required

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

Content-Range string

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.

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

Responses

Created

Response body Headers
videoId string required

The unique identifier of the video object.

Example
"vi4k0jvEUuaTdRAEjQ4Prklg"
createdAt string

When a video was created, presented in ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00: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

The date and time the API created the video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
updatedAt string

The date and time the video was updated. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discardedAt string or null

The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
deletesAt string or null

The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format.

Format
date-time
Example
"2024-05-28T11:15:07+00:00"
discarded boolean

Returns true for videos you discarded when you have the Video Restore feature enabled. Returns false for every other video.

language string

Returns the language of a video in IETF language tag format. You can set the language during video creation via the API, otherwise it is detected automatically.

Example
"en"
languageOrigin string or null

Returns the origin of the last update on the video's language attribute.

  • api means that the last update was requested from the API.

  • auto means that the last update was done automatically by the API.

Enum
  • api
  • auto
Example
"api"
tags array

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\"]"
metadata array

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.

Example
"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]"
source object (VideoSource)

Source information about the video.

uri string

The URL where the video is stored.

Example
"/videos/vi4k0jvEUuaTdRAEjQ4Prklg/source"
type string
liveStream object (video-source-live-stream)

This appears if the video is from a Live Record.

liveStreamId string

The unique identifier for the live stream.

Example
"li400mYKSgQ6xs7taUeSaEKr"
links array
assets object (VideoAssets)

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

hls string

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.

Format
uri
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

Raw url of the player.

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

Poster of the video.

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

Available only if mp4Support is enabled. Raw mp4 url.

Format
uri
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
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Bad Request

Response body Headers
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

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

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

// 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
// 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 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 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);
<?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 with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#uploadWithUploadToken
// 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

Created

{
  "videoId": "vi4k0jvEUuaTdRAEjQ4Jfrgz",
  "playerId": "pl45KFKdlddgk654dspkze",
  "title": "Maths video",
  "description": "An amazing video explaining the string theory",
  "language": "en",
  "languageOrigin": "api",
  "public": false,
  "panoramic": false,
  "tags": [
    "maths",
    "string theory",
    "video"
  ],
  "metadata": [
    {
      "key": "Author",
      "value": "John Doe"
    },
    {
      "key": "Format",
      "value": "Tutorial"
    }
  ],
  "publishedAt": "2024-07-14T23:36:07+00:00",
  "discarded": false,
  "discardedAt": null,
  "deletesAt": null,
  "source": {
    "uri": "/videos/vi4k0jvEUuaTdRAEjQ4Jfrgz/source"
  },
  "assets": {
    "iframe": "<iframe src=\"https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
    "player": "https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27",
    "hls": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8",
    "thumbnail": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg",
    "mp4": "https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4"
  }
}

Bad Request

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

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}