> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.airtop.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.airtop.ai/_mcp/server.

# Recording a Session

## Overview

Airtop can record browser sessions when explicitly enabled. Each window in a session creates a separate recording file, allowing you to review exactly what happened during your automation. This is incredibly useful for debugging, auditing, and understanding how your automation performed.

## How recordings work

When you create a session with recording enabled, Airtop starts recording all browser activity. The recording captures:

* All page interactions (clicks, typing, scrolling)
* Page navigation and loading
* Visual changes on the page
* Each window as a separate recording file

Recordings are stored securely and can be accessed through the Airtop portal or programmatically via the API.

## Viewing recordings

### Through the Airtop Portal

The easiest way to view recordings is through the Airtop portal. Navigate to the [browser sessions page](https://portal.airtop.ai/browser-sessions) and click on any session to view its details. From there, you can:

* Watch recordings in real-time
* Download recording files
* Review session metadata and logs

### Programmatically via API

You can also access recordings programmatically using the files API. Here's how to list and download recordings for a specific session:

```typescript
// List all files for a session
const files = await client.files.list({
    sessionIds: [sessionId],
});

// Filter for video recordings
const recordings = files.data.files?.filter(file => file.fileType === "video");
console.log('Recording count:', recordings?.length);

// Download each recording
recordings?.forEach(async (file) => {
    console.log('File:', file.fileName, file.fileType, file.fileBytes);
    await client.files.download(file.id, `./${file.fileName}`);
});
```

## Enabling recordings

By default, sessions are not recorded. If you want to record a session, you can enable recording using the `record` configuration parameter:

```typescript
const client = new AirtopClient({apiKey: "YOUR_API_KEY"});
const session = await client.sessions.create({
    configuration: {
        record: true,
    }
});
```

## Recording considerations

### Storage and retention

* Recordings are stored securely in Airtop's infrastructure
* Recording files are automatically cleaned up after 7 days
* You can download recordings at any time before they're cleaned up

### File formats

Recordings are saved in MP4 format and can be played in any standard video player. Each recording file contains:

* High-quality video capture of the browser window using H.264 video codec
* Accurate timing of all interactions