openapi: 3.0.0
info:
description: api.video is an API that encodes on the go to facilitate immediate
playback, enhancing viewer streaming experiences across multiple devices and platforms.
You can stream live or on-demand online videos within minutes.
title: api.video
version: "1"
servers:
- description: Production server
url: https://ws.api.video
- description: Test server `all videos are watermarked, and deleted after 24 hours.
url: https://sandbox.api.video
paths:
/auth/api-key:
post:
description: |-
Returns a bearer token that can be used to authenticate other endpoint.
You can find the tutorial on using the disposable bearer token [here](https://docs.api.video/reference/disposable-bearer-token-authentication).
operationId: POST_auth-api-key
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/authenticate-payload'
required: true
responses:
"200":
content:
application/json:
examples:
response:
value:
token_type: Bearer
expires_in: 3600
access_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjUyZWM4NWUyMjFkODZjOWI0NDQ5NzBhMjQwMzUyOWQ4MDQyNGQ3ZmJjYjFlYWM2MjVlM2VkMjI2YWRlNTcxMDY2NDUyZDc0NjdhN2E4NjI0In0.eyJhdWQiOiJsaWJjYXN0IiwianRpIjoiNTJlYzg1ZTIyMWQ4NmM5YjQ0NDk3MGEyNDAzNTI5ZDgwNDI0ZDdmYmNiMWVhYzYyNWUzZWQyMjZhZGU1NzEwNjY0NTJkNzQ2N2E3YTg2MjQiLCJpYXQiOjE1MjUyNzYxNDcsIm5iZiI6MTUyNTI3NjE0NywiZXhwIjoxNTI1Mjc5NzQ3LCJzdWIiOiJ1c01vbml0b3IiLCJzY29wZXMiOlsibW9uaXRvci5saWJjYXN0LmNvbSJdLCJjb250ZXh0Ijp7InVzZXIiOiJ1c01vbml0b3IiLCJwcm9qZWN0IjoicHJNb25pdG9yIiwibWVtYmVyIjoibWVNb25pdG9yIn19.rUvishDNyJLNlI4W5VmguNecm5KD2uZgPkKJQbaqw-cJbSrVxkSbiKYtk_E3cz3WT7-IS2yFTsYN3uIo5Rbit8_HftweyEp2bdBRI8yjR6oZZ1sNJJXswISN1i2kk4r-aaxu7Xxf_LtsjOMUj_YZsvcc2nqBXPKjHbJCJryx3DDJaIcymOqao7nhQaCCQyrQooAXNTYs4E9fWN1dC_x2O-zok5TuG-xhEW-umwxfSUMWNgSTkz38ACceQ0PCJSgB3jqjDH4MwC7B3ppEPZuK5E6JhKeyRlalswRyYq3UQPnVeMTam7YQHsuTgbehF6WySW8i44o7V_MCe9hjPdp-WA
refresh_token: def50200a28d88fb9aaa921be78eeb5604b071101a334899a7d5fc7492cf8ea752962ddc8961fe5c126101d4ecacd980396eb2fd494995b812dffcb98256c4277f790d1f658fc2d2e34f350740544e5232d69d68d34c648271d706c5e7049adac0b1832d0fdf71809715cc7e97fa63f65966deadb501a55ff469b0fd23a637cb6acbe9d9b8594a17f09efc2efeed82984764a0065d5e29c950c7b081a61ba2aaa192be3085c400ee37eac50fa9320ce2cfe8916c8165418d23e9f91b6a5c8515e1d74ee193a5a1ca01954fbff27361c20184240be2359e0afbed0bf1c762cf872450b5e8b5d4704f4fd9583e4470adc98409dd42965709712806bd9019378a72eea0b4912ce684ffd833db5806ab84174f905db2a75380071d004615c944bb8f8c4045cce7234c2be9a2330522cf7f067b8e58f57cffb6edb4b7ef91313e12bcde47e5e76ceee7fa52990132288f345d33ed917ae4fd54b7284f8964d898e97e1ee3bc4157f75d7fee63976e4be66ac1ec32ef74afa533f0eb593523f226cbec57d196ac8962
schema:
$ref: '#/components/schemas/access-token'
description: Success
"400":
content:
application/json:
examples:
response:
value:
type: https://docs.api.video/docs/authenticationinvalid_credentials
title: The user credentials were incorrect.
name: ""
status: 400
schema:
$ref: '#/components/schemas/bad-request'
description: Bad Request
summary: Get Bearer Token
tags:
- Advanced authentication
x-client-action: authenticate
x-client-hidden: true
x-readme:
code-samples:
- language: go
code: |
//With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
- language: node
code: |
//With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
- language: php
code: |
//With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
- language: python
code: |
#With the api.video API clients, authentication is taken care of with each client created.
# You get to skip this step!
- language: java
code: |
//With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
- language: csharp
code: |
//With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
- language: swift
code: |
// With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
/auth/refresh:
post:
description: |-
Accepts the old bearer token and returns a new bearer token that can be used to authenticate other endpoint.
You can find the tutorial on using the disposable bearer token [here](https://docs.api.video/reference/disposable-bearer-token-authentication).
operationId: POST_auth-refresh
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/refresh-token-payload'
required: true
responses:
"200":
content:
application/json:
examples:
response:
value:
token_type: Bearer
expires_in: 3600
access_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjUyZWM4NWUyMjFkODZjOWI0NDQ5NzBhMjQwMzUyOWQ4MDQyNGQ3ZmJjYjFlYWM2MjVlM2VkMjI2YWRlNTcxMDY2NDUyZDc0NjdhN2E4NjI0In0.eyJhdWQiOiJsaWJjYXN0IiwianRpIjoiNTJlYzg1ZTIyMWQ4NmM5YjQ0NDk3MGEyNDAzNTI5ZDgwNDI0ZDdmYmNiMWVhYzYyNWUzZWQyMjZhZGU1NzEwNjY0NTJkNzQ2N2E3YTg2MjQiLCJpYXQiOjE1MjUyNzYxNDcsIm5iZiI6MTUyNTI3NjE0NywiZXhwIjoxNTI1Mjc5NzQ3LCJzdWIiOiJ1c01vbml0b3IiLCJzY29wZXMiOlsibW9uaXRvci5saWJjYXN0LmNvbSJdLCJjb250ZXh0Ijp7InVzZXIiOiJ1c01vbml0b3IiLCJwcm9qZWN0IjoicHJNb25pdG9yIiwibWVtYmVyIjoibWVNb25pdG9yIn19.rUvishDNyJLNlI4W5VmguNecm5KD2uZgPkKJQbaqw-cJbSrVxkSbiKYtk_E3cz3WT7-IS2yFTsYN3uIo5Rbit8_HftweyEp2bdBRI8yjR6oZZ1sNJJXswISN1i2kk4r-aaxu7Xxf_LtsjOMUj_YZsvcc2nqBXPKjHbJCJryx3DDJaIcymOqao7nhQaCCQyrQooAXNTYs4E9fWN1dC_x2O-zok5TuG-xhEW-umwxfSUMWNgSTkz38ACceQ0PCJSgB3jqjDH4MwC7B3ppEPZuK5E6JhKeyRlalswRyYq3UQPnVeMTam7YQHsuTgbehF6WySW8i44o7V_MCe9hjPdp-WA
refresh_token: def50200a28d88fb9aaa921be78eeb5604b071101a334899a7d5fc7492cf8ea752962ddc8961fe5c126101d4ecacd980396eb2fd494995b812dffcb98256c4277f790d1f658fc2d2e34f350740544e5232d69d68d34c648271d706c5e7049adac0b1832d0fdf71809715cc7e97fa63f65966deadb501a55ff469b0fd23a637cb6acbe9d9b8594a17f09efc2efeed82984764a0065d5e29c950c7b081a61ba2aaa192be3085c400ee37eac50fa9320ce2cfe8916c8165418d23e9f91b6a5c8515e1d74ee193a5a1ca01954fbff27361c20184240be2359e0afbed0bf1c762cf872450b5e8b5d4704f4fd9583e4470adc98409dd42965709712806bd9019378a72eea0b4912ce684ffd833db5806ab84174f905db2a75380071d004615c944bb8f8c4045cce7234c2be9a2330522cf7f067b8e58f57cffb6edb4b7ef91313e12bcde47e5e76ceee7fa52990132288f345d33ed917ae4fd54b7284f8964d898e97e1ee3bc4157f75d7fee63976e4be66ac1ec32ef74afa533f0eb593523f226cbec57d196ac8962
schema:
$ref: '#/components/schemas/access-token'
description: Success
"400":
content:
application/json:
examples:
response:
value:
status: 400
type: https://docs.api.video/docs/authenticationinvalid_credentials
title: The user credentials were incorrect.
name: ""
schema:
$ref: '#/components/schemas/bad-request'
description: Bad Request
summary: Refresh Bearer Token
tags:
- Advanced authentication
x-client-action: refresh
x-client-hidden: true
x-readme:
code-samples:
- language: go
code: |
//With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
- language: node
code: |
//With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
- language: php
code: |
//With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
- language: python
code: |
#With the api.video API clients, authentication is taken care of with each client created.
# You get to skip this step!
- language: java
code: |
//With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
- language: csharp
code: |
//With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
- language: swift
code: |
// With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
/videos:
get:
description: List all the video objects that are associated with the current
workspace.
operationId: LIST-videos
parameters:
- description: The title of a specific video you want to find. The search will
match exactly to what term you provide and return any videos that contain
the same term as part of their titles.
example: My Video.mp4
explode: true
in: query
name: title
required: false
schema:
type: string
style: form
- description: A tag is a category you create and apply to videos. You can search
for videos with particular tags by listing one or more here. Only videos
that have all the tags you list will be returned.
example: '["captions", "dialogue"]'
explode: true
in: query
name: tags[]
required: false
schema:
items:
type: string
type: array
style: form
- description: 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.
example: metadata[Author]=John Doe&metadata[Format]=Tutorial
explode: true
in: query
name: metadata
required: false
schema:
additionalProperties:
type: string
type: object
style: deepObject
x-is-deep-object: true
- description: If you described a video with a term or sentence, you can add
it here to return videos containing this string.
example: New Zealand
explode: true
in: query
name: description
required: false
schema:
type: string
style: form
- description: If you know the ID for a live stream, you can retrieve the stream
by adding the ID for it here.
example: li400mYKSgQ6xs7taUeSaEKr
explode: true
in: query
name: liveStreamId
required: false
schema:
type: string
style: form
- description: 'Allowed: publishedAt, title. You can search by the time videos
were published at, or by title.'
example: publishedAt
explode: true
in: query
name: sortBy
required: false
schema:
type: string
style: form
- description: 'Allowed: asc, desc. asc is ascending and sorts from A to Z.
desc is descending and sorts from Z to A.'
example: asc
explode: true
in: query
name: sortOrder
required: false
schema:
type: string
style: form
- description: 'Choose the number of search results to return per page. Minimum
value: 1'
example: 2
explode: true
in: query
name: currentPage
required: false
schema:
default: 1
type: integer
style: form
- description: Results per page. Allowed values 1-100, default is 25.
example: 30
explode: true
in: query
name: pageSize
required: false
schema:
default: 25
type: integer
style: form
responses:
"200":
content:
application/json:
examples:
response:
value:
data:
- videoId: vi4blUQJFrYWbaG44NChkH27
playerId: pl45KFKdlddgk654dspkze
title: Maths video
description: An amazing video explaining the string theory
public: false
panoramic: false
mp4Support: true
tags:
- maths
- string theory
- video
metadata:
- key: Author
value: John Doe
- key: Format
value: Tutorial
publishedAt: 2019-12-16T08:25:51.000Z
updatedAt: 2019-12-16T08:48:49.000Z
source:
uri: /videos/c188ed58-3403-46a2-b91b-44603d10b2c9/source
assets:
iframe:
player: https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27
hls: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8
thumbnail: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg
mp4: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4
- videoId: vi4blUQJFrYWbaG44NChkH27
title: Video Title
description: A description for your video.
public: false
panoramic: false
mp4Support: true
tags:
- books
- short stories
metadata:
- key: Author
value: John Doe
- key: Science Fiction
value: Cyberpunk
- key: Technology
value: Computers
publishedAt: 2019-12-16T08:25:51.000Z
updatedAt: 2019-12-16T08:48:49.000Z
source:
uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
assets:
iframe:
player: https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27
hls: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8
thumbnail: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg
mp4: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4
- videoId: vi4blUQJFrYWbaG44NChkH27
playerId: pl45KFKdlddgk654dspkze
title: My Video Title
description: A brief description of the video.
public: false
panoramic: false
mp4Support: true
tags:
- General
- Videos
metadata:
- key: Length
value: Short
publishedAt: 2019-12-16T08:25:51.000Z
updatedAt: 2019-12-16T08:48:49.000Z
source:
uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
assets:
iframe:
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
schema:
$ref: '#/components/schemas/videos-list-response'
description: Success
"400":
content:
application/json:
examples:
response:
value:
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
schema:
$ref: '#/components/schemas/bad-request'
description: Bad Request
security:
- apiKey: []
summary: List all video objects
tags:
- Videos
x-client-description:
default: This method returns a list of your videos (with all their details).
With no parameters added, the API returns the first page of all videos.
You can filter videos using the parameters described below.
x-readme:
code-samples:
- language: php
code: |
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']]);
- language: java
code: |-
// 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