UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 140 kB
{"openapi":"3.0.0","servers":[{"url":"https://ws.api.video"}],"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","x-apisguru-categories":["media"],"x-logo":{"url":"https://www.datocms-assets.com/26885/1588249863-favicon.png?w=57&h=57"},"x-origin":[{"format":"openapi","url":"https://docs.api.video/openapi/5f0d4679158b8d006ea6f068","version":"3.0"}],"x-providerName":"api.video"},"paths":{"/account":{"get":{"deprecated":true,"description":"Deprecated. Authenticate and get a token, then you can use the bearer token here to retrieve details about your account.","operationId":"GET_account","responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"environment":"production","features":["app.dynamic_metadata","app.event_log","player.white_label","stats.player_events","transcode.mp4_support"],"quota":{"quotaRemaining":54,"quotaTotal":60,"quotaUsed":6}}}},"schema":{"$ref":"#/components/schemas/account"}}},"description":"Success"},"404":{"content":{"application/json":{"examples":{"response":{"value":{"name":"","status":404,"title":"The requested resource was not found.","type":"https://docs.api.video/docs/resourcenot_found"}}},"schema":{"$ref":"#/components/schemas/not-found"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}],"summary":"Show account","tags":["Account"],"x-client-action":"get"}},"/analytics/live-streams/{liveStreamId}":{"get":{"operationId":"GET_analytics-live-streams-liveStreamId","parameters":[{"description":"The unique identifier for the live stream you want to retrieve analytics for.","example":"vi4k0jvEUuaTdRAEjQ4Jfrgz","explode":false,"in":"path","name":"liveStreamId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"Period must have one of the following formats: \n- For a day : \"2018-01-01\",\n- For a week: \"2018-W01\", \n- For a month: \"2018-01\"\n- For a year: \"2018\"\nFor a range period: \n- Date range: \"2018-01-01/2018-01-15\"\n","example":"2025-04-15T13:50:43.568Z","explode":true,"in":"query","name":"period","required":false,"schema":{"format":"period","type":"string"},"style":"form"},{"$ref":"#/components/parameters/currentPage"},{"$ref":"#/components/parameters/pageSize"}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"data":[{"client":{"name":"Firefox","type":"browser","version":"61.0"},"device":{"model":"unknown","type":"desktop","vendor":"unknown"},"location":{"city":"Paris","country":"France"},"os":{"name":"unknown","shortname":"unknown","version":"unknown"},"referrer":{"medium":"unknown","searchTerm":"unknown","source":"unknown","url":"unknown"},"session":{"endedAt":"2025-04-15T13:50:43.569Z","loadedAt":"2025-04-15T13:50:43.569Z","sessionId":"ps4zRWVOv2If2vzKJLMr3jQo"}}],"pagination":{"currentPage":1,"currentPageItems":1,"itemsTotal":1,"links":[{"rel":"self","uri":"/analytics/sessions/ps4zRWVOv2If2vzKJLMr3jQo?currentPage=1&pageSize=25"},{"rel":"first","uri":"/analytics/sessions/ps4zRWVOv2If2vzKJLMr3jQo?currentPage=1&pageSize=25"},{"rel":"last","uri":"/analytics/sessions/ps4zRWVOv2If2vzKJLMr3jQo?currentPage=1&pageSize=25"}],"pageSize":25,"pagesTotal":1}}}},"schema":{"$ref":"#/components/schemas/raw-statistics-list-live-stream-analytics-response"}}},"description":"Success"},"404":{"content":{"application/json":{"examples":{"response":{"value":{"name":"liveStreamId","status":404,"title":"The requested resource was not found.","type":"https://docs.api.video/docs/resourcenot_found"}}},"schema":{"$ref":"#/components/schemas/not-found"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}],"summary":"List live stream player sessions","tags":["Analytics"],"x-client-action":"getLiveStreamAnalytics","x-client-paginated":true,"x-group-parameters":true}},"/analytics/sessions/{sessionId}/events":{"get":{"description":"Useful to track and measure video's engagement.","operationId":"GET_analytics-sessions-sessionId-events","parameters":[{"description":"A unique identifier you can use to reference and track a session with.","example":"psEmFwGQUAXR2lFHj5nDOpy","explode":false,"in":"path","name":"sessionId","required":true,"schema":{"type":"string"},"style":"simple"},{"$ref":"#/components/parameters/currentPage"},{"$ref":"#/components/parameters/pageSize"}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"data":[{"at":0,"emittedAt":"2025-04-15T13:50:43.569Z","type":"ready"},{"at":0,"emittedAt":"2025-04-15T13:50:43.569Z","type":"play"},{"at":7,"emittedAt":"2025-04-15T13:50:43.569Z","type":"pause"},{"at":21,"emittedAt":"2025-04-15T13:50:43.569Z","type":"resume"},{"emittedAt":"2025-04-15T13:50:43.569Z","from":7,"to":21,"type":"seek.forward"},{"at":30,"emittedAt":"2025-04-15T13:50:43.569Z","type":"end"},{"at":0,"emittedAt":"2025-04-15T13:50:43.569Z","type":"play"},{"emittedAt":"2025-04-15T13:50:43.569Z","from":30,"to":0,"type":"seek.backward"},{"at":21,"emittedAt":"2025-04-15T13:50:43.569Z","type":"pause"},{"at":21,"emittedAt":"2025-04-15T13:50:43.569Z","type":"resume"},{"emittedAt":"2025-04-15T13:50:43.569Z","from":0,"to":21,"type":"seek.forward"},{"at":20,"emittedAt":"2025-04-15T13:50:43.569Z","type":"pause"},{"at":20,"emittedAt":"2025-04-15T13:50:43.569Z","type":"resume"},{"emittedAt":"2025-04-15T13:50:43.569Z","from":24,"to":20,"type":"seek.backward"},{"at":17,"emittedAt":"2025-04-15T13:50:43.569Z","type":"pause"},{"at":17,"emittedAt":"2025-04-15T13:50:43.569Z","type":"resume"},{"emittedAt":"2025-04-15T13:50:43.569Z","from":17,"to":17,"type":"seek.forward"},{"at":19,"emittedAt":"2025-04-15T13:50:43.569Z","type":"pause"},{"at":0,"emittedAt":"2025-04-15T13:50:43.569Z","type":"ready"},{"at":0,"emittedAt":"2025-04-15T13:50:43.569Z","type":"ready"},{"at":0,"emittedAt":"2025-04-15T13:50:43.569Z","type":"ready"},{"at":0,"emittedAt":"2025-04-15T13:50:43.569Z","type":"play"},{"at":1,"emittedAt":"2025-04-15T13:50:43.569Z","type":"pause"},{"at":1,"emittedAt":"2025-04-15T13:50:43.569Z","type":"resume"},{"at":3,"emittedAt":"2025-04-15T13:50:43.569Z","type":"pause"}],"pagination":{"currentPage":1,"currentPageItems":25,"itemsTotal":30,"links":[{"rel":"self","uri":"/analytics/sessions/ps5ltuhfsTOeh6bP03Tq5OWc/events?currentPage=1&pageSize=25"},{"rel":"first","uri":"/analytics/sessions/ps5ltuhfsTOeh6bP03Tq5OWc/events?currentPage=1&pageSize=25"},{"rel":"next","uri":"/analytics/sessions/ps5ltuhfsTOeh6bP03Tq5OWc/events?currentPage=2&pageSize=25"},{"rel":"last","uri":"/analytics/sessions/ps5ltuhfsTOeh6bP03Tq5OWc/events?currentPage=2&pageSize=25"}],"pageSize":25,"pagesTotal":2}}}},"schema":{"$ref":"#/components/schemas/raw-statistics-list-player-session-events-response"}}},"description":"Success"},"404":{"content":{"application/json":{"examples":{"response":{"value":{"name":"videoId","status":404,"title":"The requested resource was not found.","type":"https://docs.api.video/docs/resourcenot_found"}}},"schema":{"$ref":"#/components/schemas/not-found"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}],"summary":"List player session events","tags":["Analytics"],"x-client-action":"listPlayerSessionEvents","x-client-paginated":true,"x-group-parameters":true}},"/analytics/videos/{videoId}":{"get":{"description":"Retrieve all available user sessions for a specific video. Tutorials that use the [analytics endpoint](https://api.video/blog/endpoints/analytics).","operationId":"GET_analytics-videos-videoId","parameters":[{"description":"The unique identifier for the video you want to retrieve session information for.","example":"vi4k0jvEUuaTdRAEjQ4Prklg","explode":false,"in":"path","name":"videoId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"Period must have one of the following formats: \n- For a day : 2018-01-01,\n- For a week: 2018-W01, \n- For a month: 2018-01\n- For a year: 2018\nFor a range period: \n- Date range: 2018-01-01/2018-01-15\n","explode":true,"in":"query","name":"period","required":false,"schema":{"format":"period","type":"string"},"style":"form"},{"description":"Metadata and [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) filter. Send an array of key value pairs you want to filter sessios with.","example":"[{\"key\": \"Author\", \"value\": \"John Doe\"}, {\"key\": \"Format\", \"value\": \"Tutorial\"}]","explode":true,"in":"query","name":"metadata","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"$ref":"#/components/parameters/currentPage"},{"$ref":"#/components/parameters/pageSize"}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"data":[{"client":{"name":"Firefox","type":"browser","version":"67.0"},"device":{"model":"unknown","type":"desktop","vendor":"Dell"},"location":{"city":"Paris","country":"France"},"os":{"name":"Microsoft Windows","shortname":"W10","version":"Windows10"},"referrer":{"medium":"organic","searchTerm":"video encoding hosting and delivery","source":"https://google.com","url":"https://api.video"},"session":{"endedAt":"2025-04-15T13:50:43.569Z","loadedAt":"2025-04-15T13:50:43.569Z","sessionId":"psEmFwGQUAXR2lFHj5nDOpy"}}],"pagination":{"currentPage":1,"currentPageItems":1,"itemsTotal":1,"links":[{"rel":"self","uri":"/analytics/sessions/psEmFwGQUAXR2lFHj5nDOpy?currentPage=1&pageSize=25"},{"rel":"first","uri":"/analytics/sessions/psEmFwGQUAXR2lFHj5nDOpy?currentPage=1&pageSize=25"},{"rel":"last","uri":"/analytics/sessions/psEmFwGQUAXR2lFHj5nDOpy?currentPage=1&pageSize=25"}],"pageSize":25,"pagesTotal":1}}}},"schema":{"$ref":"#/components/schemas/raw-statistics-list-sessions-response"}}},"description":"Success"},"404":{"content":{"application/json":{"examples":{"response":{"value":{"name":"videoId","status":404,"title":"The requested resource was not found.","type":"https://docs.api.video/docs/resourcenot_found"}}},"schema":{"$ref":"#/components/schemas/not-found"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}],"summary":"List video player sessions","tags":["Analytics"],"x-client-action":"listSessions","x-client-paginated":true,"x-group-parameters":true}},"/auth/api-key":{"post":{"description":"To get started, submit your API key in the body of your request. api.video returns an access token that is valid for one hour (3600 seconds). A refresh token is also returned. View a [tutorial](https://api.video/blog/tutorials/authentication-tutorial) on authentication.\nAll tutorials using the [authentication endpoint](https://api.video/blog/endpoints/authenticate)","operationId":"POST_auth-api-key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/authenticate-payload"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjUyZWM4NWUyMjFkODZjOWI0NDQ5NzBhMjQwMzUyOWQ4MDQyNGQ3ZmJjYjFlYWM2MjVlM2VkMjI2YWRlNTcxMDY2NDUyZDc0NjdhN2E4NjI0In0.eyJhdWQiOiJsaWJjYXN0IiwianRpIjoiNTJlYzg1ZTIyMWQ4NmM5YjQ0NDk3MGEyNDAzNTI5ZDgwNDI0ZDdmYmNiMWVhYzYyNWUzZWQyMjZhZGU1NzEwNjY0NTJkNzQ2N2E3YTg2MjQiLCJpYXQiOjE1MjUyNzYxNDcsIm5iZiI6MTUyNTI3NjE0NywiZXhwIjoxNTI1Mjc5NzQ3LCJzdWIiOiJ1c01vbml0b3IiLCJzY29wZXMiOlsibW9uaXRvci5saWJjYXN0LmNvbSJdLCJjb250ZXh0Ijp7InVzZXIiOiJ1c01vbml0b3IiLCJwcm9qZWN0IjoicHJNb25pdG9yIiwibWVtYmVyIjoibWVNb25pdG9yIn19.rUvishDNyJLNlI4W5VmguNecm5KD2uZgPkKJQbaqw-cJbSrVxkSbiKYtk_E3cz3WT7-IS2yFTsYN3uIo5Rbit8_HftweyEp2bdBRI8yjR6oZZ1sNJJXswISN1i2kk4r-aaxu7Xxf_LtsjOMUj_YZsvcc2nqBXPKjHbJCJryx3DDJaIcymOqao7nhQaCCQyrQooAXNTYs4E9fWN1dC_x2O-zok5TuG-xhEW-umwxfSUMWNgSTkz38ACceQ0PCJSgB3jqjDH4MwC7B3ppEPZuK5E6JhKeyRlalswRyYq3UQPnVeMTam7YQHsuTgbehF6WySW8i44o7V_MCe9hjPdp-WA","expires_in":3600,"refresh_token":"def50200a28d88fb9aaa921be78eeb5604b071101a334899a7d5fc7492cf8ea752962ddc8961fe5c126101d4ecacd980396eb2fd494995b812dffcb98256c4277f790d1f658fc2d2e34f350740544e5232d69d68d34c648271d706c5e7049adac0b1832d0fdf71809715cc7e97fa63f65966deadb501a55ff469b0fd23a637cb6acbe9d9b8594a17f09efc2efeed82984764a0065d5e29c950c7b081a61ba2aaa192be3085c400ee37eac50fa9320ce2cfe8916c8165418d23e9f91b6a5c8515e1d74ee193a5a1ca01954fbff27361c20184240be2359e0afbed0bf1c762cf872450b5e8b5d4704f4fd9583e4470adc98409dd42965709712806bd9019378a72eea0b4912ce684ffd833db5806ab84174f905db2a75380071d004615c944bb8f8c4045cce7234c2be9a2330522cf7f067b8e58f57cffb6edb4b7ef91313e12bcde47e5e76ceee7fa52990132288f345d33ed917ae4fd54b7284f8964d898e97e1ee3bc4157f75d7fee63976e4be66ac1ec32ef74afa533f0eb593523f226cbec57d196ac8962","token_type":"Bearer"}}},"schema":{"$ref":"#/components/schemas/access-token"}}},"description":"Success"},"400":{"content":{"application/json":{"examples":{"response":{"value":{"name":"","status":400,"title":"The user credentials were incorrect.","type":"https://docs.api.video/docs/authenticationinvalid_credentials"}}},"schema":{"$ref":"#/components/schemas/bad-request"}}},"description":"Bad Request"}},"summary":"Authenticate","tags":["Authentication"],"x-client-action":"authenticate","x-client-hidden":true}},"/auth/refresh":{"post":{"description":"Use the refresh endpoint with the refresh token you received when you first authenticated using the api-key endpoint. Send the refresh token in the body of your request. The api.video API returns a new access token that is valid for one hour (3600 seconds) and a new refresh token. \n","operationId":"POST_auth-refresh","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/refresh-token-payload"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjUyZWM4NWUyMjFkODZjOWI0NDQ5NzBhMjQwMzUyOWQ4MDQyNGQ3ZmJjYjFlYWM2MjVlM2VkMjI2YWRlNTcxMDY2NDUyZDc0NjdhN2E4NjI0In0.eyJhdWQiOiJsaWJjYXN0IiwianRpIjoiNTJlYzg1ZTIyMWQ4NmM5YjQ0NDk3MGEyNDAzNTI5ZDgwNDI0ZDdmYmNiMWVhYzYyNWUzZWQyMjZhZGU1NzEwNjY0NTJkNzQ2N2E3YTg2MjQiLCJpYXQiOjE1MjUyNzYxNDcsIm5iZiI6MTUyNTI3NjE0NywiZXhwIjoxNTI1Mjc5NzQ3LCJzdWIiOiJ1c01vbml0b3IiLCJzY29wZXMiOlsibW9uaXRvci5saWJjYXN0LmNvbSJdLCJjb250ZXh0Ijp7InVzZXIiOiJ1c01vbml0b3IiLCJwcm9qZWN0IjoicHJNb25pdG9yIiwibWVtYmVyIjoibWVNb25pdG9yIn19.rUvishDNyJLNlI4W5VmguNecm5KD2uZgPkKJQbaqw-cJbSrVxkSbiKYtk_E3cz3WT7-IS2yFTsYN3uIo5Rbit8_HftweyEp2bdBRI8yjR6oZZ1sNJJXswISN1i2kk4r-aaxu7Xxf_LtsjOMUj_YZsvcc2nqBXPKjHbJCJryx3DDJaIcymOqao7nhQaCCQyrQooAXNTYs4E9fWN1dC_x2O-zok5TuG-xhEW-umwxfSUMWNgSTkz38ACceQ0PCJSgB3jqjDH4MwC7B3ppEPZuK5E6JhKeyRlalswRyYq3UQPnVeMTam7YQHsuTgbehF6WySW8i44o7V_MCe9hjPdp-WA","expires_in":3600,"refresh_token":"def50200a28d88fb9aaa921be78eeb5604b071101a334899a7d5fc7492cf8ea752962ddc8961fe5c126101d4ecacd980396eb2fd494995b812dffcb98256c4277f790d1f658fc2d2e34f350740544e5232d69d68d34c648271d706c5e7049adac0b1832d0fdf71809715cc7e97fa63f65966deadb501a55ff469b0fd23a637cb6acbe9d9b8594a17f09efc2efeed82984764a0065d5e29c950c7b081a61ba2aaa192be3085c400ee37eac50fa9320ce2cfe8916c8165418d23e9f91b6a5c8515e1d74ee193a5a1ca01954fbff27361c20184240be2359e0afbed0bf1c762cf872450b5e8b5d4704f4fd9583e4470adc98409dd42965709712806bd9019378a72eea0b4912ce684ffd833db5806ab84174f905db2a75380071d004615c944bb8f8c4045cce7234c2be9a2330522cf7f067b8e58f57cffb6edb4b7ef91313e12bcde47e5e76ceee7fa52990132288f345d33ed917ae4fd54b7284f8964d898e97e1ee3bc4157f75d7fee63976e4be66ac1ec32ef74afa533f0eb593523f226cbec57d196ac8962","token_type":"Bearer"}}},"schema":{"$ref":"#/components/schemas/access-token"}}},"description":"Success"},"400":{"content":{"application/json":{"examples":{"response":{"value":{"name":"","status":400,"title":"The user credentials were incorrect.","type":"https://docs.api.video/docs/authenticationinvalid_credentials"}}},"schema":{"$ref":"#/components/schemas/bad-request"}}},"description":"Bad Request"}},"summary":"Refresh token","tags":["Authentication"],"x-client-action":"refresh","x-client-hidden":true}},"/live-streams":{"get":{"description":"With no parameters added to the url, this will return all livestreams. Query by name or key to limit the list.","operationId":"GET_live-streams","parameters":[{"description":"The unique stream key that allows you to stream videos.","example":"30087931-229e-42cf-b5f9-e91bcc1f7332","explode":true,"in":"query","name":"streamKey","required":false,"schema":{"type":"string"},"style":"form"},{"description":"You can filter live streams by their name or a part of their name.","example":"My Video","explode":true,"in":"query","name":"name","required":false,"schema":{"type":"string"},"style":"form"},{"description":"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.","example":"createdAt","explode":true,"in":"query","name":"sortBy","required":false,"schema":{"type":"string"},"style":"form"},{"description":"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.","example":"desc","explode":true,"in":"query","name":"sortOrder","required":false,"schema":{"enum":["asc","desc"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/currentPage"},{"$ref":"#/components/parameters/pageSize"}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"data":[{"assets":{"hls":"https://live.api.video/li400mYKSgQ6xs7taUeSaEKr.m3u8","iframe":"<iframe src=\"https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>","player":"https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr","thumbnail":"https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg"},"broadcasting":false,"createdAt":"2025-04-15T13:50:43.569Z","liveStreamId":"li400mYKSgQ6xs7taUeSaEKr","name":"Live Stream From the browser","public":true,"record":true,"streamKey":"30087931-229e-42cf-b5f9-e91bcc1f7332","updatedAt":"2025-04-15T13:50:43.569Z"},{"assets":{"hls":"https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8","iframe":"<iframe src=\"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>","player":"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5","thumbnail":"https://cdn.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5/thumbnail.jpg"},"broadcasting":false,"createdAt":"2025-04-15T13:50:43.569Z","liveStreamId":"li4pqNqGUkhKfWcBGpZVLRY5","name":"Live From New York","public":true,"record":true,"streamKey":"cc1b4df0-d1c5-4064-a8f9-9f0368385135","updatedAt":"2025-04-15T13:50:43.569Z"}],"pagination":{"currentPage":1,"currentPageItems":19,"itemsTotal":19,"links":[{"rel":"self","uri":"/live-streams?currentPage=1&pageSize=25"},{"rel":"first","uri":"/live-streams?currentPage=1&pageSize=25"},{"rel":"last","uri":"/live-streams?currentPage=1&pageSize=25"}],"pageSize":25,"pagesTotal":1}}}},"schema":{"$ref":"#/components/schemas/live-stream-list-response"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"List all live streams","tags":["Live"],"x-client-action":"list","x-client-paginated":true,"x-group-parameters":true},"post":{"description":"A live stream will give you the 'connection point' to RTMP your video stream to api.video. It will also give you the details for viewers to watch the same livestream. The public=false 'private livestream' is available as a BETA feature, and should be limited to livestreams of 3,000 viewers or fewer. See our [Live Stream Tutorial](https://api.video/blog/tutorials/live-stream-tutorial) for a walkthrough of this API with OBS. Your RTMP endpoint for the livestream is rtmp://broadcast.api.video/s/{streamKey}\nTutorials that [create live streams](https://api.video/blog/endpoints/live-create).","operationId":"POST_live-streams","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/live-stream-create-payload"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"assets":{"hls":"https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8","iframe":"<iframe src=\"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>","player":"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5","thumbnail":"https://cdn.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5/thumbnail.jpg"},"broadcasting":false,"createdAt":"2025-04-15T13:50:43.569Z","liveStreamId":"li4pqNqGUkhKfWcBGpZVLRY5","name":"Live From New York","public":true,"record":true,"streamKey":"cc1b4df0-d1c5-4064-a8f9-9f0368385135","updatedAt":"2025-04-15T13:50:43.569Z"}}},"schema":{"$ref":"#/components/schemas/live-stream"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bad-request"}}},"description":"Bad Request"}},"security":[{"bearerAuth":[]}],"summary":"Create live stream","tags":["Live"],"x-client-action":"create"}},"/live-streams/{liveStreamId}":{"delete":{"operationId":"DELETE_live-streams-liveStreamId","parameters":[{"description":"The unique ID for the live stream that you want to remove.","example":"li400mYKSgQ6xs7taUeSaEKr","explode":false,"in":"path","name":"liveStreamId","required":true,"schema":{"type":"string"},"style":"simple"}],"responses":{"204":{"description":"No Content"}},"security":[{"bearerAuth":[]}],"summary":"Delete a live stream","tags":["Live"],"x-client-action":"delete"},"get":{"description":"Supply a LivestreamId, and you'll get all the details for streaming into, and watching the livestream. Tutorials that use the [show livestream endpoint](https://api.video/blog/endpoints/live-stream-status).","operationId":"GET_live-streams-liveStreamId","parameters":[{"description":"The unique ID for the live stream you want to watch.","example":"li400mYKSgQ6xs7taUeSaEKr","explode":false,"in":"path","name":"liveStreamId","required":true,"schema":{"type":"string"},"style":"simple"}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"assets":{"hls":"https://live.api.video/li400mYKSgQ6xs7taUeSaEKr.m3u8","iframe":"<iframe src=\"https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>","player":"https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr","thumbnail":"https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg"},"broadcasting":false,"createdAt":"2025-04-15T13:50:43.569Z","liveStreamId":"li400mYKSgQ6xs7taUeSaEKr","name":"Live Stream From the browser","public":true,"record":true,"streamKey":"30087931-229e-42cf-b5f9-e91bcc1f7332","updatedAt":"2025-04-15T13:50:43.569Z"}}},"schema":{"$ref":"#/components/schemas/live-stream"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Show live stream","tags":["Live"],"x-client-action":"get"},"patch":{"description":"Use this endpoint to update the player, or to turn recording on/off (saving a copy of the livestream). NOTE: If the livestream is actively streaming, changing the recording status will only affect the NEXT stream. The public=false 'private livestream' is available as a BETA feature, and should be limited to livestreams of 3,000 viewers or fewer.","operationId":"PATCH_live-streams-liveStreamId","parameters":[{"description":"The unique ID for the live stream that you want to update information for such as player details, or whether you want the recording on or off.","example":"li400mYKSgQ6xs7taUeSaEKr","explode":false,"in":"path","name":"liveStreamId","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/live-stream-update-payload"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"assets":{"hls":"https://live.api.video/li400mYKSgQ6xs7taUeSaEKr.m3u8","iframe":"<iframe src=\"https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>","player":"https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr","thumbnail":"https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg"},"broadcasting":false,"createdAt":"2025-04-15T13:50:43.569Z","liveStreamId":"li400mYKSgQ6xs7taUeSaEKr","name":"Live Stream From the browser","public":true,"record":true,"streamKey":"30087931-229e-42cf-b5f9-e91bcc1f7332","updatedAt":"2025-04-15T13:50:43.569Z"}}},"schema":{"$ref":"#/components/schemas/live-stream"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bad-request"}}},"description":"Bad Request"}},"security":[{"bearerAuth":[]}],"summary":"Update a live stream","tags":["Live"],"x-client-action":"update"}},"/live-streams/{liveStreamId}/thumbnail":{"delete":{"description":"Send the unique identifier for a live stream to delete it from the system.","operationId":"DELETE_live-streams-liveStreamId-thumbnail","parameters":[{"description":"The unique identifier for the live stream you want to delete. ","example":"li400mYKSgQ6xs7taUeSaEKr","explode":false,"in":"path","name":"liveStreamId","required":true,"schema":{"type":"string"},"style":"simple"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/live-stream"}}},"description":"Success"},"404":{"content":{"application/json":{"examples":{"response":{"value":{"name":"liveStreamId","status":404,"title":"The requested resource was not found.","type":"https://docs.api.video/docs/resourcenot_found"}}},"schema":{"$ref":"#/components/schemas/not-found"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}],"summary":"Delete a thumbnail","tags":["Live"],"x-client-action":"deleteThumbnail"},"post":{"description":"Upload an image to use as a backdrop for your livestream. Tutorials that [update live stream thumbnails](https://api.video/blog/endpoints/live-upload-a-thumbnail).","operationId":"POST_live-streams-liveStreamId-thumbnail","parameters":[{"description":"The unique ID for the live stream you want to upload.","example":"vi4k0jvEUuaTdRAEjQ4Jfrgz","explode":false,"in":"path","name":"liveStreamId","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/live-stream-thumbnail-upload-payload"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/live-stream"}}},"description":"Created"},"400":{"content":{"application/json":{"examples":{"response":{"value":{"name":"file","status":400,"title":"Only [jpeg, jpg, JPG, JPEG] extensions are supported.","type":"https://docs.api.video/docs/fileextension"}}},"schema":{"$ref":"#/components/schemas/bad-request"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"examples":{"response":{"value":{"name":"liveStreamId","status":404,"title":"The requested resource was not found.","type":"https://docs.api.video/docs/resourcenot_found"}}},"schema":{"$ref":"#/components/schemas/not-found"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}],"summary":"Upload a thumbnail","tags":["Live"],"x-client-action":"uploadThumbnail"}},"/players":{"get":{"description":"Retrieve a list of all the players you created, as well as details about each one.\nTutorials that use the [player endpoint](https://api.video/blog/endpoints/player).","operationId":"GET_players","parameters":[{"description":"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.","example":"createdAt","explode":true,"in":"query","name":"sortBy","required":false,"schema":{"enum":["createdAt","updatedAt"],"type":"string"},"style":"form"},{"description":"Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones.","example":"asc","explode":true,"in":"query","name":"sortOrder","required":false,"schema":{"enum":["asc","desc"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/currentPage"},{"$ref":"#/components/parameters/pageSize"}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"data":[{"backgroundBottom":"rgba(94, 95, 89, 1)","backgroundText":"rgba(255, 255, 255, .95)","backgroundTop":"rgba(72, 4, 45, 1)","createdAt":"2025-04-15T13:50:43.569Z","enableApi":false,"enableControls":false,"forceAutoplay":false,"forceLoop":false,"hideTitle":false,"link":"rgba(255, 0, 0, .95)","linkActive":"rgba(255, 0, 0, .75)","linkHover":"rgba(255, 255, 255, .75)","playerId":"pl4fgtjy4tjyKDK545DRdfg","shapeAspect":"flat","shapeBackgroundBottom":"rgba(50, 50, 50, .8)","shapeBackgroundTop":"rgba(50, 50, 50, .7)","shapeMargin":10,"shapeRadius":3,"text":"rgba(255, 255, 255, .95)","trackBackground":"rgba(0, 0, 0, 0)","trackPlayed":"rgba(255, 255, 255, .95)","trackUnplayed":"rgba(255, 255, 255, .1)","updatedAt":"2025-04-15T13:50:43.569Z"},{"backgroundBottom":"rgba(94, 95, 89, 1)","backgroundText":"rgba(255, 255, 255, .95)","backgroundTop":"rgba(72, 4, 45, 1)","createdAt":"2025-04-15T13:50:43.569Z","enableApi":true,"enableControls":true,"forceAutoplay":true,"forceLoop":false,"hideTitle":false,"link":"rgba(255, 0, 0, .95)","linkActive":"rgba(255, 0, 0, .75)","linkHover":"rgba(255, 255, 255, .75)","playerId":"pl54fgtjy4tjyKDK45DRdfg","shapeAspect":"flat","shapeBackgroundBottom":"rgba(50, 50, 50, .8)","shapeBackgroundTop":"rgba(50, 50, 50, .7)","shapeMargin":10,"shapeRadius":3,"text":"rgba(255, 255, 255, .95)","trackBackground":"rgba(0, 0, 0, 0)","trackPlayed":"rgba(255, 255, 255, .95)","trackUnplayed":"rgba(255, 255, 255, .1)","updatedAt":"2025-04-15T13:50:43.569Z"}],"pagination":{"currentPage":1,"currentPageItems":4,"itemsTotal":4,"links":[{"rel":"self","uri":"https://ws.api.video/players?currentPage=1"},{"rel":"first","uri":"https://ws.api.video/players?currentPage=1"},{"rel":"last","uri":"https://ws.api.video/players?currentPage=1"}],"pageSize":25,"pagesTotal":1}}}},"schema":{"$ref":"#/components/schemas/players-list-response"}}},"description":"Success"},"400":{"content":{"application/json":{"examples":{"response":{"value":{"name":"page","problems":[{"name":"page","range":{"min":1},"title":"This parameter is out of the allowed range of values."},{"name":"pageSize","range":{"max":100,"min":10},"title":"This parameter is out of the allowed range of values."}],"range":{"min":1},"status":400,"title":"This parameter is out of the allowed range of values."}}},"schema":{"$ref":"#/components/schemas/bad-request"}}},"description":"Bad Request"}},"security":[{"bearerAuth":[]}],"summary":"List all players","tags":["Players"],"x-client-action":"list","x-client-paginated":true,"x-group-parameters":true},"post":{"description":"Create a player for your video, and customise it.","operationId":"POST_players","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/playerCreationPayload"}}},"required":true},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"backgroundBottom":"rgba(94, 95, 89, 1)","backgroundText":"rgba(255, 255, 255, .95)","backgroundTop":"rgba(72, 4, 45, 1)","createdAt":"2025-04-15T13:50:43.570Z","enableApi":false,"enableControls":false,"forceAutoplay":false,"forceLoop":false,"hideTitle":false,"link":"rgba(255, 0, 0, .95)","linkActive":"rgba(255, 0, 0, .75)","linkHover":"rgba(255, 255, 255, .75)","playerId":"pl45d5vFFGrfdsdsd156dGhh","shapeAspect":"flat","shapeBackgroundBottom":"rgba(50, 50, 50, .8)","shapeBackgroundTop":"rgba(50, 50, 50, .7)","shapeRadius":3,"text":"rgba(255, 255, 255, .95)","trackBackground":"rgba(0, 0, 0, 0)","trackPlayed":"rgba(255, 255, 255, .95)","trackUnplayed":"rgba(255, 255, 255, .1)","updatedAt":"2025-04-15T13:50:43.570Z"}}},"schema":{"$ref":"#/components/schemas/player"}}},"description":"Created"}},"security":[{"bearerAuth":[]}],"summary":"Create a player","tags":["Players"],"x-client-action":"create"}},"/players/{playerId}":{"delete":{"description":"Delete a player if you no longer need it. You can delete any player that you have the player ID for.","operationId":"DELETE_players-playerId","parameters":[{"description":"The unique identifier for the player you want to delete.","example":"pl45d5vFFGrfdsdsd156dGhh","explode":false,"in":"path","name":"playerId","required":true,"schema":{"type":"string"},"style":"simple"}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"examples":{"response":{"value":{"name":"playerId","status":404,"title":"The requested resource was not found.","type":"https://docs.api.video/docs/resourcenot_found"}}},"schema":{"$ref":"#/components/schemas/not-found"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}],"summary":"Delete a player","tags":["Players"],"x-client-action":"delete"},"get":{"description":"Use a player ID to retrieve details about the player and display it for viewers.","operationId":"GET_players-playerId","parameters":[{"description":"The unique identifier for the player you want to retrieve. ","example":"pl45d5vFFGrfdsdsd156dGhh","explode":false,"in":"path","name":"playerId","required":true,"schema":{"type":"string"},"style":"simple"}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"backgroundBottom":"rgba(94, 95, 89, 1)","backgroundText":"rgba(255, 255, 255, .95)","backgroundTop":"rgba(72, 4, 45, 1)","createdAt":"2025-04-15T13:50:43.570Z","enableApi":false,"enableControls":false,"forceAutoplay":false,"forceLoop":false,"hideTitle":false,"link":"rgba(255, 0, 0, .95)","linkActive":"rgba(255, 0, 0, .75)","linkHover":"rgba(255, 255, 255, .75)","playerId":"pl45d5vFFGrfdsdsd156dGhh","shapeAspect":"flat","shapeBackgroundBottom":"rgba(50, 50, 50, .8)","shapeBackgroundTop":"rgba(50, 50, 50, .7)","shapeRadius":3,"text":"rgba(255, 255, 255, .95)","trackBackground":"rgba(0, 0, 0, 0)","trackPlayed":"rgba(255, 255, 255, .95)","trackUnplayed":"rgba(255, 255, 255, .1)","updatedAt":"2025-04-15T13:50:43.570Z"}}},"schema":{"$ref":"#/components/schemas/player"}}},"description":"Success"},"404":{"content":{"application/json":{"examples":{"response":{"value":{"name":"playerId","status":404,"title":"The requested resource was not found.","type":"https://docs.api.video/docs/resourcenot_found"}}},"schema":{"$ref":"#/components/schemas/not-found"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}],"summary":"Show a player","tags":["Players"],"x-client-action":"get"},"patch":{"description":"Use a player ID to update specific details for a player. NOTE: It may take up to 10 min before the new player configuration is available from our CDN.","operationId":"PATCH_players-playerId","parameters":[{"description":"The unique identifier for the player.","example":"pl45d5vFFGrfdsdsd156dGhh","explode":false,"in":"path","name":"playerId","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/playerUpdatePayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"backgroundBottom":"rgba(94, 95, 89, 1)","backgroundText":"rgba(255, 255, 255, .95)","backgroundTop":"rgba(72, 4, 45, 1)","createdAt":"2025-04-15T13:50:43.570Z","enableApi":false,"enableControls":false,"forceAutoplay":false,"forceLoop":false,"hideTitle":false,"link":"rgba(255, 0, 0, .95)","linkActive":"rgba(255, 0, 0, .75)","linkHover":"rgba(255, 255, 255, .75)","playerId":"pl45d5vFFGrfdsdsd156dGhh","shapeAspect":"flat","shapeBackgroundBottom":"rgba(50, 50, 50, .8)","shapeBackgroundTop":"rgba(50, 50, 50, .7)","shapeRadius":3,"text":"rgba(255, 255, 255, .95)","trackBackground":"rgba(0, 0, 0, 0)","trackPlayed":"rgba(255, 255, 255, .95)","trackUnplayed":"rgba(255, 255, 255, .1)","updatedAt":"2025-04-15T13:50:43.570Z"}}},"schema":{"$ref":"#/components/schemas/player"}}},"description":"Success"},"404":{"content":{"application/json":{"examples":{"response":{"value":{"name":"playerId","status":404,"title":"The requested resource was not found.","type":"https://docs.api.video/docs/resourcenot_found"}}},"schema":{"$ref":"#/components/schemas/not-found"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}],"summary":"Update a player","tags":["Players"],"x-client-action":"update"}},"/players/{playerId}/logo":{"delete":{"operationId":"DELETE_players-playerId-logo","parameters":[{"description":"The unique identifier for the player.","example":"pl14Db6oMJRH6SRVoOwORacK","explode":false,"in":"path","name":"playerId","required":true,"schema":{"type":"string"},"style":"simple"}],"responses":{"204":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"No Content"},"404":{"content":{"application/json":{"examples":{"response":{"value":{"name":"playerId","status":404,"title":"The requested resource was not found.","type":"https://docs.api.video/docs/resourcenot_found"}}},"schema":{"$ref":"#/components/schemas/not-found"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}],"summary":"Delete logo","tags":["Players"],"x-client-action":"deleteLogo"},"post":{"description":"The uploaded image maximum size should be 200x100 and its weight should be 200KB. It will be scaled down to 30px height and converted to PNG to be displayed in the player.","operationId":"POST_players-playerId-logo","parameters":[{"description":"The unique identifier for the player.","example":"pl14Db6oMJRH6SRVoOwORacK","explode":false,"in":"path","name":"playerId","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/players-upload-logo-payload"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/player"}}},"description":"Created"},"400":{"content":{"application/json":{"examples":{"response":{"value":{"name":"file","status":400,"title":"Only ['jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG'] extensions are supported.","type":"https://docs.api.video/docs/fileextension"}}},"schema":{"$ref":"#/components/schemas/bad-request"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"examples":{"response":{"value":{"name":"playerId","status":404,"title":"The requested resource was not found.","type":"https://docs.api.video/docs/resourcenot_found"}}},"schema":{"$ref":"#/components/schemas/not-found"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}],"summary":"Upload a logo","tags":["Players"],"x-client-action":"uploadLogo"}},"/upload":{"post":{"description":"When given a token, anyone can upload a file to the URI `https://ws.api.video/upload?token=<tokenId>`.\n\nExample with cURL:\n\n```curl\n$ curl --request POST --url 'https://ws.api.video/upload?token=toXXX'\n --header 'content-type: multipart/form-data'\n -F file=@video.mp4\n```\n\nOr in an HTML form, with a little JavaScript to convert the form into JSON:\n```html\n<!--form for user interaction-->\n<form name=\"videoUploadForm\" >\n <label for=video>Video:</label>\n <input type=file name=source/><br/>\n <input value=\"Submit\" type=\"submit\">\n</form>\n<div></div>\n<!--JS takes the form data \n uses FormData to turn the response into JSON.\n then uses POST to upload the video file.\n Update the token parameter in the url to your upload token.\n -->\n<script>\n var form = document.forms.namedItem(\"videoUploadForm\");\t\n form.addEventListener('submit', function(ev) {\n\t ev.preventDefault();\n var oOutput = document.querySelector(\"div\"),\n oData = new FormData(form);\n var oReq = new XMLHttpRequest();\n\t \n oReq.open(\"POST\", \"https://ws.api.video/upload?token=toXXX\", true);\n oReq.send(oData);\n\t oReq.onload = function(oEvent) {\n if (oReq.status ==201) {\n oOutput.innerHTML = \"Your video is uploaded!<br/>\" + oReq.response;\n } else {\n oOutput.innerHTML = \"Error \" + oReq.status + \" occurred when trying to upload your file.<br \\/>\";\n }\n };\n }, false);\t\n</script>\n```\n\n\n### Dealing with large files\n\nWe have created a <a href='https://api.video/blog/tutorials/uploading-large-files-with-javascript'>tutorial</a> to walk through the steps required.","operationId":"POST_upload","parameters":[{"description":"The unique identifier for the token you want to use to upload a video.","example":"to1tcmSFHeYY5KzyhOqVKMKb","explode":true,"in":"query","name":"token","required":true,"schema":{"type":"string"},"style":"form"},{"description":"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.","example":"Content-Range: bytes 200-100/5000","explode":false,"in":"header","name":"Content-Range","required":false,"schema":{"pattern":"^bytes [0-9]*-[0-9]*\\/[0-9]*$","type":"string"},"style":"simple","x-client-ignore":true}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/token-upload-payload"}}}},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"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>","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"}],"panoramic":false,"playerId":"pl45KFKdlddgk654dspkze","public":false,"publishedAt":"2025-04-15T13:50:43.570Z","source":{"uri":"/videos/vi4k0jvEUuaTdRAEjQ4Jfrgz/source"},"tags":["maths","string theory","video"],"title":"Maths video","videoId":"vi4k0jvEUuaTdRAEjQ4Jfrgz"}}},"schema":{"$ref":"#/components/schemas/video"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bad-request"}}},"description":"Bad Request"}},"security":[],"summary":"Upload with an upload token","tags":["Videos - Delegated upload"],"x-client-action":"upload","x-client-chunk-upload":true}},"/upload-tokens":{"get":{"description":"A delegated token is used to allow secure uploads without exposing your API key. Use this endpoint to retrieve a list of all currently active delegated tokens.\nTutorials using [delegated upload](https://api.video/blog/endpoints/delegated-upload).","operationId":"GET_upload-tokens","parameters":[{"description":"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.","example":"ttl","explode":true,"in":"query","name":"sortBy","required":false,"schema":{"enum":["createdAt","ttl"],"type":"string"},"style":"form"},{"description":"Allowed: asc, desc. Ascending is 0-9 or A-Z. Descending is 9-0 or Z-A.","example":"asc","explode":true,"in":"query","name":"sortOrder","required":false,"schema":{"enum":["asc","desc"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/currentPage"},{"$ref":"#/components/parameters/pageSize"}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"data":[{"createdAt":"2025-04-15T13:50:43.570Z","expiresAt":"2025-04-15T13:50:43.570Z","token":"to37YfoPDRR2pcDKa6LsUE0M","ttl":3600},{"createdAt":"2025-04-15T13:50:43.570Z","expiresAt":null,"token":"to1W3ZS9PdUBZWzzTEZr1B79","ttl":0}],"pagination":{"currentPage":1,"currentPageItems":2,"itemsTotal":2,"links":[{"rel":"self","uri":"/upload-tokens?currentPage=1&pageSize=25"},{"rel":"first","uri":"/upload-tokens?currentPage=1&pageSize=25"},{"rel":"last","uri":"/upload-tokens?currentPage=1&pageSize=25"}],"pageSize":25,"pagesTotal":1}}}},"schema":{"$ref":"#/components/schemas/token-list-response"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"List all active upload tokens.","tags":["Videos - Delegated upload"],"x-client-action":"listTokens","x-client-paginated":true,"x-group-parameters":true},"post":{"description":"Use this endpoint to generate an upload token. You can use this token to authenticate video uploads while keeping your API key safe. Tutorials using [delegated upload](https://api.video/blog/endpoints/delegated-upload).","operationId":"POST_upload-tokens","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/token-create-payload"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"createdAt":"2025-04-15T13:50:43.570Z","expiresAt":"2025-04-15T13:50:43.570Z","token":"to1tcmSFHeYY5KzyhOqVKMKb","ttl":3600}}},"schema":{"$ref":"#/components/schemas/upload-token"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bad-request"}}},"description":"Bad Request"}},"security":[{"bearerAuth":[]}],"summary":"Generate an upload token","tags":["Videos - Delegated upload"],"x-client-action":"createToken"}},"/upload-tokens/{uploadToken}":{"delete":{"description":"Delete an existing upload token. This is especially useful for tokens you may have created that do not expire.","operationId":"DELETE_upload-tokens-uploadToken","parameters":[{"description":"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.","example":"to1tcmSFHeYY5KzyhOqVKMKb","explode":false,"in":"path","name":"uploadToken","required":true,"schema":{"type":"string"},"style":"simple"}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/not-found"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}],"summary":"Delete an upload token","tags":["Videos - Delegated upload"],"x-client-action":"deleteToken"},"get":{"description":"You can retrieve details about a specific upload token if you have the unique identifier for the upload token. Add it in the path of the endpoint. Details include time-to-live (ttl), when the token was created, and when it will expire.","operationId":"GET_upload-tokens-uploadToken","parameters":[{"description":"The unique identifier for the token you want information about.","example":"to1tcmSFHeYY5KzyhOqVKMKb","explode":false,"in":"path","name":"uploadToken","required":true,"schema":{"type":"string"},"style":"simple"}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"createdAt":"2025-04-15T13:50:43.570Z","expiresAt":null,"token":"to1tcmSFHeYY5KzyhOqVKMKb","ttl":0}}},"schema":{"$ref":"#/components/schemas/upload-token"}}},"description":"Success"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/not-found"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}],"summary":"Show upload token","tags":["Videos - Delegated upload"],"x-client-action":"getToken"}},"/videos":{"get":{"description":"Requests to this endpoint return a list of your videos (with all their details). With no parameters added to this query, the API returns all videos. You can filter what videos the API returns using the parameters described below. We have [several tutorials](https://api.video/blog/endpoints/video-list) that demonstrate this endpoint.","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":"\"tags\": [\"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":"[{\"key\":\"Author\", \"value\":\"John Doe\"}, {\"key\":\"Format\", \"value\":\"Tutorial\"}]","explode":true,"in":"query","name":"metadata","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"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: a