All Products
Search
Document Center

ApsaraVideo VOD:SubmitSnapshotJob

Last Updated:Dec 09, 2025

Call this operation to submit a video snapshot job for asynchronous processing.

Operation description

  • Only JPG images are supported.

  • After the snapshot job is complete, a SnapshotComplete event notification is generated. The event type is EventType=SnapshotComplete and the subtype is SubType=SpecifiedTime.

QPS limits

The queries per second (QPS) limit for a single user on this operation is 30 calls per second. If you exceed this limit, API calls are throttled, which may affect your business. For more information, see QPS limits.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vod:SubmitSnapshotJob

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

VideoId

string

No

The ID of the video. You can obtain the video ID in one of the following ways:

  • For videos uploaded to the ApsaraVideo VOD console, log on to the console and choose Media Assets > Audio/Video to view the video ID.

  • When you call the CreateUploadVideo operation to obtain an upload URL and credential, the video ID is the value of the VideoId parameter in the response.

  • After a video is uploaded, you can call the SearchMedia operation to query the video ID. The video ID is the value of the VideoId parameter in the response.

d3e680e618708efbf2cae7cc9312****

SpecifiedOffsetTime

integer

No

The start time of the snapshot.

  • Unit: milliseconds.

  • Default value: 0.

0

Width

string

No

The width of the snapshot. Valid values: [8,4096]. The default value is the width of the source video. Unit: px.

1280

Height

string

No

The height of the snapshot. Valid values: [8,4096]. The default value is the height of the source video. Unit: px.

720

Count

integer

No

The maximum number of snapshots. Default value: 1.

1

Interval

integer

No

The interval between snapshots. The value must be greater than or equal to 0.

  • Unit: seconds.

  • Default value: 1.

  • If you set Interval to 0, snapshots are captured at equal intervals based on the video duration and the value of Count.

1

SpriteSnapshotConfig

string

No

The configurations for generating a sprite. If you specify this parameter, a sprite is generated. For more information about the parameter structure, see SpriteSnapshotConfig.

{'CellWidth': 120, 'CellHeight': 68, 'Columns': 3,'Lines': 10, 'Padding': 20, 'Margin': 50}

SnapshotTemplateId

string

No

The ID of the snapshot template. You can create a snapshot template and specify its ID to configure the snapshot job. For more information about how to create a snapshot template, see AddVodTemplate.

  • If you specify a snapshot template ID, all other request parameters except Action and VideoId are ignored.

  • If you specify a snapshot template ID, the template parameters override other request parameters with the same name.

f5b228fe693bf55bd87b789****

UserData

string

No

Custom settings. This parameter must be a JSON string. It supports custom data pass-through and webhook address settings. For more information about the parameter structure, see UserData.

Note

To use the message callback feature in this parameter, configure an HTTP webhook address and select the corresponding event type in the console. Otherwise, the callback settings do not take effect.

{"MessageCallback":{"CallbackURL":"http://.example.aliyundoc.com"},"Extend":{"localId":"xxx","example":"www"}}

SpecifiedOffsetTimes

array

No

The points in time when you want to capture snapshots. Unit: milliseconds. You can specify up to 30 points in time.

integer

No

A custom point in time. Unit: milliseconds.

1000

ReferenceId

string

No

A custom ID. The ID can contain only lowercase letters, uppercase letters, digits, hyphens (-), and underscores (_). The ID must be 6 to 64 characters in length. The ID must be unique for each user.

123-123

Note

Specify at least one of the Count and Interval parameters. If you specify both parameters, the one that results in a smaller number of snapshots takes precedence.

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The ID of the request.

25818875-5F78-5EB0-4AF6-D7393642****

SnapshotJob

object

The information about the snapshot job.

JobId

string

The ID of the snapshot job.

ad90a501b1b94b72374ad0050464****

Examples

Success response

JSON format

{
  "RequestId": "25818875-5F78-5EB0-4AF6-D7393642****",
  "SnapshotJob": {
    "JobId": "ad90a501b1b94b72374ad0050464****"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.