Create snapshot

Prev Next

Available in Classic and VPC

Create a snapshot to create a short clip of a live channel that is streaming. You can only create a snapshot when the channel is recording. When creating a snapshot, note the following:

  • Snapshots can be created only after 100 ms or more of recording time has accumulated.
  • You can create up to 4 hours of recording time from the start to the end of the recording.
    • If the recording time exceeds 4 hours, the last 4 hours are supported.
  • When recording is restarted, the existing snapshot point in time is also reset.
  • Multiple snapshots can be created based on the requested point.

Request

This section describes the request format. The method and URI are as follows:

Method URI
POST /api/v2/channels/{channelId}/snapshot

Request headers

For information about the headers common to all Live Station APIs, see Live Station request headers.

Request path parameters

You can use the following path parameters with your request:

Field Type Required Description
channelId String Required Channel ID

Request query parameters

You can use the following query parameters with your request:

Field Type Required Description
limitedDuration Integer Optional Snapshot creation time (minute)
  • 1-240
  • Playback time to be counted backward from the current point in time and stored.
  • If not entered, save the entire time from the start of the broadcast to the present (up to 4 hours).
  • Example: When requesting limitedDuration=1 at broadcast 01:00:00, create a snapshot between 00:59:00 and 01:00:00.

Request example

The request example is as follows:

curl --location --request POST 'https://livestation.apigw.ntruss.com/api/v2/channels/ls-20250814******-zTwK2/snapshot?limitedDuration=8' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'x-ncp-region_code: KR' \
--header 'Content-Type: application/json'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
content Object - Response result
content.channelId String - Channel ID
content.channelStatus String - Channel status
  • CREATING | READY | PUBLISHING | DELETED | BLOCK | FORCE_BLOCK | FORCE_DELETED
    • CREATING: Creating
    • READY: Ready
    • PUBLISHING: Streaming
    • DELETED: Deleted
    • BLOCK: Stopped
    • FORCE_BLOCK: Force stopped
    • FORCE_DELETED: Unavailable
content.snapshot Object - Snapshot information
content.snapshot.snapshotId Integer - Snapshot ID
  • Required when querying the snapshot later
content.snapshot.snapshotUrl String - Snapshot playback URL
  • Valid for 1 hour from creation (can't be viewed after expiration)
content.snapshot.createdTime Integer - Snapshot creation date and time (millisecond)
  • Unix timestamp format
content.snapshot.expireTime Integer - Snapshot expiration date and time (millisecond)
  • Unix timestamp format
content.snapshot.duration Integer - Snapshot request time (minute)
  • Displayed if limitedDuration is set

Response status codes

For information about the HTTP status codes common to all Live Station APIs, see Live Station response status codes.

Response example

The response example is as follows:

{
    "content": {
        "channelId": "ls-20250814******-zTwK2",
        "channelStatus": "PUBLISHING",
        "snapshot": {
            "snapshotId": 7526,
            "snapshotUrl": "https://*************.edge.naverncp.com/dvr/snapshot/1755508932161/als-nmssenc02/l6f07uzuaex2hriziguozw291avx4xqfrf6k/480p-16-9/7526-1755505332161.m3u8",
            "createdTime": 1755505332161,
            "expireTime": 1755508932161,
            "duration": 8
        }
    }
}