Last update:2026-08-20 14:49:56
Live Snapshot API captures still images from live streams and stores them in your Object Storage bucket. Use it for thumbnails, live previews, content-moderation samples, and compliance archives.
This guide explains how to configure snapshot behavior, automate capture for matching streams, start a capture session on demand, and retrieve the resulting task and file information.
cn, us, or sg.The snapshot workflow has four parts:
Templates are the foundation. Snapshot rules and real-time controls both require a templateId, so create and save a template before using either workflow.
templateId.StartRealTimeSnapshot to start capture for an active stream on demand.persistentId returned for each capture session.QuerySnapshotTaskIds to find tasks in a time range or retrieve a task’s persistentId.QuerySnapshotTaskDetail with a persistentId to monitor the task and review the generated snapshot files.StopRealTimeSnapshot with the relevant persistentId.A snapshot parameter template controls how the service captures and stores images. It defines the image format, sampling interval, Object Storage destination, file-naming convention, and callback URL.
| API | Use it to |
|---|---|
AddSnapshotParameterTemplate |
Create a template that defines image format, storage destination, sampling interval, file naming, and callback settings. |
QuerySnapshotParameterTemplate |
List all templates or retrieve one template by templateId. |
ModifySnapshotParameterTemplate |
Update an existing template. |
DeleteSnapshotParameterTemplate |
Delete a template. |
Important: You cannot delete a template while an active rule references it. Remove the template from all rules before deleting it.
A snapshot rule associates a templateId with live streams so the service captures images automatically while matching streams are live.
You can target a rule at three levels of specificity:
The system uses the longest-match rule. A rule that matches a specific stream takes precedence over a broader application-level rule, and an application-level rule takes precedence over a domain-level rule. Use a broad rule for a default capture policy and a more specific rule when one stream needs different settings.
| API | Use it to |
|---|---|
AddSnapshotRules |
Create a rule that associates a template with streams by domain, application, or stream name. |
QuerySnapshotRule |
List existing rules or filter them by template ID, rule ID, domain, application, or stream name. |
ModifySnapshotRules |
Update an existing rule. |
DeleteSnapshotRules |
Delete a rule. |
Important: You cannot delete a rule while it is actively capturing snapshots. Wait for the stream to end or stop the capture session before deleting the rule.
Use real-time controls when you need to capture images from an active stream without relying on an automatic rule, such as for a moderation event, a user-triggered preview, or incident archiving.
StartRealTimeSnapshot with a templateId and up to five active stream delivery URLs.persistentId returned for each capture session.StopRealTimeSnapshot with the session’s persistentId to end it early.| API | Use it to |
|---|---|
StartRealTimeSnapshot |
Start an immediate snapshot session for up to five active stream delivery URLs. |
StopRealTimeSnapshot |
Stop one active snapshot session by persistentId. |
Important: Store every returned
persistentId. You need it to stop a specific real-time session and to retrieve the task details later.
Use the task query APIs after starting capture manually or when you need to verify automated capture. They let you find a task, check whether it completed, investigate failures, and locate the generated images.
| API | Use it to |
|---|---|
QuerySnapshotTaskIds |
List snapshot tasks submitted in a specified time range and obtain their persistentId values. |
QuerySnapshotTaskDetail |
Retrieve the status and generated image-file information for one task by persistentId. |