Media imports
Populate the media library by uploading local files or archives, downloading published test-media assets, or validating and transcoding YouTube clips. Long-running operations stream human-readable progress.
List published test-media catalog assets
Fetches the published test-media catalog and resolves each asset to a downloadable rendition. Use the returned catalog path—not an arbitrary URL—with the catalog import endpoint so Insight can validate and store the selected asset safely.
Import a published media-catalog asset
Downloads one asset selected from `/api/media-catalog` into the local media library. The response streams progress as plain text and may remain open while the file is transferred; read the final line for completion or failure. Catalog paths are validated and cannot be used as general-purpose download URLs.
Validate a YouTube import URL
Inspects a YouTube URL without downloading the media and returns the title, duration, thumbnail, and supported Insight transcode targets. Call this before starting an import so a UI or script can show the user the actual clip metadata and reject unsupported inputs early.
Import and transcode a YouTube clip
Downloads the selected clip segment and transcodes it to an Insight-compatible MP4 rendition. The response is a streaming progress log; imports can take significant time and clients should keep the connection open through the final status line. Clip duration is capped at five minutes to bound resource use.
Upload media or a media archive
Uploads one local file using multipart field `file`. Archives (`zip`, `tar`, `gz`, and `tar.gz`) are safely extracted beneath the media root, and compatible MP4 files may be optimized for browser playback after upload. The response is a plain-text progress stream, so clients should consume it through the final line rather than treating the first bytes as completion.