Sign up for free Python API client is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.

Project description's Python API client streamlines the coding process. Chunking files is handled for you, as is pagination and refreshing your tokens.

Getting started


Python >= 3.6


pip install

Code samples

Automatic authentication

list all videos:

import apivideo
from apivideo.apis import VideosApi

api_key = "__API_KEY__"

with apivideo.AuthenticatedApiClient(api_key) as client:
    # if you rather like to use the sandbox environment:
    # with apivideo.AuthenticatedApiClient(api_key, production=False) as client:

    videos_api = VideosApi(client)
    videos = videos_api.list()

In this context the client will keep its authentication updated.

Manual authentication

If there is an issue, like you think a refresh token may have been exposed, you can manually retrieve a new one. Otherwise, authentication is handled for you. When you retrieve a new refresh token, the old one becomes invalid. Here is the code, where you retrieve a list of videos and then refresh your token:

import apivideo
from apivideo.apis import VideosApi
from apivideo.exceptions import ApiAuthException

api_key = "__API_KEY__"

client = apivideo.AuthenticatedApiClient(api_key)
# if you rather like to use the sandbox environment:
# client = apivideo.AuthenticatedApiClient(api_key, production=False)
videos_api = VideosApi(client)
videos = videos_api.list()

except ApiAuthException:
    print("cannot refresh token !")



API Endpoints

All URIs are relative to


MethodHTTP requestDescription
get_live_streams_playsGET /analytics/live-streams/playsGet play events for live stream
get_videos_playsGET /analytics/videos/playsGet play events for video


MethodHTTP requestDescription
uploadPOST /videos/\{videoId}/captions/{language}Upload a caption
getGET /videos/\{videoId}/captions/{language}Retrieve a caption
updatePATCH /videos/\{videoId}/captions/{language}Update a caption
deleteDELETE /videos/\{videoId}/captions/{language}Delete a caption
listGET /videos/\{videoId}/captionsList video captions


MethodHTTP requestDescription
uploadPOST /videos/\{videoId}/chapters/{language}Upload a chapter
getGET /videos/\{videoId}/chapters/{language}Retrieve a chapter
deleteDELETE /videos/\{videoId}/chapters/{language}Delete a chapter
listGET /videos/\{videoId}/chaptersList video chapters


MethodHTTP requestDescription
createPOST /live-streamsCreate live stream
getGET /live-streams/{liveStreamId}Retrieve live stream
updatePATCH /live-streams/{liveStreamId}Update a live stream
deleteDELETE /live-streams/{liveStreamId}Delete a live stream
listGET /live-streamsList all live streams
upload_thumbnailPOST /live-streams/\{liveStreamId}/thumbnailUpload a thumbnail
delete_thumbnailDELETE /live-streams/\{liveStreamId}/thumbnailDelete a thumbnail


MethodHTTP requestDescription
createPOST /playersCreate a player
getGET /players/{playerId}Retrieve a player
updatePATCH /players/{playerId}Update a player
deleteDELETE /players/{playerId}Delete a player
listGET /playersList all player themes
upload_logoPOST /players/\{playerId}/logoUpload a logo
delete_logoDELETE /players/\{playerId}/logoDelete logo


MethodHTTP requestDescription
create_tokenPOST /upload-tokensGenerate an upload token
get_tokenGET /upload-tokens/{uploadToken}Retrieve upload token
delete_tokenDELETE /upload-tokens/{uploadToken}Delete an upload token
listGET /upload-tokensList all active upload tokens


MethodHTTP requestDescription
createPOST /videosCreate a video object
uploadPOST /videos/\{videoId}/sourceUpload a video
upload_with_upload_tokenPOST /uploadUpload with an delegated upload token
getGET /videos/{videoId}Retrieve a video object
updatePATCH /videos/{videoId}Update a video object
deleteDELETE /videos/{videoId}Delete a video object
listGET /videosList all video objects
upload_thumbnailPOST /videos/\{videoId}/thumbnailUpload a thumbnail
pick_thumbnailPATCH /videos/\{videoId}/thumbnailSet a thumbnail
get_statusGET /videos/\{videoId}/statusRetrieve video status and details


MethodHTTP requestDescription
uploadPOST /watermarksUpload a watermark
deleteDELETE /watermarks/{watermarkId}Delete a watermark
listGET /watermarksList all watermarks


MethodHTTP requestDescription
createPOST /webhooksCreate Webhook
getGET /webhooks/{webhookId}Retrieve Webhook details
deleteDELETE /webhooks/{webhookId}Delete a Webhook
listGET /webhooksList all webhooks


Have you gotten use from this API client?

Please take a moment to leave a star on the client

This helps other users to find the clients and also helps us understand which clients are most popular. Thank you!


Since this API client is generated from an OpenAPI description, we cannot accept pull requests made directly to the repository. If you want to contribute, you can open a pull request on the repository of our client generator. Otherwise, you can also simply open an issue detailing your need on this repository.

Was this page helpful?