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

# downloadReplay

<Tip>
  Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
</Tip>

[Source: node-sdk/src/session.ts](https://github.com/nottelabs/notte/blob/main/node-sdk/src/session.ts)

Download the MP4 replay to a local file, like `ReplayResponse.download()`
in Python. Resolves with the absolute path of the written file and throws
when the replay has no `mp4_url`.

```typescript theme={null}
Session.downloadReplay(path?: string, options?: ReplayOptions): Promise<string>;
```

## Parameters

<ParamField body="path" type={"string"}>
  Default:

  ```typescript theme={null}
  'replay.mp4'
  ```
</ParamField>

<ParamField body="options" type={"ReplayOptions"}>
  Default:

  ```typescript theme={null}
  {}
  ```
</ParamField>

## Returns

```typescript theme={null}
Promise<string>
```

## Example

```typescript theme={null}
await session.stop();
const file = await session.downloadReplay('session.mp4');
```

## Related types

* [ReplayOptions](/typescript-sdk-reference/types/replayoptions)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.