> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daydream.live/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install and configure the Daydream TypeScript SDK

# 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.

<Tip>
  This SDK is for **server-side** use. For browser-based applications that need
  to broadcast or play video, use the [Browser SDK](/sdks/browser/installation)
  instead.
</Tip>

## Installation

Install with your preferred package manager:

<CodeGroup>
  ```bash npm theme={null}
  npm install @daydreamlive/sdk
  ```

  ```bash pnpm theme={null}
  pnpm add @daydreamlive/sdk
  ```

  ```bash yarn theme={null}
  yarn add @daydreamlive/sdk
  ```

  ```bash bun theme={null}
  bun add @daydreamlive/sdk
  ```
</CodeGroup>

<Note>The package supports both CommonJS and ES Modules (ESM).</Note>

## Requirements

* Node.js 18+ (LTS recommended)
* TypeScript 4.7+ (if using TypeScript)

For other JavaScript runtimes, see the [GitHub repository](https://github.com/daydreamlive/daydream-typescript) for compatibility details.

## Authentication

Get your API key from the [Daydream Dashboard](https://app.daydream.live/dashboard/api-keys).

Initialize the SDK with your API key:

```typescript theme={null}
import { Daydream } from "@daydreamlive/sdk";

const daydream = new Daydream({
  bearer: process.env.DAYDREAM_API_KEY,
});
```

<Warning>
  Never commit your API key to source control. Use environment variables
  instead.
</Warning>

## Next Steps

* [Quickstart](/sdks/typescript/quickstart) - Create your first stream
* [Methods Reference](/sdks/typescript/methods) - Full API documentation
