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

# List Media

> List one page of assets with client.list_media().

Lists one page of ready assets, with the total across all pages. To walk every page, use
[`list_all_media()`](https://docs.dreep.cloud/python-sdk/media/list-all-media).

```python theme={null}
page = client.list_media(folder="courses", page=1, limit=50)

len(page.assets)        # 50
page.pagination.total   # 318
```

## Signature

```python theme={null}
client.list_media(
    *,
    page=None,
    limit=None,
    folder=None,
    folder_id=None,
    recursive=None,
    timeout=NOT_GIVEN,
) -> MediaPage
```

| Parameter | Type | Description |
| :- | :- | :- |
| `page` | `int` | 1-based page number |
| `limit` | `int` | Items per page |
| `folder` | `str` | Slug path to list |
| `folder_id` | `str` | UUID of the folder to list. Mutually exclusive with `folder` |
| `recursive` | `bool` | Include assets in subfolders |

## Returns

A `MediaPage`:

```python theme={null}
page.assets              # list[MediaItem]
page.pagination.page     # 1
page.pagination.limit    # 50
page.pagination.total    # 318 — across all pages

item = page.assets[0]
item.id          # "2f928a3f-1d2a-4a2b"
item.url         # "https://cdn.dreep.cloud/api/v1/fetch/2f928a3f-1d2a-4a2b.webp"
item.filename    # "hero.webp"
item.mimetype    # "image/webp"
item.size_bytes  # 245000 — int
item.asset_type  # "image"
item.folder      # "courses"
item.folder_id   # "78b52933-…"
item.created_at  # datetime
```

`MediaPage` also supports `len(page)` and iteration over its assets:

```python theme={null}
for item in client.list_media(folder="courses"):
    print(item.filename)
```

> [!NOTE]
>
> Unconfirmed [presigned uploads](https://docs.dreep.cloud/python-sdk/upload/create-presigned-upload.md) are not
> listed. An upload becomes an asset only once
> [`confirm_upload()`](https://docs.dreep.cloud/python-sdk/upload/confirm-upload) has run.

## Retries

Listing is a GET, so it is retried automatically on 429, 5xx and connection failures —
twice by default, with exponential backoff that honours `Retry-After`. See
[Errors & Retries](https://docs.dreep.cloud/python-sdk/errors.md).


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