

The media library is a workspace-wide catalog of videos, images, and audio. Use it to discover assets, then place them on a project timeline with B-roll or overlays.

## Endpoints [#endpoints]

* `GET /v1/workspace/media/folders`
* `GET /v1/workspace/media/assets`
* `GET /v1/workspace/media/assets/{asset_id}`

## List Folders [#list-folders]

```bash title="Terminal"
curl "https://blitzreels.com/api/v1/workspace/media/folders?parent_folder_id=root" \
  -H "Authorization: Bearer $BLITZREELS_API_KEY"
```

```json title="Response"
{
  "folders": [
    {
      "id": "folder-uuid",
      "name": "Brand Pack",
      "createdAt": "2026-02-04T10:05:00Z"
    }
  ],
  "count": 1
}
```

## List Assets [#list-assets]

Use filters like `asset_type`, `folder_id`, `search`, and pagination controls to find what you need.

```bash title="Terminal"
curl "https://blitzreels.com/api/v1/workspace/media/assets?asset_type=video&limit=20&offset=0" \
  -H "Authorization: Bearer $BLITZREELS_API_KEY"
```

```json title="Response"
{
  "assets": [
    {
      "id": "asset-uuid",
      "type": "video",
      "name": "Office B-roll",
      "durationSeconds": 4.2,
      "createdAt": "2026-02-04T09:58:00Z"
    }
  ],
  "totalCount": 42,
  "limit": 20,
  "offset": 0
}
```

## Get Asset Details [#get-asset-details]

```bash title="Terminal"
curl https://blitzreels.com/api/v1/workspace/media/assets/{asset_id} \
  -H "Authorization: Bearer $BLITZREELS_API_KEY"
```

## Use an Asset on the Timeline [#use-an-asset-on-the-timeline]

Once you have an `asset_id`, insert it as B-roll.

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/projects/{project_id}/broll \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "asset_id": "asset-uuid",
        "start_seconds": 5,
        "duration_seconds": 3,
        "position_preset": "fullscreen",
        "animation_preset": "fadeIn"
      }
    ]
  }'
```

## Tips [#tips]

* Use `asset_type=all` to combine video, audio, and image results.
* Use `search` for quick keyword matching across asset names.
* `limit` must be 100 or less. Use `offset` for the next page.

## Related [#related]

* [Timeline Editing API](/docs/timeline)
* [Workspace Context](/docs/workspace)
* [Overlays API](/docs/overlays)
