# api.video

> Create and manage videos, live streams, players and upload tokens.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/api-video

## Actions

### Create live stream

Create live stream.

**Inputs**

- Name (`name`, text, required): Add a name for your live stream here.
- Public (`public`, true/false): 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. Learn more about the Private Video feature [here](https://docs.api.video/docs/private-videos).
- Player (`player_id`, text): The unique identifier for the player.
- Restreams (`restreams`, list): Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "assets": {
      "hls": "example",
      "iframe": "example",
      "player": "example",
      "thumbnail": "example"
    },
    "broadcasting": true,
    "createdAt": "example",
    "liveStreamId": "example",
    "name": "example",
    "playerId": "example",
    "public": true,
    "restreams": [
      {
        "name": "example",
        "serverUrl": "example",
        "streamKey": "example"
      }
    ],
    "streamKey": "example",
    "updatedAt": "example"
  }
}
```

### Create player

Create player.

**Inputs**

- Name (`name`, text): Add a name for your player theme here.
- Text (`text`, text): RGBA color for timer text. Default: rgba(255, 255, 255, 1).
- Link (`link`, text): RGBA color for all controls. Default: rgba(255, 255, 255, 1).
- Link hover (`link_hover`, text): RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1).
- Link active (`link_active`, text): RGBA color for the play button when hovered.
- Track played (`track_played`, text): RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95).
- Track unplayed (`track_unplayed`, text): RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35).
- Track background (`track_background`, text): RGBA color playback bar: background. Default: rgba(255, 255, 255, .2).
- Background top (`background_top`, text): RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7).
- Background bottom (`background_bottom`, text): RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7).
- Background text (`background_text`, text): RGBA color for title text. Default: rgba(255, 255, 255, 1).
- Enable API (`enable_api`, true/false): enable/disable player SDK access. Default: true.
- Enable controls (`enable_controls`, true/false): enable/disable player controls. Default: true.
- Force autoplay (`force_autoplay`, true/false): enable/disable player autoplay. Default: false.
- Hide title (`hide_title`, true/false): enable/disable title. Default: false.
- Force loop (`force_loop`, true/false): enable/disable looping. Default: false.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "assets": {
      "link": "example",
      "logo": "example"
    },
    "backgroundBottom": "example",
    "backgroundText": "example",
    "backgroundTop": "example",
    "createdAt": "example",
    "enableApi": true,
    "enableControls": true,
    "forceAutoplay": true,
    "forceLoop": true,
    "hideTitle": true,
    "link": "example",
    "linkActive": "example",
    "linkHover": "example",
    "name": "example",
    "playerId": "example",
    "text": "example",
    "trackBackground": "example",
    "trackPlayed": "example",
    "trackUnplayed": "example",
    "updatedAt": "example"
  }
}
```

### Create upload token

Create upload token.

**Inputs**

- Ttl (`ttl`, number): Time in seconds that the token will be active. A value of 0 means that the token has no exipration date. The default is to have no expiration. From 0 to 2147483647.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "createdAt": "example",
    "expiresAt": "example",
    "token": "example",
    "ttl": 1
  }
}
```

### Create video

Create video.

**Inputs**

- Title (`title`, text, required): The title of your new video.
- Description (`description`, text): A brief description of your video.
- Source (`source`, text): 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 wa.
- Public (`public`, true/false): Default: True. If set to false the video will become private. More information on private videos can be found [here](https://docs.api.video/docs/private-videos).
- Panoramic (`panoramic`, true/false): Indicates if your video is a 360/immersive video.
- Mp4 support (`mp4_support`, true/false): Enables mp4 version in addition to streamed version.
- Player (`player_id`, text): The unique identification number for your video player.
- Tags (`tags`, list): A list of tags you want to use to describe your video.
- Record metadata (`record_metadata`, list): A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. Read more on [dynamic metadata](https://api.video/blog/endpoints/dynamic-metadata).
- Clip (`clip`, object): Clip.
- Watermark (`watermark`, object): Watermark.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "assets": {
      "hls": "example",
      "iframe": "example",
      "mp4": "example",
      "player": "example",
      "thumbnail": "example"
    },
    "createdAt": "example",
    "description": "example",
    "metadata": [
      {
        "key": "example",
        "value": "example"
      }
    ],
    "mp4Support": true,
    "panoramic": true,
    "playerId": "example",
    "public": true,
    "publishedAt": "example",
    "source": {
      "liveStream": {
        "links": [
          {}
        ],
        "liveStreamId": "example"
      },
      "type": "example",
      "uri": "example"
    },
    "tags": [
      "example"
    ],
    "title": "example",
    "updatedAt": "example",
    "videoId": "example"
  }
}
```

### Delete live stream

Delete live stream.

**Inputs**

- Live stream (`live_stream_id`, text, required): The unique ID for the live stream that you want to remove.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {}
}
```

### Delete player

Delete player.

**Inputs**

- Player (`player_id`, text, required): The unique identifier for the player you want to delete.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {}
}
```

### Delete upload token

Delete upload token.

**Inputs**

- Upload token (`upload_token`, text, required): The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {}
}
```

### Delete video

Delete video.

**Inputs**

- Video (`video_id`, text, required): The video ID for the video you want to delete.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {}
}
```

### Get live stream

Get live stream.

**Inputs**

- Live stream (`live_stream_id`, text, required): The unique ID for the live stream you want to watch.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "assets": {
      "hls": "example",
      "iframe": "example",
      "player": "example",
      "thumbnail": "example"
    },
    "broadcasting": true,
    "createdAt": "example",
    "liveStreamId": "example",
    "name": "example",
    "playerId": "example",
    "public": true,
    "restreams": [
      {
        "name": "example",
        "serverUrl": "example",
        "streamKey": "example"
      }
    ],
    "streamKey": "example",
    "updatedAt": "example"
  }
}
```

### Get player

Get player.

**Inputs**

- Player (`player_id`, text, required): The unique identifier for the player you want to retrieve.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "assets": {
      "link": "example",
      "logo": "example"
    },
    "backgroundBottom": "example",
    "backgroundText": "example",
    "backgroundTop": "example",
    "createdAt": "example",
    "enableApi": true,
    "enableControls": true,
    "forceAutoplay": true,
    "forceLoop": true,
    "hideTitle": true,
    "link": "example",
    "linkActive": "example",
    "linkHover": "example",
    "name": "example",
    "playerId": "example",
    "text": "example",
    "trackBackground": "example",
    "trackPlayed": "example",
    "trackUnplayed": "example",
    "updatedAt": "example"
  }
}
```

### Get video

Get video.

**Inputs**

- Video (`video_id`, text, required): The unique identifier for the video you want details about.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "assets": {
      "hls": "example",
      "iframe": "example",
      "mp4": "example",
      "player": "example",
      "thumbnail": "example"
    },
    "createdAt": "example",
    "description": "example",
    "metadata": [
      {
        "key": "example",
        "value": "example"
      }
    ],
    "mp4Support": true,
    "panoramic": true,
    "playerId": "example",
    "public": true,
    "publishedAt": "example",
    "source": {
      "liveStream": {
        "links": [
          {}
        ],
        "liveStreamId": "example"
      },
      "type": "example",
      "uri": "example"
    },
    "tags": [
      "example"
    ],
    "title": "example",
    "updatedAt": "example",
    "videoId": "example"
  }
}
```

### Get video status

Get video status.

**Inputs**

- Video (`video_id`, text, required): The unique identifier for the video you want the status for.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "encoding": {
      "metadata": {
        "aspectRatio": "example",
        "audioCodec": "example",
        "bitrate": 1,
        "duration": 1,
        "framerate": 1,
        "height": 1,
        "samplerate": 1,
        "videoCodec": "example",
        "width": 1
      },
      "playable": true,
      "qualities": [
        {
          "quality": "example",
          "status": "example",
          "type": "example"
        }
      ]
    },
    "ingest": {
      "filesize": 1,
      "receivedBytes": [
        {
          "from": 1,
          "to": 1,
          "total": 1
        }
      ],
      "receivedParts": {
        "parts": [
          1
        ],
        "total": 1
      },
      "status": "example"
    }
  }
}
```

### List live streams

List live streams.

**Inputs**

- Stream key (`stream_key`, text): The unique stream key that allows you to stream videos.
- Name (`name`, text): You can filter live streams by their name or a part of their name.
- Sort by (`sort_by`, text): Allowed: createdAt, publishedAt, name. createdAt - the time a livestream was created using the specified streamKey. publishedAt - the time a livestream was published using the specified streamKey. name - the name of the livestream. If you choose one of the time based options, the time is presented in ISO-8601 format.
- Sort order (`sort_order`, text): Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. For title, it is 0-9 and A-Z ascending and Z-A, 9-0 descending. One of: `asc`, `desc`.
- Current page (`current_page`, number): Choose the number of search results to return per page. Minimum value: 1.
- Page size (`page_size`, number): Results per page. Allowed values 1-100, default is 25.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "assets": {
          "hls": "example",
          "iframe": "example",
          "player": "example",
          "thumbnail": "example"
        },
        "broadcasting": true,
        "createdAt": "example",
        "liveStreamId": "example",
        "name": "example",
        "playerId": "example",
        "public": true,
        "restreams": [
          {}
        ],
        "streamKey": "example",
        "updatedAt": "example"
      }
    ],
    "pagination": {
      "currentPage": 1,
      "currentPageItems": 1,
      "itemsTotal": 1,
      "links": [
        {
          "rel": "example",
          "uri": "example"
        }
      ],
      "pageSize": 1,
      "pagesTotal": 1
    }
  }
}
```

### List players

List players.

**Inputs**

- Sort by (`sort_by`, text): createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format. One of: `name`, `createdAt`, `updatedAt`.
- Sort order (`sort_order`, text): Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. One of: `asc`, `desc`.
- Current page (`current_page`, number): Choose the number of search results to return per page. Minimum value: 1.
- Page size (`page_size`, number): Results per page. Allowed values 1-100, default is 25.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "assets": {
          "link": "example",
          "logo": "example"
        },
        "backgroundBottom": "example",
        "backgroundText": "example",
        "backgroundTop": "example",
        "createdAt": "example",
        "enableApi": true,
        "enableControls": true,
        "forceAutoplay": true,
        "forceLoop": true,
        "hideTitle": true,
        "link": "example",
        "linkActive": "example",
        "linkHover": "example",
        "name": "example",
        "playerId": "example",
        "text": "example",
        "trackBackground": "example",
        "trackPlayed": "example",
        "trackUnplayed": "example",
        "updatedAt": "example"
      }
    ],
    "pagination": {
      "currentPage": 1,
      "currentPageItems": 1,
      "itemsTotal": 1,
      "links": [
        {
          "rel": "example",
          "uri": "example"
        }
      ],
      "pageSize": 1,
      "pagesTotal": 1
    }
  }
}
```

### List upload tokens

List upload tokens.

**Inputs**

- Sort by (`sort_by`, text): Allowed: createdAt, ttl. You can use these to sort by when a token was created, or how much longer the token will be active (ttl - time to live). Date and time is presented in ISO-8601 format. One of: `createdAt`, `ttl`.
- Sort order (`sort_order`, text): Allowed: asc, desc. Ascending is 0-9 or A-Z. Descending is 9-0 or Z-A. One of: `asc`, `desc`.
- Current page (`current_page`, number): Choose the number of search results to return per page. Minimum value: 1.
- Page size (`page_size`, number): Results per page. Allowed values 1-100, default is 25.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "createdAt": "example",
        "expiresAt": "example",
        "token": "example",
        "ttl": 1
      }
    ],
    "pagination": {
      "currentPage": 1,
      "currentPageItems": 1,
      "itemsTotal": 1,
      "links": [
        {
          "rel": "example",
          "uri": "example"
        }
      ],
      "pageSize": 1,
      "pagesTotal": 1
    }
  }
}
```

### List videos

List videos.

**Inputs**

- Title (`title`, text): 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 (`tags`, list): 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.
- Record metadata (`record_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. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define a key that allows any value pair.
- Description (`description`, text): Retrieve video objects by description.
- Live stream (`live_stream_id`, text): Retrieve video objects that were recorded from a live stream by liveStreamId.
- Sort by (`sort_by`, text): Use this parameter to sort videos by the their created time, published time, updated time, or by title. One of: `title`, `createdAt`, `publishedAt`, `updatedAt`.
- Sort order (`sort_order`, text): Use this parameter to sort results. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A. One of: `asc`, `desc`.
- Current page (`current_page`, number): Choose the number of search results to return per page. Minimum value: 1.
- Page size (`page_size`, number): Results per page. Allowed values 1-100, default is 25.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "assets": {
          "hls": "example",
          "iframe": "example",
          "mp4": "example",
          "player": "example",
          "thumbnail": "example"
        },
        "createdAt": "example",
        "description": "example",
        "metadata": [
          {}
        ],
        "mp4Support": true,
        "panoramic": true,
        "playerId": "example",
        "public": true,
        "publishedAt": "example",
        "source": {
          "liveStream": {},
          "type": "example",
          "uri": "example"
        },
        "tags": [
          "example"
        ],
        "title": "example",
        "updatedAt": "example",
        "videoId": "example"
      }
    ],
    "pagination": {
      "currentPage": 1,
      "currentPageItems": 1,
      "itemsTotal": 1,
      "links": [
        {
          "rel": "example",
          "uri": "example"
        }
      ],
      "pageSize": 1,
      "pagesTotal": 1
    }
  }
}
```

### List webhooks

List webhooks.

**Inputs**

- Events (`events`, text): The webhook event that you wish to filter on.
- Current page (`current_page`, number): Choose the number of search results to return per page. Minimum value: 1.
- Page size (`page_size`, number): Results per page. Allowed values 1-100, default is 25.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "createdAt": "example",
        "events": [
          "example"
        ],
        "url": "example",
        "webhookId": "example"
      }
    ],
    "pagination": {
      "currentPage": 1,
      "currentPageItems": 1,
      "itemsTotal": 1,
      "links": [
        {
          "rel": "example",
          "uri": "example"
        }
      ],
      "pageSize": 1,
      "pagesTotal": 1
    }
  }
}
```

### Update live stream

Update live stream.

**Inputs**

- Live stream (`live_stream_id`, text, required): The unique ID for the live stream that you want to update information for such as player details.
- Name (`name`, text): The name you want to use for your live stream.
- Public (`public`, true/false): 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. Learn more about the Private Video feature [here](https://docs.api.video/docs/private-videos).
- Player (`player_id`, text): The unique ID for the player associated with a live stream that you want to update.
- Restreams (`restreams`, list): Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is remo.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "assets": {
      "hls": "example",
      "iframe": "example",
      "player": "example",
      "thumbnail": "example"
    },
    "broadcasting": true,
    "createdAt": "example",
    "liveStreamId": "example",
    "name": "example",
    "playerId": "example",
    "public": true,
    "restreams": [
      {
        "name": "example",
        "serverUrl": "example",
        "streamKey": "example"
      }
    ],
    "streamKey": "example",
    "updatedAt": "example"
  }
}
```

### Update player

Update player.

**Inputs**

- Player (`player_id`, text, required): The unique identifier for the player.
- Name (`name`, text): Add a name for your player theme here.
- Text (`text`, text): RGBA color for timer text. Default: rgba(255, 255, 255, 1).
- Link (`link`, text): RGBA color for all controls. Default: rgba(255, 255, 255, 1).
- Link hover (`link_hover`, text): RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1).
- Link active (`link_active`, text): RGBA color for the play button when hovered.
- Track played (`track_played`, text): RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95).
- Track unplayed (`track_unplayed`, text): RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35).
- Track background (`track_background`, text): RGBA color playback bar: background. Default: rgba(255, 255, 255, .2).
- Background top (`background_top`, text): RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7).
- Background bottom (`background_bottom`, text): RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7).
- Background text (`background_text`, text): RGBA color for title text. Default: rgba(255, 255, 255, 1).
- Enable API (`enable_api`, true/false): enable/disable player SDK access. Default: true.
- Enable controls (`enable_controls`, true/false): enable/disable player controls. Default: true.
- Force autoplay (`force_autoplay`, true/false): enable/disable player autoplay. Default: false.
- Hide title (`hide_title`, true/false): enable/disable title. Default: false.
- Force loop (`force_loop`, true/false): enable/disable looping. Default: false.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "assets": {
      "link": "example",
      "logo": "example"
    },
    "backgroundBottom": "example",
    "backgroundText": "example",
    "backgroundTop": "example",
    "createdAt": "example",
    "enableApi": true,
    "enableControls": true,
    "forceAutoplay": true,
    "forceLoop": true,
    "hideTitle": true,
    "link": "example",
    "linkActive": "example",
    "linkHover": "example",
    "name": "example",
    "playerId": "example",
    "text": "example",
    "trackBackground": "example",
    "trackPlayed": "example",
    "trackUnplayed": "example",
    "updatedAt": "example"
  }
}
```

### Update video

Update video.

**Inputs**

- Video (`video_id`, text, required): The video ID for the video you want to update.
- Player (`player_id`, text): The unique ID for the player you want to associate with your video.
- Title (`title`, text): The title you want to use for your video.
- Description (`description`, text): A brief description of the video.
- Public (`public`, true/false): Whether the video is publicly available or not. False means it is set to private. Default is true. Tutorials on [private videos](https://api.video/blog/endpoints/private-videos).
- Panoramic (`panoramic`, true/false): Whether the video is a 360 degree or immersive video.
- Mp4 support (`mp4_support`, true/false): Whether the player supports the mp4 format.
- Tags (`tags`, list): 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.
- Record metadata (`record_metadata`, list): A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define.

**Outputs**

- `data` (object): The response from api.video.

**Example output**

```json
{
  "data": {
    "assets": {
      "hls": "example",
      "iframe": "example",
      "mp4": "example",
      "player": "example",
      "thumbnail": "example"
    },
    "createdAt": "example",
    "description": "example",
    "metadata": [
      {
        "key": "example",
        "value": "example"
      }
    ],
    "mp4Support": true,
    "panoramic": true,
    "playerId": "example",
    "public": true,
    "publishedAt": "example",
    "source": {
      "liveStream": {
        "links": [
          {}
        ],
        "liveStreamId": "example"
      },
      "type": "example",
      "uri": "example"
    },
    "tags": [
      "example"
    ],
    "title": "example",
    "updatedAt": "example",
    "videoId": "example"
  }
}
```
