Skip to content
HALOWERK

File Formats and Conversion

ttml caption clip retention

TTML subtitle clip coverage counts intersecting and truncated cues and returns unique caption seconds retained by the clip. Use it when an agent needs an excerpt handoff with exact media boundaries.

POST https://format.halowerk.com/v1/ttml-caption-clip-retention

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
ttmlstringYes
in_snumberYes
out_snumberYes
Show full input schema
{
  "type": "object",
  "properties": {
    "ttml": {
      "type": "string",
      "maxLength": 30000,
      "minLength": 1
    },
    "in_s": {
      "type": "number",
      "minimum": 0,
      "maximum": 604800
    },
    "out_s": {
      "type": "number",
      "minimum": 0,
      "maximum": 604800
    }
  },
  "required": [
    "ttml",
    "in_s",
    "out_s"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "ttml": "<tt xmlns=\"http://www.w3.org/ns/ttml\"><body><div><p begin=\"1s\" end=\"3s\">Harbor open</p><p begin=\"2.5s\" dur=\"2s\">Tide rising</p></div></body></tt>",
  "in_s": 2,
  "out_s": 4
}

Result & documentation

Show published result schema
{
  "type": "object",
  "required": [
    "measured_at",
    "source",
    "data",
    "limitations"
  ],
  "properties": {
    "measured_at": {
      "type": "string"
    },
    "source": {
      "type": "object",
      "required": [
        "reference",
        "retrieved_at"
      ],
      "properties": {
        "reference": {
          "type": "string"
        },
        "retrieved_at": {
          "type": "string"
        }
      }
    },
    "data": {
      "type": "object",
      "properties": {
        "intersecting": {
          "type": "integer"
        },
        "truncated": {
          "type": "integer"
        },
        "captured_s": {
          "type": "number"
        }
      },
      "required": [
        "intersecting",
        "truncated",
        "captured_s"
      ]
    },
    "limitations": {
      "type": "string"
    }
  }
}

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-12-05 UTC.

More endpoints in this hub

All endpoints in this hub โ†’