Skip to main content
Vyla API has two separate download systems:

/api/download

Proxy-download a single raw video URL directly — stream it to the browser as a file download

/api/download/movie · /api/download/tv

Fan out across all providers and return enriched sources with download_url and ffmpeg_command

Download by URL

GET /api/download
Fetches a video file and streams it to the browser as a download. Automatically sets Content-Disposition so browsers prompt a save dialog. For HLS URLs, returns an ffmpeg command instead.

Parameters

url
string
required
URL-encoded video URL to download.
filename
string
default:"video.mp4"
Output filename shown in the browser save dialog.
headers
string
Base64-encoded JSON of extra request headers (Referer, Origin). Required for CDNs that enforce origin checking.
info
string
Set to 1 to return a HEAD check as JSON instead of downloading.
ffmpeg
string
Set to 1 to always return an ffmpeg command instead of downloading.

Usage

curl -L "https://vyla-api.pages.dev/api/download?url=https%3A%2F%2Fexample.com%2Fvideo.mp4&filename=movie.mp4" \
  -o movie.mp4

HLS / Playlist URLs

If the URL contains .m3u8 or /playlist/, the endpoint automatically returns an ffmpeg command instead of attempting a stream download:
{
  "success": true,
  "ffmpeg_command": "ffmpeg -headers \"Referer: https://vixsrc.to/\r\nOrigin: https://vixsrc.to\r\nUser-Agent: Mozilla/5.0...\r\n\" -i \"https://vixsrc.to/playlist/170060?token=...\" -c copy -bsf:a aac_adtstoasc output.mp4",
  "url": "https://vixsrc.to/playlist/170060?token=...",
  "referer": "https://vixsrc.to/"
}

Error Responses

{ "success": false, "error": "Missing url param" }
{ "success": false, "error": "Invalid URL" }
{ "success": false, "error": "All fetch attempts failed" }
{ "success": false, "error": "Upstream returned 403" }

Download by TMDB ID

GET /api/download/movie
GET /api/stream/movie
These are aliases — they return the same response.
id
string
required
TMDB movie ID.
curl https://vyla-api.pages.dev/api/download/movie?id=550
See the Stream Movie reference for the full response shape and field descriptions.

Using the Results

MP4/MKV sources

is_hls: false — use download_url directly as a browser <a href> download link. All headers are pre-encoded.

HLS sources

is_hls: true — copy ffmpeg_command and run it in your terminal to mux the stream to MP4.
# Example ffmpeg command from a HLS source
ffmpeg -headers "Referer: https://vixsrc.to/\r\nOrigin: https://vixsrc.to\r\nUser-Agent: Mozilla/5.0...\r\n" \
  -i "https://vixsrc.to/playlist/170060?token=...&expires=...&h=1" \
  -c copy -bsf:a aac_adtstoasc output.mp4
HLS/playlist URLs cannot be downloaded as a single file via a browser link. They must be muxed to MP4 using the provided ffmpeg_command.
Duplicate sources (same underlying file wrapped by different provider proxy chains) are automatically removed. CDN mirror duplicates (same stream path across multiple hostnames) are also collapsed.