Sign up for free Node.js 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 Java Node.js is a lightweight client built in TypeScript that streamlines the coding process. Chunking files is handled for you, as is pagination and refreshing your tokens.

Getting started


With npm:

npm install --save

...or with yarn:

yarn add


If you're coming from make sure to read our Migration guide first.


To build and compile the typescript sources to javascript use:

npm install
npm run build

Code sample

const ApiVideoClient = require('');
// or: import ApiVideoClient from '';

(async () => {
    try {
        const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

        // create a video
        const videoCreationPayload = {
            title: "Maths video", // The title of your new video.
            description: "A video about string theory.", // A brief description of your video.
        const video = await client.videos.create(videoCreationPayload);

        // upload a video file into the video container
        await client.videos.upload(video.videoId, "my-video-file.mp4");
    } catch (e) {


API Endpoints


MethodDescriptionHTTP request
getLiveStreamsPlays()Get play events for live streamGET /analytics/live-streams/plays
getVideosPlays()Get play events for videoGET /analytics/videos/plays


MethodDescriptionHTTP request
upload()Upload a captionPOST /videos/{videoId}/captions/{language}
get()Retrieve a captionGET /videos/{videoId}/captions/{language}
update()Update a captionPATCH /videos/{videoId}/captions/{language}
delete()Delete a captionDELETE /videos/{videoId}/captions/{language}
list()List video captionsGET /videos/{videoId}/captions


MethodDescriptionHTTP request
upload()Upload a chapterPOST /videos/{videoId}/chapters/{language}
get()Retrieve a chapterGET /videos/{videoId}/chapters/{language}
delete()Delete a chapterDELETE /videos/{videoId}/chapters/{language}
list()List video chaptersGET /videos/{videoId}/chapters


MethodDescriptionHTTP request
create()Create live streamPOST /live-streams
get()Retrieve live streamGET /live-streams/{liveStreamId}
update()Update a live streamPATCH /live-streams/{liveStreamId}
delete()Delete a live streamDELETE /live-streams/{liveStreamId}
list()List all live streamsGET /live-streams
uploadThumbnail()Upload a thumbnailPOST /live-streams/{liveStreamId}/thumbnail
deleteThumbnail()Delete a thumbnailDELETE /live-streams/{liveStreamId}/thumbnail


MethodDescriptionHTTP request
create()Create a playerPOST /players
get()Retrieve a playerGET /players/{playerId}
update()Update a playerPATCH /players/{playerId}
delete()Delete a playerDELETE /players/{playerId}
list()List all player themesGET /players
uploadLogo()Upload a logoPOST /players/{playerId}/logo
deleteLogo()Delete logoDELETE /players/{playerId}/logo


MethodDescriptionHTTP request
createToken()Generate an upload tokenPOST /upload-tokens
getToken()Retrieve upload tokenGET /upload-tokens/{uploadToken}
deleteToken()Delete an upload tokenDELETE /upload-tokens/{uploadToken}
list()List all active upload tokensGET /upload-tokens


MethodDescriptionHTTP request
create()Create a video objectPOST /videos
upload()Upload a videoPOST /videos/{videoId}/source
uploadWithUploadToken()Upload with an delegated upload tokenPOST /upload
get()Retrieve a video objectGET /videos/{videoId}
update()Update a video objectPATCH /videos/{videoId}
delete()Delete a video objectDELETE /videos/{videoId}
list()List all video objectsGET /videos
uploadThumbnail()Upload a thumbnailPOST /videos/{videoId}/thumbnail
pickThumbnail()Set a thumbnailPATCH /videos/{videoId}/thumbnail
getStatus()Retrieve video status and detailsGET /videos/{videoId}/status


MethodDescriptionHTTP request
upload()Upload a watermarkPOST /watermarks
delete()Delete a watermarkDELETE /watermarks/{watermarkId}
list()List all watermarksGET /watermarks


MethodDescriptionHTTP request
create()Create WebhookPOST /webhooks
get()Retrieve Webhook detailsGET /webhooks/{webhookId}
delete()Delete a WebhookDELETE /webhooks/{webhookId}
list()List all webhooksGET /webhooks


Rate Limiting implements rate limiting to ensure fair usage and stability of the service. The API provides the rate limit values in the response headers for any API requests you make. The /auth endpoint is the only route without rate limitation.

In this Node.js client, you can access these headers by using the *WithResponseHeaders() versions of the methods. These methods return both the response body and the headers, allowing you to check the X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Retry-After headers to understand your current rate limit status.

Read more about these response headers in the API reference.

Here is an example of how to use these methods:

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const { body: videos, headers } = await client.videos.listWithResponseHeaders();
console.log('Rate Limit:', headers['x-ratelimit-limit']);
console.log('Rate Limit Remaining:', headers['x-ratelimit-remaining']);
console.log('Rate Limit Retry after:', headers['x-ratelimit-retry-after']);


API key

Most endpoints required to be authenticated using the API key mechanism described in our documentation. The access token generation mechanism is automatically handled by the client.

All you have to do is provide an API key when instantiating the ApiVideoClient:

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

Get the access token

If you need to access the access-token value obtained using the API key, you can use the getAccessToken() method of the client:

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const accessToken = await client.getAccessToken();

Public endpoints

Some endpoints don't require authentication. These one can be called with an ApiVideoClient instantiated without API key:

const client = new ApiVideoClient();

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?