1. Create a signing key
In the dashboard or via the Signing Key API, create a signing key. Store the private key in your backend (env) and use the public key in Studio for verification.2. Create gated content
SetplaybackPolicy.type to "jwt" when creating the stream or asset:
3. Sign and return a JWT from your API
In a backend route (e.g./api/sign-jwt), validate the user, then sign a JWT with the private key. Include playbackId, expiration, and any custom claims. Return the token to the client. Use @livepeer/core/crypto signAccessJwt or any JWT library with the same claims Livepeer expects (see Livepeer Studio docs).
4. Pass the JWT to the Player
Livepeer-Jwt header for WebRTC/HLS, or as query param jwt on the playback URL.