Quickstart
Learn how to create an API key and start adding live and on-demand video to your app or website!
First, go to Livepeer Studio, if you haven’t already, and create an account. Once you’ve created an account, you’ll be able to create an API key by clicking on the “Create API Key” button on Developers page.
We do not recommend using “CORS-enabled” API keys - they will be deprecated in an upcoming release. We recommend making requests from your backend to the Livepeer Studio API.
You can now use this API key in Livepeer SDKs and APIs in order to authenticate your requests and start building.
We recommend creating separate accounts for your development and production environments. This will allow you to easily isolate your environments. We will be shipping a solution for multi-environment management soon.
In this exampe, we will use Javascript anld React to upload a video. Make sure to set up a React app first.
Install the JS SDK and Livepeer React
We install both the NodeJS SDK (which works in all JS environments with fetch
)
and the Livepeer React library, which provides composable React primitives for
building video apps.
Set up the SDK
Add an API key to the environment variables, and construct a new Livepeer SDK client.
Retrieve playback info
We can now use the SDK on the backend to fetch the playback info for our asset.
This asset was uploaded using the dashboard, but this can also be an asset created from an application.
Play the asset
We can now use Player component from the SDK to play a video. In the below example, we style the elements with Tailwind, but you can use any styling solution:
Start building
Check out the SDKs and API Reference pages to learn more about how to use the SDKs and API to build your application.
You can also refer to the Guides section for more in-depth tutorials on how to use the SDKs and API to build specific applications.
Don’t know where to start? Check out these four tutorials:
Was this page helpful?