SubmitSmartClipTask

Updated at:

Submits a one-click video editing task.

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.

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

aimiaobi:SubmitSmartClipTask

create

*All Resource

*

NoneNone

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

WorkspaceId

string

Yes

Alibaba Cloud Model Studio workspace ID. For more information, see workspace ID.

业务空间ID

InputConfig

object

Yes

Input configuration.

VideoIds

array<object>

Yes

List of video material ID objects.

object

No

Material ID object.

Type

string

Yes

ID type: materialId: Material Library reference ID fileKey: FileKey in Alibaba Cloud Model Studio url: Publicly accessible URL

fileKey

Id

string

Yes

Material ID.

oss://default/bucket-name/filepath/video.mp4

Titles

array

No

List of titles.

string

No

Title.

视频标题

BackgroundMusics

array<object>

No

List of background music IDs.

object

No

Background music ID object.

Type

string

Yes

ID type: materialId: Material Library reference ID fileKey: FileKey in Alibaba Cloud Model Studio url: Publicly accessible URL

fileKey

Id

string

Yes

Background music ID.

oss://default/bucket-name/filepath/video.mp3

Stickers

array<object>

No

List of stickers.

array<object>

No

Sticker object.

X

number

Yes

X coordinate of the top-left corner of the sticker.

0.5

Y

number

Yes

Y coordinate of the top-left corner of the sticker.

0.5

Width

number

Yes

Width of the sticker.

0.5

Height

number

Yes

Height of the sticker.

0.5

StickerId

object

Yes

Sticker ID.

Type

string

Yes

ID type: materialId: Material Library reference ID fileKey: FileKey in Alibaba Cloud Model Studio url: Publicly accessible URL

fileKey

Id

string

Yes

Sticker ID.

oss://default/bucket-name/filepath/sticker.png

SpeechTexts

array

No

List of voiceover script texts.

string

No

Voiceover script text.

大家好,欢迎来到我的频道xxx

OutputConfig

object

No

Output configuration.

FileName

string

No

Output file name. Must include {index}.

test_{index}.mp4

Width

integer

No

Output video width.

1920

Height

integer

No

Output video height.

1080

Count

integer

No

Number of output videos.

1

MaxDuration

integer

No

Maximum duration of the output video, in seconds.

120

SaveToGeneratedContent

boolean

No

Save to Content Management.

true

EditingConfig

object

No

Video editing configuration.

TitleConfig

object

No

Title configuration.

X

number

No

Horizontal distance from the top-left corner of the banner text to the top-left corner of the output video. You can specify this value as a percentage or in pixels. If the value is between 0 and 0.9999, it represents a percentage of the output video width. If the value is an integer greater than or equal to 2, it represents an absolute pixel value. Default value: 0. This coordinate scales based on the source material size and the final output size.

100

Y

number

No

Vertical distance from the top-left corner of the banner text to the top-left corner of the output video. You can specify this value as a percentage or in pixels. If the value is between 0 and 0.9999, it represents a percentage of the output video height. If the value is an integer greater than or equal to 2, it represents an absolute pixel value. Default value: 0. This coordinate scales based on the source material size and the final output size.

100

TimelineIn

number

No

Time when the title appears.

2

TimelineOut

number

No

Time when the title disappears.

3

Alignment

string

No

TopLeft: Top-left corner of the video. TopCenter: Top center of the vertical axis of the video. TopRight: Top-right corner of the video. CenterLeft: Left side of the horizontal center line of the video. CenterCenter: Center of the video. CenterRight: Right side of the horizontal center line of the video. BottomLeft: Bottom-left corner of the video. BottomCenter: Bottom center of the vertical axis of the video. BottomRight: Bottom-right corner of the video.

TopLeft

MediaConfig

object

No

Media configuration.

Volume

number

No

Volume of the video material. 0 means mute.

SpeechConfig

object

No

Voiceover configuration.

Volume

number

No

Volume of the voiceover audio. Default value: 1. Valid values: 0 to 10.0. Decimal values are supported. Example: 0.5.

0.5

Voice

string

No

Specify one or more voice styles for the voiceover, separated by commas. When multiple voices are specified, one is randomly selected for synthesis. For available voice styles, see Smart Voice Effect Examples. Example: "zhimiao_emo,zhilun".

Style

string

No

Voiceover style. Default value: empty. If both Voice and Style are specified, Voice takes precedence. Gentle: Gentle Serious: Serious Entertainment: Entertainment

SpeechRate

number

No

Speech rate of the voiceover script. Valid values: -500 to 500. Default value: 0. The corresponding playback speed multipliers for [-500, 0, 500] are [0.5, 1.0, 2.0]. Calculation method: For 0.8× speed: (1 - 1/0.8) / 0.002 = -125 For 1.2× speed: (1 - 1/1.2) / 0.001 = 166 Use coefficient 0.002 for speeds less than 1×. Use coefficient 0.001 for speeds greater than 1×. Round the result to the nearest integer.

The calculation method is as follows:
0.8× speed: (1 − 1/0.8)/0.002 = −125
1.2× speed: (1 − 1/1.2)/0.001 = 166
When the speed is less than 1×, use a coefficient of 0.002.
When the speed is greater than 1×, use a coefficient of 0.001.
The actual algorithm result is approximated.

0

AsrConfig

object

No

Caption parameter configuration.

X

number

No

Horizontal distance from the top-left corner of the caption text to the top-left corner of the output video. You can specify this value as a percentage or in pixels. If the value is between 0 and 0.9999, it represents a percentage of the output video width. If the value is an integer greater than or equal to 2, it represents an absolute pixel value. Default value: 0. This coordinate scales based on the source material size and the final output size.

Y

number

No

Vertical distance from the top-left corner of the caption text to the top-left corner of the output video. You can specify this value as a percentage or in pixels. If the value is between 0 and 0.9999, it represents a percentage of the output video height. If the value is an integer greater than or equal to 2, it represents an absolute pixel value. Default value: 0. This coordinate scales based on the source material size and the final output size.

Alignment

string

No

Caption alignment. TopLeft: Top-left corner of the video. TopCenter: Top center of the vertical axis of the video. TopRight: Top-right corner of the video. CenterLeft: Left side of the horizontal center line of the video. CenterCenter: Center of the video. CenterRight: Right side of the horizontal center line of the video. BottomLeft: Bottom-left corner of the video. BottomCenter: Bottom center of the vertical axis of the video. BottomRight: Bottom-right corner of the video.

Font

string

No

Font of the caption text. For supported fonts, see the font list. Default font: SimSun.

SimSun

FontColor

string

No

Color of the caption text. Format: # followed by a hexadecimal value. Example: #ffffff.

#ffffff

FontSize

string

No

Font size of the caption text. This size scales based on the source material size and the final output size. Default value: 0. Maximum value: 5000.

0

Spacing

string

No

Letter spacing of the caption text, in pixels.

0

BackgroundMusicConfig

object

No

Background music configuration.

Volume

number

No

Volume of the background music. Valid values: 0 to 10.0.

0.2

Style

string

No

Background music style. Default value: empty. If background music is already configured in InputConfig, this field does not take effect. Valid values: bgm-beauty: Fashion bgm-chinese-style: Chinese style bgm-cuisine: Food bgm-dynamic: Dynamic bgm-quirky: Quirky bgm-relaxing: Relaxing bgm-romantic: Romantic bgm-upbeat: Upbeat

ExtendParam

string

No

Additional extended parameters. These parameters merge with InputConfig, OutputConfig, and EditingConfig.

Response elements

Element

Type

Description

Example

object

PlainResult

Code

string

The status code.

NoData

Data

object

The result of the task submission.

TaskId

string

The task ID.

3f7045e099474ba28ceca1b4eb6d6e21

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The error message.

success

RequestId

string

The unique ID of the request.

1813ceee-7fe5-41b4-87e5-982a4d18cca5

Success

boolean

Indicates whether the request was successful. true indicates success. false indicates failure.

true

Examples

Success response

JSON format

{
  "Code": "NoData",
  "Data": {
    "TaskId": "3f7045e099474ba28ceca1b4eb6d6e21"
  },
  "HttpStatusCode": 200,
  "Message": "success",
  "RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.