SubmitSmartClipTask

Updated at:

Submits a one-click video editing task.

Try it now

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After the call succeeds, OpenAPI Explorer can automatically generate SDK code examples.

Try it now

Authorization information

The following table describes the authorization information of the API. You can use it in the Action element of a RAM permission policy statement to grant RAM users or RAM roles the permission to call this API. For more information, see the following:

  • Action: the specific permission point.

  • Access level: the access level of each operation. Valid values: Write, Read, or List.

  • Resource type: the resource types that support authorization in the operation. For more information, see the following:

    • Required resource types are marked with a leading *.
    • For operations that do not support resource-level authorization, All resources is used.
  • Condition key: the condition keys defined by the cloud service itself.

  • Dependent action: the other permissions required to successfully perform the operation. The caller must have the permissions of the dependent actions at the same time for the operation to succeed.

ActionAccess levelResource typeCondition keyDependent action
aimiaobi:SubmitSmartClipTaskcreate
*All resources
*
    None
None

Request parameters

NameTypeRequiredDescriptionExample value
WorkspaceIdstringYes

The unique identifier of an Alibaba Cloud Model Studio workspace: obtain the Workspace ID

Workspace ID
InputConfigobjectYes

Input configuration.

VideoIdsarray<object>Yes

List of video material ID objects.

objectNo

Material ID object.

TypestringYes

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

fileKey
IdstringYes

Material ID.

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

List of titles.

stringNo

Title.

Video title
BackgroundMusicsarray<object>No

List of background music IDs.

objectNo

Background music ID object.

TypestringYes

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

fileKey
IdstringYes

Background music ID.

oss://default/bucket-name/filepath/video.mp3
Stickersarray<object>No

List of stickers.

objectNo

Sticker object.

XdoubleYes

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

0.5
YdoubleYes

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

0.5
WidthdoubleYes

Width of the sticker.

0.5
HeightdoubleYes

Height of the sticker.

0.5
StickerIdobjectYes

Sticker ID.

TypestringYes

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

fileKey
IdstringYes

Sticker ID.

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

List of voiceover script texts.

stringNo

Voiceover script text.

Hello everyone, welcome to my channel xxx
OutputConfigobjectNo

Output configuration.

FileNamestringNo

Output file name. Must include {index}.

test_{index}.mp4
WidthintegerNo

Output video width.

1920
HeightintegerNo

Output video height.

1080
CountintegerNo

Number of output videos.

1
MaxDurationintegerNo

Maximum duration of the output video, in seconds.

120
SaveToGeneratedContentbooleanNo

Specifies whether to save the video to Content Management.

true
EditingConfigobjectNo

Video editing configuration.

TitleConfigobjectNo

Title configuration.

XfloatNo

Horizontal distance from the top-left corner of the banner text to the top-left corner of the output video. Note: 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
YfloatNo

Vertical distance from the top-left corner of the banner text to the top-left corner of the output video. Note: 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
TimelineInfloatNo

Time when the title appears.

2
TimelineOutfloatNo

Time when the title disappears.

3
AlignmentstringNo

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
MediaConfigobjectNo

Media configuration.

VolumedoubleNo

Volume of the video material (0: mute).

SpeechConfigobjectNo

Voiceover configuration.

VolumedoubleNo

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

0.5
VoicestringNo

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

StylestringNo

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

SpeechRatedoubleNo

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].

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 For speeds less than 1×, use the 0.002 coefficient. For speeds greater than 1×, use the 0.001 coefficient. The actual algorithm result is approximated.

0
AsrConfigobjectNo

Caption parameter configuration.

XfloatNo

Horizontal distance from the top-left corner of the caption text to the top-left corner of the output video. Note: 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.

YfloatNo

Vertical distance from the top-left corner of the caption text to the top-left corner of the output video. Note: 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.

AlignmentstringNo

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.

FontstringNo

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

SimSun
FontColorstringNo

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

#ffffff
FontSizestringNo

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
SpacingstringNo

Letter spacing of the banner text. Unit: pixels.

0
BackgroundMusicConfigobjectNo

Background music configuration.

VolumedoubleNo

Volume of the background music. Valid values: [0, 10.0].

0.2
StylestringNo

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

ExtendParamstringNo

Other extended parameters (merged with inputConfig, outputConfig, and editingConfig).

Response elements

NameTypeDescriptionExample value
object

PlainResult

Codestring

The status code.

NoData
Dataobject

The result of the task submission.

TaskIdstring

The task ID.

3f7045e099474ba28ceca1b4eb6d6e21
HttpStatusCodeinteger

The HTTP status code.

200
Messagestring

The error message.

success
RequestIdstring

The unique ID of the request.

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

Indicates whether the request was successful. true: success. false: 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

Visit the Error Center to view more error codes.