Skip to Content

Add high-performance video to your Node application

Use our API and components to handle embedding, storing, and streaming video in your Node application

Installation

Add a dependency on the @mux/mux-node package via npm or yarn.

npm install @mux/mux-node

Quickstart

To start, you'll need a Mux access token. Once you've got that, you're off to the races!

import Mux from '@mux/mux-node';
const mux = new Mux({
  tokenId: process.env.MUX_TOKEN_ID,
  tokenSecret: process.env.MUX_TOKEN_SECRET
});

const asset = await mux.video.assets.create({
  input: [{ url: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' }],
  playback_policy: ['public'],
});

Full documentation

Check out the Mux Node SDK docs for more information.

Was this page helpful?