Skip to content
HALOWERK

Tonwerk

stream clip secure

Reads an HLS master or media playlist (RFC 8216) from a public URL, picks the lowest or highest bandwidth variant, selects the media segments covering `seconds` at the live edge (newest published segments) or from start_offset_s, and fetches them (at most 20 segments and 8 MiB). Returns the playlist SHA-256 and its kind (live, event, vod), every segment with media sequence number, URI, EXTINF duration, program date time, size and SHA-256, and the clip (init segment plus segments, byte-exact.

POST https://ton.halowerk.com/v1/stream-clip-secure

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
playlist_urlstringYesPublic http(s) URL of the HLS playlist (.m3u8, master or media).
secondsnumberNoLength of the window to secure (whole segments, default 20).
fromstringNolive_edge: newest segments; start: from start_offset_s of the playlist.
start_offset_snumberNoWith from=start: media time from the first listed segment.
variantstringNoVariant of a master playlist by bandwidth (default lowest).
include_clipbooleanNoReturn the clip as base64 (default true).
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "playlist_url"
  ],
  "properties": {
    "playlist_url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048,
      "description": "Public http(s) URL of the HLS playlist (.m3u8, master or media)."
    },
    "seconds": {
      "type": "number",
      "minimum": 1,
      "maximum": 60,
      "default": 20,
      "description": "Length of the window to secure (whole segments, default 20)."
    },
    "from": {
      "type": "string",
      "enum": [
        "live_edge",
        "start"
      ],
      "default": "live_edge",
      "description": "live_edge: newest segments; start: from start_offset_s of the playlist."
    },
    "start_offset_s": {
      "type": "number",
      "minimum": 0,
      "maximum": 86400,
      "default": 0,
      "description": "With from=start: media time from the first listed segment."
    },
    "variant": {
      "type": "string",
      "enum": [
        "lowest",
        "highest"
      ],
      "default": "lowest",
      "description": "Variant of a master playlist by bandwidth (default lowest)."
    },
    "include_clip": {
      "type": "boolean",
      "default": true,
      "description": "Return the clip as base64 (default true)."
    }
  }
}

Open original schema

Published input example

{
  "playlist_url": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_4x3/gear0/prog_index.m3u8",
  "seconds": 5,
  "include_clip": false
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’