openapi: 3.0.0 x-stoplight: id: ybzk39fiws46g info: title: api.video 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.' version: '1' servers: - url: 'https://ws.api.video' description: Production server - url: 'https://sandbox.api.video' description: 'Test server `all videos are watermarked, and deleted after 24 hours.' paths: /auth/api-key: post: tags: - Advanced authentication summary: Get Bearer Token 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: required: true content: application/json: schema: $ref: '#/components/schemas/authenticate-payload' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/access-token' 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 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/bad-request' examples: response: value: type: 'https://docs.api.video/reference/authentication-invalid-user-credentials' title: The user credentials were incorrect. name: '' status: 400 x-client-action: authenticate x-client-hidden: true x-doctave: 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: tags: - Advanced authentication summary: Refresh Bearer Token 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: required: true content: application/json: schema: $ref: '#/components/schemas/refresh-token-payload' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/access-token' 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 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/bad-request' examples: response: value: status: 400 type: 'https://docs.api.video/reference/authentication-invalid-user-credentials' title: The user credentials were incorrect. name: '' x-client-action: refresh x-client-hidden: true x-doctave: 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: tags: - Videos summary: List all video objects description: List all the video objects that are associated with the current workspace. 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.' operationId: LIST-videos parameters: - name: title in: query 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. required: false style: form explode: true schema: type: string example: My Video.mp4 - name: 'tags[]' in: query 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. required: false style: form explode: true schema: type: array items: type: string example: '["captions", "dialogue"]' - name: metadata in: query 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.' required: false style: deepObject x-is-deep-object: true explode: true schema: type: object additionalProperties: type: string example: 'metadata[Author]=John Doe&metadata[Format]=Tutorial' - name: description in: query description: 'Retrieve video objects by `description`.' required: false style: form explode: true schema: type: string example: New Zealand - name: liveStreamId in: query description: 'Retrieve video objects that were recorded from a live stream by `liveStreamId`.' required: false style: form explode: true schema: type: string example: li400mYKSgQ6xs7taUeSaEKr - name: sortBy in: query description: 'Use this parameter to sort videos by the their created time, published time, updated time, or by title.' required: false style: form explode: true schema: type: string enum: [title, createdAt, publishedAt, updatedAt] example: publishedAt - name: sortOrder in: query description: 'Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A.' required: false style: form explode: true schema: type: string enum: [asc, desc] example: asc - $ref: '#/components/parameters/current-page' - $ref: '#/components/parameters/page-size' responses: '200': headers: X-RateLimit-Limit: schema: type: integer description: The request limit per minute. X-RateLimit-Remaining: schema: type: integer description: The number of available requests left for the current time window. X-RateLimit-Retry-After: schema: type: integer description: The number of seconds left until the current rate limit window resets. description: Success content: application/json: schema: $ref: '#/components/schemas/videos-list-response' examples: response: value: 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: '' 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: '' 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: '' 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' '400': headers: X-RateLimit-Limit: schema: type: integer description: The request limit per minute. X-RateLimit-Remaining: schema: type: integer description: The number of available requests left for the current time window. X-RateLimit-Retry-After: schema: type: integer description: The number of seconds left until the current rate limit window resets. description: Bad Request content: application/json: schema: $ref: '#/components/schemas/bad-request' 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 '429': headers: X-RateLimit-Limit: schema: type: integer description: The request limit per minute. X-RateLimit-Remaining: schema: type: integer description: The number of available requests left for the current time window. X-RateLimit-Retry-After: schema: type: integer description: The number of seconds left until the current rate limit window resets. description: Too Many Requests content: application/json: schema: $ref: '#/components/schemas/too-many-requests' examples: Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. status: 429 security: - apiKey: [] x-doctave: 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