StreamFire API Reference
A self-hosted HLS streaming proxy that aggregates sources from multiple providers. All endpoints return JSON. Video segments are proxied through Cloudflare Workers for reliability.
https://caribbeantiger-stream.hf.space
Authentication
All endpoints except /health, /docs, and /api/auth/token require a valid JWT in the Authorization header.
Authorization: Bearer <access_token> on every request./api/auth/token
Authenticate with email and password. Returns a JWT access token valid for 1 hour.
| Body field | Type | Description | |
|---|---|---|---|
| grant_type | string | required | "password" for login, "refresh_token" to renew |
| string | required* | User email — required when grant_type is password | |
| password | string | required* | User password |
| refresh_token | string | required* | Refresh token — required when grant_type is refresh_token |
POST /api/auth/token Content-Type: application/json { "grant_type": "password", "email": "user@example.com", "password": "••••••••" }
{
"access_token": "eyJhbGciOiJFUzI1Ni...",
"refresh_token": "v1.xyz...",
"expires_in": 3600,
"token_type": "bearer"
}POST /api/auth/token Content-Type: application/json { "grant_type": "refresh_token", "refresh_token": "v1.xyz..." }
Get Stream Sources
Resolves HLS stream URLs for a movie or TV episode from multiple providers simultaneously. Returns encrypted proxy URLs ready for playback.
/api/stream
| Parameter | Type | Description | |
|---|---|---|---|
| id | number | required | TMDB ID of the movie or TV show |
| type | string | required | movie or tv |
| season | number | optional | Season number — required when type is tv |
| episode | number | optional | Episode number — required when type is tv |
| audio | string | optional | 1 to detect audio languages (slower). Default: 0 |
GET /api/stream?id=27205&type=movie
Authorization: Bearer eyJhbGciOiJFUzI1Ni...GET /api/stream?id=66732&type=tv&season=1&episode=1
Authorization: Bearer eyJhbGciOiJFUzI1Ni...{
"sources": [
{
"url": "https://streamfire.workers.dev/proxy?d=...",
"provider": "peach-wolf",
"label": "1080p",
"qualityLabel": "1080p",
"maxHeight": 1080,
"mediaType": "hls",
"languages": ["en"]
}
],
"subtitles": [...],
"stats": { "total": 9, "nativeWorking": 4 }
}HLS Proxy
Fetches upstream HLS content and rewrites manifests for CORS-safe browser playback. URLs are AES-256-GCM encrypted — never construct them manually.
url field in every source returned by /api/stream is already a fully signed, encrypted proxy URL pointing to the Cloudflare Worker.Trending Movies
/api/tmdb/trending
Returns movies trending this week on TMDB, sorted by popularity.
| Parameter | Type | Description | |
|---|---|---|---|
| page | number | optional | Page number. Default: 1 |
GET /api/tmdb/trending?page=1
Authorization: Bearer ...{
"page": 1, "total_pages": 20,
"results": [{
"id": 27205, "title": "Inception",
"poster": "https://image.tmdb.org/t/p/w500/...",
"backdrop": "https://image.tmdb.org/t/p/w1280/...",
"backdropHD": "https://image.tmdb.org/t/p/original/...",
"release_date": "2010-07-16",
"vote_average": 8.4, "media_type": "movie"
}]
}Now Playing
/api/tmdb/latest
Movies currently in theaters, sorted by popularity.
| Parameter | Type | Description | |
|---|---|---|---|
| page | number | optional | Default: 1 |
GET /api/tmdb/latest
Authorization: Bearer ...Search Movies
/api/tmdb/search
| Parameter | Type | Description | |
|---|---|---|---|
| q | string | required | Search query |
| page | number | optional | Default: 1 |
GET /api/tmdb/search?q=inception
Authorization: Bearer ...Movie Details
/api/tmdb/movie
Full details including cast, genres, runtime, and external IDs (IMDB).
| Parameter | Type | Description | |
|---|---|---|---|
| id | number | required | TMDB movie ID |
GET /api/tmdb/movie?id=27205
Authorization: Bearer ...{
"id": 27205, "title": "Inception",
"runtime": 148, "imdb_id": "tt1375666",
"genres": [{ "id": 28, "name": "Action" }],
"cast": [{ "name": "Leonardo DiCaprio", "character": "Cobb" }],
"overview": "...", "vote_average": 8.4
}Movie Recommendations
/api/tmdb/movie/recommendations
| Parameter | Type | Description | |
|---|---|---|---|
| id | number | required | TMDB movie ID |
GET /api/tmdb/movie/recommendations?id=27205
Authorization: Bearer ...TV Show Details
/api/tmdb/tv
Full details including all seasons, cast, genres, and status.
| Parameter | Type | Description | |
|---|---|---|---|
| id | number | required | TMDB TV show ID |
GET /api/tmdb/tv?id=66732
Authorization: Bearer ...{
"id": 66732, "title": "Stranger Things",
"media_type": "tv", "status": "Ended",
"number_of_seasons": 5, "number_of_episodes": 42,
"seasons": [{
"season_number": 1, "name": "Season 1",
"episode_count": 8, "air_date": "2016-07-13"
}],
"cast": [{ "name": "Millie Bobby Brown", "character": "Eleven" }]
}Season Episodes
/api/tmdb/tv/season
All episodes for a specific season with stills, runtimes, and overviews.
| Parameter | Type | Description | |
|---|---|---|---|
| id | number | required | TMDB TV show ID |
| season | number | required | Season number (1-based) |
GET /api/tmdb/tv/season?id=66732&season=1
Authorization: Bearer ...{
"season_number": 1, "name": "Season 1",
"episodes": [{
"episode_number": 1,
"name": "Chapter One: The Vanishing of Will Byers",
"runtime": 48, "vote_average": 8.5,
"still": "https://image.tmdb.org/t/p/w300/..."
}]
}Trending TV Shows
/api/tmdb/tv/trending
| Parameter | Type | Description | |
|---|---|---|---|
| page | number | optional | Default: 1 |
GET /api/tmdb/tv/trending
Authorization: Bearer ...Popular TV Shows
/api/tmdb/tv/popular
GET /api/tmdb/tv/popular
Authorization: Bearer ...Search TV Shows
/api/tmdb/search/tv
| Parameter | Type | Description | |
|---|---|---|---|
| q | string | required | Search query |
| page | number | optional | Default: 1 |
GET /api/tmdb/search/tv?q=stranger+things
Authorization: Bearer ...Cast & Crew
/api/tmdb/cast
| Parameter | Type | Description | |
|---|---|---|---|
| id | number | required | TMDB ID |
| type | string | required | movie or tv |
GET /api/tmdb/cast?id=27205&type=movie
Authorization: Bearer ...{
"cast": [{ "id": 6193, "name": "Leonardo DiCaprio", "character": "Cobb", "profile": "https://..." }],
"crew": [{ "name": "Christopher Nolan", "job": "Director" }]
}Images & Logos
/api/tmdb/images
Returns logos (PNG/SVG) for use in hero sections. Logos are filtered to English language by default.
| Parameter | Type | Description | |
|---|---|---|---|
| id | number | required | TMDB ID |
| type | string | required | movie or tv |
GET /api/tmdb/images?id=66732&type=tv
Authorization: Bearer ...{
"logos": [{
"url": "https://image.tmdb.org/t/p/original/...",
"url_w300": "https://image.tmdb.org/t/p/w300/...",
"aspect_ratio": 3.14, "language": "en"
}]
}TV Networks
/api/tmdb/networks
Popular streaming networks with white-filtered logo URLs.
GET /api/tmdb/networks
Authorization: Bearer ...{
"networks": [{ "id": 213, "name": "Netflix", "logo": "https://..." }]
}/api/tmdb/network/shows
| Parameter | Type | Description | |
|---|---|---|---|
| id | number | required | Network ID — e.g. Netflix=213, HBO=49, Prime=1024, Disney+=2739 |
| page | number | optional | Default: 1 |
GET /api/tmdb/network/shows?id=213&page=1
Authorization: Bearer ...List Subtitles
/api/subtitles
Returns available subtitle files from OpenSubtitles for a title.
| Parameter | Type | Description | |
|---|---|---|---|
| id | number | required | TMDB ID |
| type | string | optional | movie or tv. Default: movie |
| season | number | optional | For TV episodes |
| episode | number | optional | For TV episodes |
GET /api/subtitles?id=27205&type=movie
Authorization: Bearer ...Subtitle Proxy
/api/subtitle
Proxies a subtitle file with CORS headers. Automatically converts SRT to WebVTT. Supports timing offset adjustment.
| Parameter | Type | Description | |
|---|---|---|---|
| url | string | required | Subtitle file URL (SRT or VTT) |
| offset | number | optional | Time offset in seconds (e.g. -1.5 to shift back) |
GET /api/subtitle?url=https%3A%2F%2Fexample.com%2Fsubs.srt&offset=-1
Authorization: Bearer ...