---
title: "Stream a media file (binary)"
method: GET
path: "/playlists/{playlist_id}/stream"
tags: ["Streaming and Downloads"]
---

# Stream a media file (binary)

`GET /playlists/{playlist_id}/stream`

Streams a given media file. Takes the file id in parameter with optional max bit rate, file format, time offset, size and estimate content length option.

## Path parameters

- `playlist_id` string, required

## Query parameters

- `bitrate` integer
- `format` string
- `offset` integer
- `length` 0 | 1
- `stats` 0 | 1

## Other responses

- `302` — Redirect to the media url; the stream itself is served from the `Location` header
- `400` — HTTP 400 Bad Request (errors 4705, 4710).
- `401` — HTTP 401 Unauthorized (error 4701).
- `403` — HTTP 403 Forbidden (errors 4700, 4703, 4742).
- `404` — HTTP 404 Not Found (error 4704).
- `416` — Range not satisfiable
- `500` — HTTP 500 Internal Server Error (error 4702).

## Changes

- **2026-07-22** `e8e6b266ea29` — 4 info
  - api operation id `streamPlaylists` was added
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
  - added the non-success response with the status `500`
- **2026-07-21** `2ff18e50dcc1` — 1 breaking, 1 info
  - removed the success response with the status `200`
  - added the non-success response with the status `302`
- **2026-07-17** `9abb9bf6d3bf` — 3 breaking
  - removed the media type `application/json` for the response with the status `400`
  - removed the media type `application/json` for the response with the status `404`
  - removed the media type `application/json` for the response with the status `416`
- **2026-06-25** `7ed7a764efd9` — 3 info
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `404`
  - added the media type `application/json` for the response with the status `416`
- **2026-02-26** `c3f202b17eb7` — 1 info
  - endpoint added

[Full history](https://skmtc.dev/ampache/apis/ampache-rest-api/changes/playlists/:playlist_id/stream/get.md)

---

[API](https://skmtc.dev/ampache/apis/ampache-rest-api.md) · [All operations](https://skmtc.dev/ampache/apis/ampache-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ampache/ampache-rest-api/revisions/42d304fb6867/schema)
