SubmitSmartClipTask
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.
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 resourcesis 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.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:SubmitSmartClipTask | create | *All resources * |
| None |
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| WorkspaceId | string | Yes | The unique identifier of an Alibaba Cloud Model Studio workspace: obtain the Workspace ID | Workspace 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. | Video 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. | |
| object | No | Sticker object. | ||
| X | double | Yes | X coordinate of the top-left corner of the sticker. | 0.5 |
| Y | double | Yes | Y coordinate of the top-left corner of the sticker. | 0.5 |
| Width | double | Yes | Width of the sticker. | 0.5 |
| Height | double | 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. | Hello everyone, welcome to my channel 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 | Specifies whether to save the video to Content Management. | true |
| EditingConfig | object | No | Video editing configuration. | |
| TitleConfig | object | No | Title configuration. | |
| X | float | No | 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 |
| Y | float | No | 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 |
| TimelineIn | float | No | Time when the title appears. | 2 |
| TimelineOut | float | 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 | double | No | Volume of the video material (0: mute). | |
| SpeechConfig | object | No | Voiceover configuration. | |
| Volume | double | No | Volume of the voiceover audio. Default value: 1. Valid values: [0, 10.0]. Decimal values are supported. Example: 0.5. | 0.5 |
| Voice | string | No | 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". | |
| 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 | double | 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]. 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 |
| AsrConfig | object | No | Caption parameter configuration. | |
| X | float | No | 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. | |
| Y | float | No | 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. | |
| 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 banner text. Unit: pixels. | 0 |
| BackgroundMusicConfig | object | No | Background music configuration. | |
| Volume | double | No | Volume of the background music. Valid values: [0, 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 | Other extended parameters (merged with inputConfig, outputConfig, and editingConfig). |
Response elements
| Name | Type | Description | Example value |
|---|---|---|---|
| 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: 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.