Exchanges a playback token for the HLS master playlist URL plus rendition metadata. This is the endpoint the Player SDK calls internally — you rarely need to invoke it directly unless you're embedding a custom HLS player.
Endpoint
GET /v1/video/playback/manifest/{token}
Authentication
The token is the credential. No x-ansdev-key header — passing one
is ignored. The token is bound to a single video and a 5-minute window.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
token | path | string | yes | Playback token (pt_…) |
Response
200 OK
{
"success": true,
"data": {
"masterPlaylistUrl": "https://cdn.ansdev.cloud/vid_abc123def456/master.m3u8",
"qualities": ["1080p", "720p", "480p"],
"encrypted": true,
"expiresAt": "2026-05-23T12:05:00Z"
}
}
| Field | Type | Notes |
|---|---|---|
masterPlaylistUrl | string | HLS .m3u8 master playlist URL |
qualities | string[] | Renditions available in the master playlist |
encrypted | boolean | Whether segments are AES-128 encrypted (key fetched via a separate signed URL) |
expiresAt | timestamp | Token expiry — refresh by generating a new token |
ℹ️ The SDK handles all of this
The Player SDK accepts a playback token attribute and performs this exchange, manifest parsing, ABR selection, and encryption key fetching automatically. Reach for this endpoint only when integrating a custom HLS player like hls.js or Shaka.
CDN behaviour
.m3u8playlists —Cache-Control: no-cache(always revalidate).tssegments — content-hashed paths, immutable for 1 year- AES-128 keys — fetched over HTTPS from a short-lived signed URL, never cached on intermediaries
All assets are served from a global CDN with zero egress charges.
Encrypted videos
If encrypted: true, each .m3u8 line includes an #EXT-X-KEY tag
pointing to a short-lived AES-128 key URL. Standard HLS players
(hls.js, Shaka, native iOS Safari) handle this transparently.
Errors
| Status | Code | When |
|---|---|---|
| 401 | PLAYBACK_TOKEN_EXPIRED | Token older than 5 minutes |
| 401 | PLAYBACK_TOKEN_INVALID | Token signature mismatch or videoId mismatch |
| 404 | VIDEO_NOT_FOUND | Video deleted after the token was issued |
Example
curl https://api.ansdev.cloud/v1/video/playback/manifest/pt_eyJhbGciOi...
const { data } = await fetch(
`https://api.ansdev.cloud/v1/video/playback/manifest/${token}`,
).then((r) => r.json());
// Plug into hls.js
import Hls from 'hls.js';
const video = document.querySelector('video');
const hls = new Hls();
hls.loadSource(data.masterPlaylistUrl);
hls.attachMedia(video);