All Products
Search
Document Center

ApsaraVideo VOD:SubmitSnapshotJob

Last Updated:Jul 21, 2026

Submits a video snapshot job to start asynchronous snapshot processing.

Operation description

  • This is an asynchronous operation. After you submit a task, the task ID is returned (the task is not yet complete and enters a queue for asynchronous execution). The final result is sent through a callback notification. You can also proactively query the task status by calling Get task details.

  • Only JPG images are supported.

  • When the snapshot is complete, an event notification of Video snapshot complete with EventType=SnapshotComplete and SubType=SpecifiedTime is sent.

QPS limit

The QPS limit for a single user on this operation is 30 calls per second. If this limit is exceeded, the API call is throttled, which may affect your business. Call this operation appropriately. For more information, see QPS limit.

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 video ID. You can obtain the video ID by using one of the following methods:

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

  • Obtain the video ID from the value of the VideoId response parameter when you call the CreateUploadVideo operation to obtain the upload URL and credential.

  • After the video is uploaded, call the SearchMedia operation to query the video ID, which is the value of the VideoId response parameter.

d3e680e618708efbf2cae7cc9312****

SpecifiedOffsetTime

integer

No

The start time for the snapshot.

  • Unit: milliseconds.

  • Default value: 0.

0

Width

string

No

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

1280

Height

string

No

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

720

Count

integer

No

The maximum number of snapshots. Default value: 1.

1

Interval

integer

No

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

  • Unit: seconds.

  • Default value: 1.

  • If Interval is set to 0, snapshots are evenly captured based on the value of Count and the video duration.

1

SpriteSnapshotConfig

string

No

The sprite configuration. If this parameter is not empty, 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 snapshot template ID.

  • We recommend that you create a snapshot template first and then pass the snapshot template ID. For more information about how to create a snapshot template, see Add a snapshot template.

  • If you pass the snapshot template ID, all request parameters except Action and VideoId are ignored.

f5b228fe693bf55bd87b789****

UserData

string

No

The custom settings. Only JSON strings are supported. You can use this parameter to pass through custom data and specify callback URL settings. For more information about the parameter structure, see UserData.

Note

To use the message callback in this parameter, configure the HTTP callback URL and select the corresponding callback event types 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 at which snapshots are captured. Unit: milliseconds. You can specify up to 30 points in time at a time.

integer

No

The custom point in time. Unit: milliseconds.

1000

ReferenceId

string

No

The custom ID. Only lowercase letters, uppercase letters, digits, hyphens, and underscores are supported. Length: 6 to 64 characters. The value must be unique at the user level.

123-123

Note

You must specify at least one of Count and Interval. If both are specified, the smaller number of snapshots prevails.

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

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

SnapshotJob

object

The snapshot job information.

JobId

string

The snapshot job ID.

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.