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

# Library

> Upload reusable footage, images, audio, fonts, and documents once and attach them across projects and brand kits.

The **Library** stores reusable media and brand files—raw footage, screen recordings, images, logos, audio tracks, custom fonts, and PDFs (up to **512 MB** per file)—scoped to your workspace.

Upload a file once to receive a stable `asset_id`, then pass that `asset_id` in [Projects](https://docs.motion.so/api/projects) (`attachments: [{ asset_id }]`) or [Brand kits](https://docs.motion.so/api/brand-kits) (`sections[].asset_ids`) without re-uploading bytes.

> [!NOTE]
>
> **Required scopes:** `motion:assets:read` to list or read assets; `motion:assets:write` to create and complete uploads.

## Three-step upload flow

Uploads go directly to cloud storage using a presigned POST policy:

1. **Create an upload ticket (`POST /uploads`):** Send `filename`, `content_type`, and `file_size`. Motion returns `id` (the future `asset_id`), `upload_url`, and `upload_fields`.
2. **Upload file bytes:** Send a `POST multipart/form-data` request to `upload_url` with every entry from `upload_fields`, placing `file` **last**.
3. **Complete & wait for `ready` (`POST /uploads/{id}/complete`):** Mark the upload complete, then poll `GET /assets/{asset_id}` until `asset.status` is `ready`.

## The Asset object

```json theme={null}
{
  "asset": {
    "id": "5c1a9e3d-1234-4abc-8def-0123456789ab",
    "filename": "product-demo.mp4",
    "asset_type": "video",
    "status": "ready",
    "source_type": "user_uploaded",
    "content_type": "video/mp4",
    "size_bytes": 12451840,
    "created_at": "2026-11-23T09:10:00.000Z",
    "download_url": "https://storage.googleapis.com/...",
    "expires_at": "2026-11-23T10:10:00.000Z"
  }
}
```

**id** `string`

Unique UUID for the Library asset. Pass as `asset_id` in `POST /projects`, `POST /projects/{id}/messages`, or `POST /brand-kits`.

**filename** `string`

Original filename supplied when the upload was created.

**asset\_type** `enum`

Detected media category: `image`, `video`, `audio`, `pdf`, or `file`.

**status** `enum`

Processing state: `uploading`, `processing`, `ready`, or `failed`. Wait until `ready` before attaching the asset to a project or brand kit.

**source\_type** `enum | null`

How the asset entered the Library: `user_uploaded`, `agent_found`, or `agent_generated`.

**content\_type** `string | null`

MIME type of the stored asset (for example `video/mp4`, `image/png`, `font/ttf`).

**size\_bytes** `number | null`

File size in bytes (maximum 512 MB per upload).

**download\_url** `string | null`

Temporary signed download URL; call `GET /assets/{asset_id}` again to renew after `expires_at`.

## Endpoints

| Method & Path | Description |
| - | - |
| [`GET /assets`](https://docs.motion.so/api/library/list) | List workspace Library assets with search and cursor pagination. |
| [`GET /assets/{asset_id}`](https://docs.motion.so/api/library/retrieve) | Retrieve asset metadata, `status`, and a fresh signed `download_url`. |
| [`POST /uploads`](https://docs.motion.so/api/library/create-upload) | Request a presigned upload ticket (`upload_url` and `upload_fields`). |
| [`POST /uploads/{id}/complete`](https://docs.motion.so/api/library/complete-upload) | Finalize an uploaded file so Motion validates and marks it `ready`. |


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