> ## Documentation Index
> Fetch the complete documentation index at: https://n-a-818b4087.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Media groups

> Send multiple photos, videos, audio files, or documents in one Telegram album.

`send_audio`, `send_video`, `send_photo`, and `send_document` accept a list. A list with more than one item is sent as a media group.

```python theme={null}
telegram.send_audio(
    chat_id = 'YOUR_CHAT_ID',
    audio = [
        'song-1.mp3',
        'song-2.mp3',
        'song-3.mp3'
    ]
)
```

Lists larger than 10 are split into multiple groups automatically. Telegram's caption limit applies to each item, not to the group as a whole.

## Per-item file names

Use `file_names` to name in-memory or file-object uploads:

```python theme={null}
telegram.send_audio(
    chat_id = 'YOUR_CHAT_ID',
    audio = [b'first audio bytes', b'second audio bytes'],
    file_names = ['First song.mp3', 'Second song.mp3'],
    caption = 'Two songs'
)
```

`file_names` is indexed across all chunks, so the eleventh item still receives the eleventh name.

## Per-item metadata

Use a `(source, file_name)` tuple or a dictionary when each item needs different metadata:

```python theme={null}
telegram.send_audio(
    chat_id = 'YOUR_CHAT_ID',
    audio = [
        ('song 1.mp3', 'First song.mp3'),
        {
            'media': 'song 2.mp3',
            'title': 'Second song',
            'performer': 'Artist Name',
            'duration': 180
        },
        'https://example.com/song3.mp3'
    ],
    caption = 'Three songs',
    parse_mode = 'HTML'
)
```

Dictionaries may include supported Telegram media fields such as `caption`, `parse_mode`, `caption_entities`, `title`, `performer`, `duration`, `width`, `height`, and `thumbnail`.

## Single-item lists

A list with exactly one item is sent as a normal single message, so single-file metadata still works:

```python theme={null}
telegram.send_photo(
    chat_id = 'YOUR_CHAT_ID',
    photo = ['only-photo.jpg'],
    caption = 'One photo'
)
```

For groups, put per-file metadata inside the tuple or dictionary. Top-level single-file options such as `duration` or `thumbnail` are only used for single sends.

> [!NOTE]
>
> A top-level `caption` and `parse_mode` are applied to the first item in each group. To caption a different item, set `caption` in that item's dictionary.


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