# Streaming

> Stream URL reference, generated from the OpenAPI spec.

APIs for streaming video content via HLS and MP4 with customizable playback options.

HTML version: https://www.mux.com/docs/api-reference/stream/streaming. Full OpenAPI spec: https://www.mux.com/stream-spec.json

Operations on this page:

- Retrieve HLS manifest: `GET /{PLAYBACK_ID}.m3u8`
- Retrieve a static rendition: `GET /{PLAYBACK_ID}/{FILENAME}`

## Retrieve HLS manifest

`GET https://stream.mux.com/{PLAYBACK_ID}.m3u8`

Fetch an HLS (HTTP Live Streaming) playlist for the specified video asset, with optional query parameters to [modify playback behavior](https://docs.mux.com/guides/modify-playback-behavior).

Operation ID: `get-hls-manifest`. HTML version: https://www.mux.com/docs/api-reference/stream/streaming/get-hls-manifest

### Path parameters

- `PLAYBACK_ID` (string, required): The asset or live stream's playback ID.

### Query parameters

- `token` (string): Signed token (JWT) for [secure video playback](https://docs.mux.com/guides/secure-video-playback).
- `redundant_streams` (boolean): Include [HLS redundant streams](https://docs.mux.com/guides/play-your-videos#add-delivery-redundancy-with-redundant-streams) in the manifest.
- `roku_trick_play` (boolean): Add support for [timeline hover previews on Roku devices](https://docs.mux.com/guides/create-timeline-hover-previews#roku-trick-play).
- `default_subtitles_lang` (string): Set the [default subtitles/captions language](https://docs.mux.com/guides/add-subtitles-to-your-videos#showing-subtitles-by-default) (BCP47 compliant language code).
- `max_resolution` (string): Set the [maximum resolution](https://docs.mux.com/guides/control-playback-resolution#specify-maximum-resolution) of renditions included in the manifest. Possible values: `"270p"`, `"360p"`, `"480p"`, `"540p"`, `"720p"`, `"1080p"`, `"1440p"`, `"2160p"`.
- `min_resolution` (string): Set the [minimum resolution](https://docs.mux.com/guides/control-playback-resolution#specify-minimum-resolution) of renditions included in the manifest. Possible values: `"270p"`, `"360p"`, `"480p"`, `"540p"`, `"720p"`, `"1080p"`, `"1440p"`, `"2160p"`.
- `rendition_order` (string): Set the logic to [order renditions in the HLS manifest](https://www.mux.com/blog/more-tools-to-control-playback-behavior-min-resolution-and-rendition-order#rendition_order). Possible values: `"desc"`.
- `program_start_time` (integer): Set the start time of the asset created from a live stream when using the [instant clipping feature](https://docs.mux.com/guides/create-instant-clips). The timestamp should be provided as an epoch integer, and is compared to the program date time (PDT) generated by a live stream.
- `program_end_time` (integer): Set the end time of the asset created from a live stream when using the [instant clipping feature](https://docs.mux.com/guides/create-instant-clips). The timestamp should be provided as an epoch integer, and is compared to the program date time (PDT) generated by a live stream.
- `asset_start_time` (number, format: float): Set the relative start time of the asset (in seconds) when using the [instant clipping feature](https://docs.mux.com/guides/create-instant-clips).
- `asset_end_time` (number, format: float): Set the relative end time of the asset (in seconds) when using the [instant clipping feature](https://docs.mux.com/guides/create-instant-clips).
- `exclude_pdt` (boolean): If set to true, EXT-X-PROGRAM-DATE-TIME tags will be omitted from HLS manifests for assets from live streams.

### Response `200`

HLS playlist retrieved successfully.

### Errors

- `400`: Bad request due to invalid parameters.
- `404`: Video asset not found.

Every error response has this body:

- `error` (object)
  - `message` (string, required): Description of the error
  - `messages` (array of string): Description of the errors
  - `type` (string): Category of the error
  - `code` (integer, format: int32): Internal error code
- `code` (integer, format: int32): Internal error code
- `message` (string): Description of the error

## Retrieve a static rendition

`GET https://stream.mux.com/{PLAYBACK_ID}/{FILENAME}`

Fetch a static rendition (usually an MP4 or M4A file) of the specified video asset. [MP4 Support](https://docs.mux.com/guides/enable-static-mp4-renditions) must be enabled on the asset before using these URLs.

Operation ID: `get-static-rendition`. HTML version: https://www.mux.com/docs/api-reference/stream/streaming/get-static-rendition

### Path parameters

- `PLAYBACK_ID` (string, required): The asset or live stream's playback ID.
- `FILENAME` (string, required): The filename of the static rendition file, as returned from the static renditions API files list. [See the MP4 guide for more details.](https://docs.mux.com/guides/enable-static-mp4-renditions) Possible values: `"capped-1080p.mp4"`, `"audio.m4a"`, `"low.mp4"`, `"medium.mp4"`, `"high.mp4"`.

### Query parameters

- `token` (string): Signed token (JWT) for [secure video playback](https://docs.mux.com/guides/secure-video-playback).

### Response `200`

MP4 file retrieved successfully.

### Errors

- `400`: Invalid request due to missing or incorrect parameters.
- `404`: The requested video asset or rendition was not found.

Every error response has this body:

- `error` (object)
  - `message` (string, required): Description of the error
  - `messages` (array of string): Description of the errors
  - `type` (string): Category of the error
  - `code` (integer, format: int32): Internal error code
- `code` (integer, format: int32): Internal error code
- `message` (string): Description of the error
