Home/HLS streaming API
HLS adaptive streaming API

An HLS streaming API with signed links that play anywhere

Upload once and get an adaptive HLS stream next to your MP4. Fetch a signed playlist link from the API and hand it to Safari, hls.js, video.js, Shaka or ExoPlayer, locked to the sites you allow.

What you get

On Pro and Scale, each finished video has HTTP Live Streaming (CMAF) copies in addition to the downloadable MP4. The worker renders an adaptive quality ladder, with segments at each quality and a master playlist that lists them, so each viewer's player picks the level that suits their connection. The levels follow the quality you asked for with maxHeight, up to 4K, and never exceed the source. If you ask for captions, the stream also carries a subtitle track, so standard players show a CC button automatically.

The status response includes the link:

"streamUrl": "https://…/stream/3f1c…/1790925000/9b2e…/master.m3u8",
"streamExpiresAt": 1790925000

A streaming link is a signed URL. The API signs it with HMAC-SHA256 and a function at the CDN edge verifies the signature and the expiry before serving anything from private storage, so there is no public bucket and nothing to guess. Relative paths inside the playlists carry the same signed prefix, so segments, posters and caption files all work without extra CORS configuration.

Allowed domains

Under Allowed domains in your account (or PUT /account/allowed-domains with {"domains": ["example.com", "*.example.com"]}) you list the sites that may play your videos, up to 20. Playback and streaming links made afterwards are locked to them, and the CDN checks the request's Origin or Referer hostname before serving. *.example.com covers subdomains; add example.com too for the bare domain. Links made before a change keep their old list until they expire. Requests with no Origin or Referer, as from some native apps, are refused for locked links, so leave the list empty if you play videos in an app. This stops casual hotlinking; it is not DRM.

Play it with hls.js

Your server fetches GET /videos/{id} with its API key and hands the page the link. In the page, Safari plays the playlist natively and other browsers use hls.js:

<video id="player" controls playsinline></video>
<script src="https://cdn.jsdelivr.net/npm/hls.js@1"></script>
<script>
  const video = document.getElementById("player"), url = STREAM_URL;  // from GET /videos/{id}
  if (video.canPlayType("application/vnd.apple.mpegurl")) video.src = url;
  else { const hls = new Hls(); hls.loadSource(url); hls.attachMedia(video); }
</script>

To skip the player code, use the embeddable <video-piper> player: it prefers the stream when present, loads hls.js only where the browser needs it, shows captions and refreshes its links.

Storage and delivery

Streaming copies count toward your plan's storage, and the bytes sent to viewers count as delivery, whether they come from a download, the MP4 playback link or the stream. Pro includes 150 GB of delivery and Scale 400 GB per month; beyond that, paid plans bill $0.55 per GB, with an email at 80% and 100% of each allowance and an optional monthly overage cap.

Which plans include HLS streaming

Adaptive streaming links (HLS) are a Pro and Scale feature. Every plan still gets a signed, seekable MP4 playback link, so Free and Starter videos play on the web too, just without the adaptive quality ladder.

PlanPriceProcessing minutesMax qualityAdaptive streaming (HLS)
Free$0/mo30720pNot included
Starter$49/mo4001080pNot included
Pro$199/mo1,5004KIncluded
Scale$699/mo6,0004KIncluded

Usage beyond a paid plan is billed at $0.09 per processing minute, $0.15 per GB-month of storage and $0.55 per GB of delivery. Full details are on the pricing page.

In the documentation

Frequently asked questions

Which players can play the stream?

Any standard HLS player. It works natively in Safari and on iOS, and anywhere else with hls.js, video.js, Shaka or ExoPlayer, including on your own website.

How long does a streaming link last?

Twice the video's length, between 30 minutes and 24 hours. Pass linkTtl to the status request to choose a different lifetime. Fetch the status again for a fresh link instead of storing the old one.

Can I restrict where my videos play?

Yes. Add up to 20 allowed domains to your account, such as example.com or *.example.com. Links made afterwards only play on those sites, which stops hotlinking. It is not DRM.

Do streaming copies count against my storage?

Yes. Streaming copies count toward your plan's storage. Delivery to viewers is metered as delivery, whether it is a download, the MP4 playback link or the stream.

Do Free and Starter videos play in a browser?

Yes. Every plan gets a signed, seekable MP4 playback link. Only the adaptive HLS stream needs Pro or Scale.

Start building with Video Piper

Create a free account with just your email, grab an API key and make your first request in minutes.