Generates video clip scripts using AI.
Try it now
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After the run succeeds, OpenAPI Explorer can automatically generate SDK code examples.
Debug
RAM authorization
The following table describes the authorization information for this API. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles the permission to call this API. Details are as follows:
- Action: refers to the specific permission point.
- Access level: refers to the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: refers to the resource types that support authorization in the operation. Details are as follows:
- For required resource types, an asterisk (*) is prefixed.
- For operations that do not support resource-level authorization,
全部资源is used.
- Condition key: refers to the condition keys defined by the cloud service itself.
- Dependent action: refers to the other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:RunVideoScriptGenerate | create | *All resources * |
| None |
Request syntax
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| WorkspaceId | string | Yes | Unique identifier of the Alibaba Cloud Model Studio workspace: Get a Workspace ID | llm-xx |
| Prompt | string | Yes | The prompt for the video script. | Write a script about Huangshan tourism |
| UseSearch | boolean | No | Specifies whether to use internet search. If you set this to true, the system performs intent recognition and then searches the internet for relevant reference materials. | true |
| ScriptLength | string | No | The length of the script. Valid values: 20~75: 10~15s of normal speaking time. 75~150: 15~30s of normal speaking time. 150~300: approximately 30~60s of normal speaking time. >=300: 60s or more of normal speaking time. | >=300 |
| Language | string | No | The language of the generated script: recommended values: zh-CN: Chinese en-US: English Chinese is used by default. | en-US |
| ScriptNumber | integer | No | The number of scripts to generate. The default is 1, and up to three scripts can be generated at a time. If multiple scripts are specified, the results of multiple script generation tasks are returned in parallel streams. (The client distinguishes them by session ID.) | 2 |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| Header | object | The response header. | |
| ErrorCode | string | The error code. | ScriptNumberExceed |
| ErrorMessage | string | The error message returned when the call fails. | The number of scripts exceeds the limit. |
| Event | string | The event name. | result-generated |
| SessionId | string | The session ID. | 3f7045e099474ba28ceca1b4eb6d6e21 |
| StatusCode | integer | The status code. | 400 |
| TaskId | string | The task ID. | b057f2fa-2277-477b-babf-cbc062307828 |
| TraceId | string | The trace ID. | 2150451a17191950923411783e2927 |
| Payload | object | The response body. | |
| Output | object | The output content object. | |
| Text | string | The text generation result. | Hello everyone, I'm [xxx]. Today I'll take you to Mount Huangshan to experience the stunning scenery of peculiar pines, bizarre rocks, sea of clouds, and hot springs. First stop, the Greeting Pine, with 800 years of history, its branches stretching like arms to warmly welcome every visitor. Next, climb to Bright Summit for a 360-degree panoramic view. Then explore the West Sea Grand Canyon and experience the awe of pristine nature. Finally, relax in the hot springs and enjoy the beauty of the journey. I hope this trip leaves you with unforgettable memories. I'm [your name], thanks for watching, see you next time!","91522b25a4f440189320c9ede8ae6c85":"Hello everyone, I'm [your name]. Today let's explore the wonderful journey of Mount Huangshan. First, we'll see the symbol of Huangshan—the Greeting Pine—and feel its 800 years of history and welcome. Then climb to Bright Summit to greet the magnificent sunrise; stroll through the West Sea Grand Canyon to experience its rugged beauty; finally, relax in the hot springs. I hope this trip makes you fall in love with Huangshan. Thanks for watching!","1c23af4a899e4b908bdcffa7d8d0ddc9":"Hello everyone, welcome to Mount Huangshan! It's famous for the Four Wonders: peculiar pines, bizarre rocks, sea of clouds, and hot springs. Start from Cloud Valley Temple to feel the ancient atmosphere; challenge the Hundred-Step Cloud Ladder to experience the fun of climbing; stroll through the West Sea Grand Canyon to take in the magnificent scenery; finally, greet the sunrise at Jade Screen Pavilion and enjoy the peace of mind. I hope this trip leaves you with wonderful memories! |
| Usage | object | The token usage. | |
| InputTokens | long | The number of tokens used for the input. | 100 |
| OutputTokens | long | The number of tokens used for the output. | 100 |
| TotalTokens | long | The total number of tokens. | 200 |
| RequestId | string | The unique ID of the request. This field is returned when the | F2F366D6-E9FE-1006-BB70-2C650896AAB5 |
| HttpStatusCode | string | The HTTP status code. This field is returned when the | 403 |
| Code | string | The status code. A value of 200 indicates a normal response. This field is returned when the | NoPermission |
| Message | string | The error description. This field is returned when the | You are not authorized to perform this action. |
| Success | boolean | Indicates whether the call is successful. | false |
Examples
Success response
JSON format
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | NoPermission | You are not authorized to perform this action. | Please check the workspaceId assignment |