Create a video
POST
/videos
Videos
add an URL to upload on creation
source
parameter:
202 Accepted
and ingest the video asynchronously.Track users with Dynamic Metadata
"metadata":[{"dynamicKey": "__dynamicKey__"}]
<iframe type="text/html" src="https://embed.api.video/vod/vi6QvU9dhYCzW3BpPvPsZUa8?metadata[classUserName]=Doug" width="960" height="320" frameborder="0" scrollling="no"></iframe>
We have tutorials on:
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://ws.api.video/videos' \
--header 'Content-Type: application/json' \
--data-raw '{
"description": "An amazing video explaining string theory.",
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"mp4Support": true,
"panoramic": false,
"playerId": "pl45KFKdlddgk654dspkze",
"public": false,
"tags": [
"maths",
"string theory",
"video"
],
"title": "Maths video"
}'
Response Response Example
201 - response
{
"assets": {
"hls": "https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/hls/manifest.m3u8",
"iframe": "<iframe src=\"//embed.api.video/vi4k0jvEUuaTdRAEjQ4Jfrgz?token=831a9bd9-9f50-464c-a369-8e9d914371ae\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
"mp4": "https://cdn.api.video/vod/vi4k0jvEUuaTdRAEjQ4Jfrgz/token/8fd70443-d9f0-45d2-b01c-12c8cfc707c9/mp4/720/source.mp4",
"player": "https://embed.api.video/vi4k0jvEUuaTdRAEjQ4Jfrgz?token=831a9bd9-9f50-464c-a369-8e9d914371ae",
"thumbnail": "https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/thumbnail.jpg"
},
"description": "An amazing video explaining the string theory",
"metadata": [
{
"key": "Author",
"value": "John Doe"
},
{
"key": "Format",
"value": "Tutorial"
}
],
"mp4Support": true,
"panoramic": false,
"playerId": "pl4k0jvEUuaTdRAEjQ4Jfrgz",
"public": false,
"publishedAt": "4665-07-14T23:36:18.598Z",
"source": {
"uri": "/videos/vi4k0jvEUuaTdRAEjQ4Jfrgz/source"
},
"tags": [
"maths",
"string theory",
"video"
],
"title": "Maths video",
"videoId": "vi4k0jvEUuaTdRAEjQ4Jfrgz"
}
Request
Body Params application/json
Responses
Modified at 2023-08-15 05:52:15