Skip to main content

Pick your use case

Embed a Player

Drop a working video player into any page with one iframe — no code required

Build Your Own Player

Fetch sources as JSON and plug them into your own UI with HLS.js

Download a Movie

Get direct download links or ready-to-run ffmpeg commands for any title

Use the Proxy

Route any stream URL through Cloudflare to fix CORS issues

Embed a Player

The fastest way to get video playing. One <iframe>, zero configuration:
<iframe
  src="https://vyla-api.pages.dev/api/player?type=movie&id=550"
  width="100%"
  height="500"
  allowfullscreen
  frameborder="0"
></iframe>
Replace 550 with any TMDB movie ID, or 456 with any TMDB series ID.
Finding TMDB IDs — go to themoviedb.org and search for any title. The ID is in the URL:
  • themoviedb.org/movie/550id=550 (Fight Club)
  • themoviedb.org/tv/1396id=1396 (Breaking Bad)

Build Your Own Player

1

Fetch sources

Choose between the basic or enriched endpoint depending on how much you need:
curl https://vyla-api.pages.dev/api/movie?id=550
The enriched /api/stream/movie endpoint fans out across all 8 providers and returns vlc_url, ffmpeg_command, and download_url pre-built on every source.
2

Play an HLS source with HLS.js

<video id="player" controls></video>
<script src="https://cdn.jsdelivr.net/npm/hls.js@1.5.13/dist/hls.min.js"></script>
<script>
async function loadMovie(tmdbId) {
  const res = await fetch(`https://vyla-api.pages.dev/api/stream/movie?id=${tmdbId}`);
  const data = await res.json();

  if (!data.success || !data.sources.length) return;

  const source = data.sources[0];
  const video = document.getElementById("player");
  const proxyBase = "https://vyla-api.pages.dev/api/proxy?url=";

  if (source.type === "hls" && Hls.isSupported()) {
    const hls = new Hls();
    hls.loadSource(proxyBase + encodeURIComponent(source.url));
    hls.attachMedia(video);
    hls.on(Hls.Events.MANIFEST_PARSED, () => video.play());
  } else {
    video.src = source.url;
    video.play();
  }
}

loadMovie(550);
</script>
/api/stream/movie returns vlc_url on every source — a pre-built proxy URL with headers already encoded. You can pass it directly to HLS.js without any additional encoding.
3

Add subtitles

data.subtitles.forEach((sub, i) => {
  const track = document.createElement("track");
  track.kind = "subtitles";
  track.label = sub.label;
  track.srclang = "en";
  track.src = "https://vyla-api.pages.dev/api/proxy?url=" + encodeURIComponent(sub.url);
  if (i === 0) track.default = true;
  video.appendChild(track);
});

Download a Movie

1

Get enriched sources

curl https://vyla-api.pages.dev/api/download/movie?id=550
2

Choose your source type

Use download_url — it’s a pre-built link with all headers encoded:
const res = await fetch("https://vyla-api.pages.dev/api/download/movie?id=550");
const data = await res.json();

const directSources = data.sources.filter(s => !s.is_hls && s.download_url);

if (directSources.length) {
  window.location.href = "https://vyla-api.pages.dev" + directSources[0].download_url;
}

Use the Proxy

Fix CORS errors when embedding streams from third-party CDNs:
const streamUrl = "https://vixsrc.to/playlist/170060?token=...";
const headers = { Referer: "https://vixsrc.to/", Origin: "https://vixsrc.to" };

const proxiedUrl = "https://vyla-api.pages.dev/api/proxy"
  + "?url=" + encodeURIComponent(streamUrl)
  + "&headers=" + encodeURIComponent(btoa(JSON.stringify(headers)));
The proxy automatically rewrites all m3u8 segment URLs so the entire HLS stream is tunneled — not just the manifest. You get one URL and the rest is handled transparently.

Finding TMDB IDs

Go to themoviedb.org and search for any title. The ID is in the URL:
URLTMDB IDTitle
themoviedb.org/movie/550550Fight Club
themoviedb.org/movie/2720527205Inception
themoviedb.org/tv/456456The Simpsons
themoviedb.org/tv/13961396Breaking Bad