Skip to main content

TypeScript SDK Installation

The Daydream TypeScript SDK (@daydreamlive/sdk) provides a type-safe way to interact with the Daydream API from your server-side applications.
This SDK is for server-side use. For browser-based applications that need to broadcast or play video, use the Browser SDK instead.

Installation

Install with your preferred package manager:
npm install @daydreamlive/sdk
The package supports both CommonJS and ES Modules (ESM).

Requirements

  • Node.js 18+ (LTS recommended)
  • TypeScript 4.7+ (if using TypeScript)
For other JavaScript runtimes, see the GitHub repository for compatibility details.

Authentication

Get your API key from the Daydream Dashboard. Initialize the SDK with your API key:
import { Daydream } from "@daydreamlive/sdk";

const daydream = new Daydream({
  bearer: process.env.DAYDREAM_API_KEY,
});
Never commit your API key to source control. Use environment variables instead.

Next Steps