> ## Documentation Index
> Fetch the complete documentation index at: https://browseruse-0aece648-agency-browser-quickstart-v4-sdk.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Live preview & recording

> Watch an API V4 run in real time or record its browser.

Wait for `browser.ready` as soon as you create the run so the URL is available
while the browser is live:

<CodeGroup>
  ```python Python theme={null}
  from browser_use_sdk.v4 import BrowserUse

  client = BrowserUse()
  run = client.runs.create("Find the top Hacker News story")
  ready = client.runs.wait_for_event(run.id, "browser.ready")
  print(ready.data["live_view_url"])
  ```

  ```typescript TypeScript theme={null}
  import { BrowserUse } from "browser-use-sdk/v4";

  const client = new BrowserUse();
  const run = await client.runs.create({
    task: "Find the top Hacker News story",
    model: "grok-4.5",
  });
  const ready = await client.runs.waitForEvent(run.id, "browser.ready");
  console.log(ready.data.live_view_url);
  ```
</CodeGroup>

The helper advances the event cursor and times out after five minutes. See [run
events](/cloud/agent/observability) for the full event stream and custom polling.

## Embed the live browser

```html theme={null}
<iframe
  src="{LIVE_VIEW_URL}"
  style="width: 100%; aspect-ratio: 16/9; border: 0;"
  allow="autoplay"
></iframe>
```

The URL is hosted on `live.browser-use.com`. Add that origin to your
Content Security Policy's `frame-src` directive when needed. Treat the URL as
a credential: anyone with it can interact with the active browser.

## Recording

Enable recording when the run creates its browser:

<CodeGroup>
  ```python Python theme={null}
  run = client.runs.create(
      "Test the checkout flow",
      browser_settings={"record": True},
  )
  ```

  ```typescript TypeScript theme={null}
  const run = await client.runs.create({
    task: "Test the checkout flow",
    model: "grok-4.5",
    browserSettings: { proxyCountryCode: "us", record: true },
  });
  ```

  ```bash curl theme={null}
  curl https://api.browser-use.com/api/v4/runs \
    -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"task":"Test checkout","browserSettings":{"record":true}}'
  ```
</CodeGroup>

The MP4 becomes available in the Dashboard after the browser stops. API runs
default to recording off, and Zero Data Retention projects never record.
