Authentication requirements depend on which gateway you target. The community gateway atDocumentation Index
Fetch the complete documentation index at: https://docs.livepeer.org/llms.txt
Use this file to discover all available pages before exploring further.
dream-gateway.livepeer.cloud accepts unauthenticated requests for development and testing. Managed gateway providers and self-hosted gateways require a Bearer token in the Authorization header.
API key types
Gateway providers that require authentication issue two key types: A backend key in client-side code is a critical security vulnerability. Use the correct type for the deployment context.Using a backend API key
Pass the key as a Bearer token in theAuthorization header:
CORS-enabled keys for browser applications
When your frontend makes direct API calls, use a CORS-enabled key scoped to specific asset or stream IDs. A leaked CORS key cannot access other resources in your account.NEXT_PUBLIC_ prefix makes the variable available client-side in Next.js. Do not use this prefix for backend API keys.
Self-hosted gateway authentication
Self-hosted gateways (go-livepeer in broadcaster mode) use a different authentication model. The gateway authenticates to the network via its Ethereum keystore and TicketBroker deposit. Client requests to your self-hosted gateway use whatever authentication layer you add in front of it (reverse proxy, API gateway, or application middleware). For production, pymthouse provides OIDC identity, usage-based billing, and a managed payment signer as a hosted or self-hosted backend for your self-hosted gateway.Key rotation
Rotate API keys on a schedule and immediately if a key is exposed. Gateway providers let you create multiple active keys and delete compromised ones without downtime. Recommended rotation schedule:- Production backend keys: every 90 days
- After any team member offboarding
- Immediately after any suspected exposure
Authentication errors
A401 Unauthorized response means the key is missing, malformed, or invalid:
- The
Authorizationheader is present and formatted asBearer <key>(notBearer: <key>) - The key value has no leading or trailing whitespace
- The key has not been deleted or revoked
- You are using a backend key for a server-side request, not a CORS key
- You are not targeting the community gateway with an auth header (it does not require one)