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

# Clean Room Setup

> Configure Nexrender to operate with zero file retention by using your own storage for templates and render outputs

By default, Nexrender stores template files and render outputs on its own infrastructure. For organizations with strict data residency requirements, compliance constraints, or zero-retention policies, Nexrender supports a clean room file flow where templates are fetched from your storage and rendered outputs are delivered directly to your storage.

## Data Retention Overview

| Component             | Default                             | Clean Room                               |
| --------------------- | ----------------------------------- | ---------------------------------------- |
| Template files        | Stored on Nexrender infrastructure  | Fetched from your storage at render time |
| Render outputs        | Stored on Nexrender infrastructure  | Delivered directly to your storage       |
| Downloaded job assets | Processed temporarily and discarded | Processed temporarily and discarded      |

## Templates from Your Own Storage

Instead of uploading a template to Nexrender and referencing it by `id`, point the job directly at a template file in your own storage using `template.src`.

When using `template.src`, you must also provide `template.name`.

For a ZIP archive, `name` identifies the After Effects project file inside the archive:

```json theme={null}
{
  "template": {
    "src": "https://your-storage.example.com/templates/promo-v3.zip",
    "name": "promo-v3.aep",
    "composition": "main"
  },
  "assets": []
}
```

If the project is stored in a directory inside the archive, provide its complete relative path using forward slashes:

```json theme={null}
{
  "template": {
    "src": "https://your-storage.example.com/templates/promo-v3.zip",
    "name": "projects/promo-v3.aep",
    "composition": "main"
  },
  "assets": []
}
```

`name` refers to the `.aep` file inside the ZIP—not the name of the ZIP archive itself. The path must match the archive contents exactly.

Nexrender downloads the source file at render time, opens the specified project, renders the requested composition, and discards the downloaded files after processing. The template file is not copied to Nexrender-managed template storage.

<Note>
  `template.id` and `template.src` are alternative ways to select a template. Do not include both in the same payload.

  When using `template.src`, template introspection and caching are unavailable. Nexrender cannot automatically discover the project file, compositions, or layers, so your payload must explicitly provide `name`, `composition`, and layer names.
</Note>

### Requirements for `template.src`

* Must be a publicly accessible or presigned `https://` URL
* Supported formats: `.aep`, `.zip`, and `.mogrt`
* Maximum file size: 2 GiB
* The URL must remain accessible for the duration of the render
* `name` is required:
  * For `.zip`, use the relative path to the `.aep` file inside the archive, such as `projects/promo-v3.aep`
  * For `.aep` or `.mogrt`, use the downloaded project file name
* `composition` is required for `.aep` and `.zip` templates and optional for `.mogrt`
* `id` must not be included when `src` is provided

## Render Outputs to Your Own Storage

Use the `upload` object in any job payload to push rendered outputs directly to your S3-compatible storage instead of Nexrender-managed output storage:

```json theme={null}
{
  "template": {
    "id": "YOUR_TEMPLATE_ID",
    "composition": "main"
  },
  "upload": {
    "provider": "s3",
    "prefix": "renders/campaign-42/",
    "outputUrl": "https://cdn.yourcompany.com/media",
    "params": {
      "endpoint": "https://s3.amazonaws.com",
      "region": "us-east-1",
      "bucket": "your-render-outputs",
      "accessKeyId": "${secrets.S3_KEY_ID}",
      "accessKeySecret": "${secrets.S3_KEY_SECRET}"
    }
  }
}
```

Once rendering completes, Nexrender uploads the output file to your bucket. When `outputUrl` is provided, the job response uses it as the public base URL for the uploaded output. Nexrender does not retain a copy of the rendered output in its managed output storage.

Store your storage credentials as Nexrender secrets instead of embedding them directly in job payloads. See [Secrets Management](/docs/cloud/jobs/secrets).

## Fully Clean Room Configuration

For a fully clean room file flow, combine `template.src` for template delivery with `upload` for output delivery:

```json theme={null}
{
  "template": {
    "src": "https://your-storage.example.com/templates/promo-v3.zip",
    "name": "projects/promo-v3.aep",
    "composition": "main"
  },
  "assets": [
    {
      "type": "text",
      "layerName": "title",
      "value": "Hello World"
    }
  ],
  "upload": {
    "provider": "s3",
    "prefix": "renders/",
    "params": {
      "region": "us-east-1",
      "bucket": "your-render-outputs",
      "accessKeyId": "${secrets.S3_KEY_ID}",
      "accessKeySecret": "${secrets.S3_KEY_SECRET}"
    }
  }
}
```

In this configuration, Nexrender fetches the template from your storage, extracts the archive when necessary, opens the After Effects project identified by `name`, renders the requested composition, and pushes the result directly to your storage. Neither the template file nor the rendered output is retained in Nexrender-managed file storage.

<Note>
  Enterprise Private Cloud is available for organizations that require the render infrastructure itself to run within their own environment. [Get in touch](https://www.nexrender.com/contact) to learn more.
</Note>
