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

# Uploading Contracts

> How to upload contracts to the Drive and what happens during processing

## Overview

Upload your contracts to the Drive for AI-powered extraction. The system validates, classifies, and processes documents to extract key deal terms automatically.

## File Requirements

| Requirement           | Value     |
| --------------------- | --------- |
| **Minimum file size** | 100 bytes |
| **Maximum file size** | 2 GB      |
| **Format**            | PDF only  |

## How to Upload

1. Click the **Upload** button in the Drive toolbar
2. Select one or more files from the file browser
   * Hold `Cmd` (Mac) or `Ctrl` (Windows) to select multiple files
3. All selected files are uploaded and queued for processing

The system uses parallel processing and can handle uploads of thousands of contracts simultaneously.

***

## Processing Pipeline

After upload, each document goes through two main phases: **pre-processing** (validation) and **extraction**.

### Phase 1: Pre-Processing

During pre-processing, the system validates your document before extraction begins. You'll see "Preparing your documents" during this phase.

| Check                       | What It Does                                             |
| --------------------------- | -------------------------------------------------------- |
| **Duplicate detection**     | Compares file against existing contracts                 |
| **File size validation**    | Ensures file is within size limits                       |
| **File type validation**    | Confirms the file is a valid PDF                         |
| **Document classification** | Determines if the document is an eligible music contract |
| **Split detection**         | Identifies if multiple contracts exist in one file       |

If any check fails, the document is marked as failed or paused with a message explaining why.

### Phase 2: Extraction

Once pre-processing passes, AI extraction begins. The system analyzes the document and extracts structured data including parties, dates, royalties, rights, catalog information, and more. See [Structured Data](/projects/contracts/contract-details/structured-data/parties) for the full list of extracted fields.

<Note>
  Processing time depends on the length and complexity of the document. Most individual contracts are completed within 5–15 minutes. For batch uploads involving thousands of agreements, processing the entire batch can take up to a few hours.
</Note>

***

## Accepted Documents

The system processes documents that are **both**:

1. **Legal/contractual in nature** - Contracts, agreements, amendments, addendums, deal memos
2. **Related to music works** - Involving recordings, compositions, publishing, or music rights

### Examples of Accepted Documents

* Recording agreements
* Publishing contracts
* Distribution deals
* Licensing agreements (sync, mechanical, etc.)
* Amendments and addendums to existing agreements
* Letters of direction
* Option exercise notices
* Assignment documents

### Documents That Are NOT Processed

| Type                           | Why                                               |
| ------------------------------ | ------------------------------------------------- |
| **Invoices**                   | Financial reporting, not contractual              |
| **Royalty statements**         | Financial reporting, not contractual              |
| **Live performance contracts** | Touring/venue bookings don't involve music rights |
| **Marketing materials**        | Informational, not contractual                    |
| **General business documents** | Not related to music works                        |

<Tip>
  When in doubt, upload the document. The classification system errs on the side of processing documents that might contain relevant content.
</Tip>

***

## Duplicate Handling

The system detects duplicates at two stages to prevent redundant contracts in your Drive.

### Pre-Processing: Exact Duplicates

Before processing begins, the system checks if an identical file already exists. If found:

* The new upload is automatically dismissed
* You're notified that the contract already exists

### Post-Processing: Indirect Duplicates

After extraction, the system identifies contracts that represent the same agreement but differ in form:

* Different scans of the same document
* Versions with/without signatures
* Different scan quality or orientation

When indirect duplicates are found:

* The contract with the **most signed signatures** becomes the **parent**
* Other versions are linked as children to the parent
* All versions remain accessible, but the parent is the primary record

This ensures you always have the most complete version (fully signed) as your main contract while preserving access to all versions.

***

## Paused Documents

A document may pause during pre-processing if it requires your attention.

### Multiple Contracts Detected

The most common reason for pausing is when the system detects **multiple separate contracts** within a single PDF file. This happens when:

* Someone scanned multiple agreements together
* A PDF contains distinct contracts between different parties
* Unrelated documents were combined into one file

**Why splitting matters**: Each contract needs to be processed independently to ensure accurate extraction. A publishing agreement and a recording agreement in the same file would have different parties, terms, and structures.

**What to do**: When prompted, review the detected contracts and confirm how to split the document. The system will then process each contract separately.

### What Counts as Separate Contracts

| Separate Contracts                                  | Single Contract                             |
| --------------------------------------------------- | ------------------------------------------- |
| Different parties involved                          | Same parties throughout                     |
| Different subject matter (recording vs. publishing) | Main agreement with schedules/exhibits      |
| Independent agreements in one file                  | Addendums that reference the main agreement |

<Note>
  Schedules, exhibits, and addendums that explicitly reference and modify a main agreement are treated as part of that single contract, not separate documents.
</Note>

***

## Managing Failed and Dismissed Documents

After uploading, documents that cannot be processed appear as **Failed** in the staging panel. You can dismiss individual failed documents or dismiss them all at once. Dismissed documents move to the **Dismissed** tab where you can review or permanently delete them.

### Dismiss All Failed

When the **Failed** filter is active, a **Dismiss All** button appears at the bottom of the list. This lets you dismiss every failed document in one step, moving them all to the Dismissed tab.

<Steps>
  <Step title="Open the staging view">
    Navigate to the Drive and open the staging panel where uploaded documents are processed.
  </Step>

  <Step title="Select the Failed filter">
    Click the **Failed** filter to show only failed documents.
  </Step>

  <Step title="Click Dismiss All">
    Click the **Dismiss All (n)** button that appears at the bottom of the list.
  </Step>

  <Step title="Confirm">
    Review the confirmation dialog and click **Dismiss All** to move all failed documents to the Dismissed tab.
  </Step>
</Steps>

### Delete All Dismissed

When the **Dismissed** filter is active, a **Delete All** button appears at the bottom of the list. This lets you permanently remove all dismissed documents in one action.

<Steps>
  <Step title="Open the staging view">
    Navigate to the Drive and open the staging panel where uploaded documents are processed.
  </Step>

  <Step title="Select the Dismissed filter">
    Click the **Dismissed** filter to show only dismissed documents.
  </Step>

  <Step title="Click Delete All">
    Click the **Delete All (n)** button that appears at the bottom of the list.
  </Step>

  <Step title="Confirm">
    Review the confirmation dialog and click **Delete All** to permanently remove all dismissed documents.
  </Step>
</Steps>

<Warning>
  Deleting dismissed documents is permanent and cannot be undone.
</Warning>

***

## Processing Statuses

| Status         | Description                                 |
| -------------- | ------------------------------------------- |
| **Queued**     | File uploaded, waiting in queue             |
| **Processing** | Pre-processing or extraction in progress    |
| **Paused**     | Requires user action (e.g., split decision) |
| **Completed**  | Extraction complete, data available         |
| **Failed**     | Processing encountered an issue             |

***

## Batch Uploads

When you upload multiple contracts at once, they are processed as a **batch** — each file is queued and processed independently in parallel.

When all contracts in a batch finish processing, you receive an email summary with the total count, successful, failed, and processing time — if project notifications are enabled in [Settings → Notifications](/projects/settings/notifications).
