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

# Live TV & EPG

> Channels, the program guide, and live playback

## List channels

<ParamField query="category" type="string" />

```bash theme={null}
curl "http://<server>:9014/channels?category=Sports" -H "Authorization: Bearer <jwt>"
```

```json theme={null}
{"channels": [{"id": 12, "name": "Example Sports", "tvg_chno": "101", "favorited": true}]}
```

`GET /channels`, also `/channels/search?q=`, `/channel/categories`

***

## Program guide (EPG)

<ParamField query="limit" default="-1" type="integer" />

<ParamField query="offset" type="integer" />

<ParamField query="category" type="string" />

```bash theme={null}
curl "http://<server>:9014/programs?limit=50" -H "Authorization: Bearer <jwt>"
```

```json theme={null}
{
  "total_channels": 220,
  "offset": 0,
  "channels": [
    {"id": 12, "name": "Example Sports", "programs": [
      {"id": 9001, "title": "Match of the Day", "start": "2026-10-06T18:00:00Z", "stop": "2026-10-06T20:00:00Z"}
    ]}
  ]
}
```

`GET /programs`

***

## Watch a channel

<ParamField header="Device-OS" type="string">`Roku OS`, `android ...`, or omitted for web</ParamField>

```bash theme={null}
curl http://<server>:9014/watch/live/12 \
  -H "Authorization: Bearer <jwt>" -H "Device-Id: my-device-1" -H "Device-OS: Roku OS"
```

* Most clients get an HLS master playlist directly (`200`).
* Roku and Android get a `302` redirect to `/watch/live/{channel_id}/master.mpd`. These clients only play DASH.

`GET /watch/live/{channel_id}`

***

## Recordings

```bash theme={null}
curl http://<server>:9014/recordings -H "Authorization: Bearer <jwt>"
```

```json theme={null}
[{"id": 8, "channel_id": 12, "status": "completed"}]
```

`GET /recordings`, `POST /recordings` (body `channel_id`, `program_id`), `DELETE /recordings/{id}`, play at `GET /watch/recording/{recording_id}`


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