SubmitVideoDetectShotTask
Lightweight Application: Asynchronous Video Splitting Task To use the free video splitting feature, you must activate Media and Entertainment Video Understanding: https://bailian.console.aliyun.com/cn-beijing/?tab=app#/app/app-market/quanmiao/video-comprehend The video splitting feature supports video processing for the following three scenarios: 1. Program scenario 2. News scenario 3. Other scenarios For more information, including detailed usage recommendations and sample prompts, see the Additional Information section below.
Debug
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table describes the authorization information for this API. You can use it in the Action element of RAM permission policy statements to grant RAM users or RAM roles the permission to call this API. Details are as follows:
-
Operation: 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 for the operation. Details are as follows:
- Required resource types are prefixed with an asterisk (*).
- For operations that do not support resource-level authorization, All Resources is used.
-
Condition key: the condition keys defined by the cloud service itself.
-
Related operation: other permissions required for the operation to succeed. The caller must also have the permissions of the related operations for the operation to succeed.
| Operation | Access level | Resource type | Condition key | Related operation |
|---|---|---|---|---|
| quanmiaolightapp:SubmitVideoDetectShotTask | create | *All Resources * |
| None |
Request syntax
POST /{workspaceId}/quanmiao/lightapp/submitVideoDetectShotTask HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| workspaceId | string | Yes | Unique identifier of the Model Studio workspace: Get workspaceId | llm-xxx |
| videoUrl | string | Yes | The URL of the video | https://xxx.mp4 |
| modelId | string | No | The LLM model. Options:
| |
| options | array | No | The method the user selects for shot detection. Options: ASR | |
| string | No | ASR | ASR | |
| deduplicationId | string | No | Deduplication field: you can define your own unique business identifier based on business needs and scenarios. For duplicate data in this field, the system ensures that duplicate submissions are not allowed for at least 72 hours | 1 |
| prompt | string | No | User-defined prompt for the LLM | xxx |
| taskId | string | No | Unique task identifier | a3d1c2ac-f086-4a21-9069-f5631542f5a2 |
| originalSessionId | string | No | Unique identifier of the source task: to rerun a subtask (specified by the generateOptions field) based on a historical task, you can pass the taskId and originalSessionId of the historical task. The backend will load the data generated by the historical task and skip the preceding steps to improve generation efficiency. If the backend data is too old, for example older than 7 days, and the query fails, the dependent subtasks will be rerun by default. | a3d1c2ac-f086-4a21-9069-f5631542f5ax |
| modelCustomPromptTemplateId | string | No | ID of the prompt used by the LLM to generate video splitting results | videoDetectShotShowPrompt |
| modelVlCustomPromptTemplateId | string | No | ID of the VL recognition prompt | videoDetectShotVlShowPrompt |
| recognitionOptions | array | No | The method the user selects for content recognition for each shot. Options: ASR, OCR, VL. Multiple selections are allowed | |
| string | No | ASR | ASR | |
| intelliSimpPromptTemplateId | string | No | Prompt ID for pre-simplifying the input for the large language model | intelliSimpShowPrompt |
| preModelId | string | No | The model that runs intelliSimpPrompt. quanmiao-llm-max is recommended. Options:
| quanmiao-llm-max |
| intelliSimpPrompt | string | No | User-defined prompt for simplifying the data input to the LLM | xxx |
| vlPrompt | string | No | User-defined prompt for the VL model | xxx |
| language | string | No | Speech recognition language: chinese: Chinese (default) french: French english: English japanese: Japanese chineseEnglishFreely: free speech in Chinese and English arabic: Arabic korean: Korean malay: Malay thai: Thai portuguese: Portuguese spanish: Spanish indonesian: Indonesian vietnamese: Vietnamese | chinese |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| requestId | string | Id of the request | 117F5ABE-CF02-5502-9A3F-E56BC9081A64 |
| success | boolean | Whether the operation is successful: true for success, false for failure | True |
| code | string | Status code | xx |
| message | string | Error description | success |
| httpStatusCode | integer | HTTP status code | 200 |
| data | object | Result | |
| taskId | string | Unique task identifier | 22ec888712de45b39b97983f8d166831 |
Examples
Success response example
JSON format
{
"requestId": "117F5ABE-CF02-5502-9A3F-E56BC9081A64",
"success": true,
"code": "xx",
"message": "success",
"httpStatusCode": 200,
"data": {
"taskId": "22ec888712de45b39b97983f8d166831"
}
}
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | NoPermission | You are not authorized to perform this action , Please check the assignment of the workspaceId. | Check the assignment of the workspaceId. |
Visit the Error Center to view more error codes.
Change history
| Change time | Change summary | Operation |
|---|---|---|
| 2025-10-20 | New OpenAPI | View change details |
Currently, video splitting supports processing videos in three scenarios:
- Program scenario 2. News scenario 3. Other scenarios
For program scenario videos: ASR shot detection is recommended, with ASR+VL for video recognition; for modelVlCustomPromptTemplateId, the program VL template (videoDetectShotVlShowPrompt) is recommended, or you can define a custom prompt through the vlPrompt field; for modelCustomPromptTemplateId, the program template (videoDetectShotShowPrompt) is recommended, or you can customize it through the prompt field; it is recommended to enable the LLM input text simplification feature (using intelliSimpPromptTemplateId or intelliSimpPrompt); when intelliSimpPromptTemplateId is set to intelliSimpShowPrompt, modelCustomPromptTemplateId should use videoDetectShotShowPrompt; when intelliSimpPromptTemplateId is set to intelliSimpSecondShowPrompt, modelCustomPromptTemplateId should use videoDetectShotSecondShowPrompt; for preModelId, quanmiao-llm-max is recommended;
For news scenario videos: News videos usually have standard and clear audio. It is recommended to select only ASR when recognizing video content and use ASR shot detection; if VL is enabled (not recommended), for modelVlCustomPromptTemplateId the news VL template videoDetectShotVlNewsPrompt is recommended, or you can define a custom prompt through the vlPrompt field; for modelCustomPromptTemplateId, the news template (videoDetectShotNewsPrompt) is recommended, or you can customize it through the prompt field; for preModelId, quanmiao-llm-max is recommended;
For videos in other scenarios: If the audio is clear and covers the main information of the video, it is recommended to first try ASR shot detection and select ASR for video recognition. If the video itself contains little information or little information is obtained in the video recognition step, it is recommended to first try not using intelliSimpPromptTemplateId and intelliSimpPrompt;
If you want to customize prompts, refer to the following sample templates:
- name: videoDetectShotNewsPrompt
# Role
You are a professional news merging assistant. Process the task of merging the given multiple ordered news segments according to the following requirements
Core capabilities: accurately merging information based on news topics + strictly following time annotations + intelligent title extraction
You must output strictly in the given output format
# Input data format:
Time interval: [start time]-[end time], content of the current time segment: [X], speaker id: [Y]
(speaker id is the id of the person currently speaking)
# Task execution steps:
0. Preprocessing:
Read through the full text, connect the context, and understand the meaning and topic of each news segment.
1. Compare two news segments:
First look at the first news segment and the second news segment, and determine whether they can be merged into one segment.
If they can be merged, go to step 2; otherwise, go to step 3.
2. If they can be merged:
Merge the two segments into a new segment.
The start time of the new segment is the start time of the first segment.
The end time of the new segment is the end time of the second segment.
Then, continue to compare this newly merged segment with the next segment, and repeat step 1.
3. If they cannot be merged:
Treat the first segment alone as an independent news segment.
The start time of this independent segment remains unchanged.
The end time is the start time of the second segment minus one second.
Then, continue with the second segment to compare with the next segment, and repeat step 1.
# Merge criteria (merge if at least one is met):
- The two segments belong to the same news topic
- Whether the two segments belong to the same topic cannot be determined, but based on the given information, no conflict exists after merging
# Sorting logic:
Maintain the original chronological order
# Input example:
Time interval: 00:00:04-00:00:26, content of the current time segment: First let's look at the weather, speaker id: 1
Time interval: 00:00:28-00:00:45, content of the current time segment: xxxx, speaker id: 2
Time interval: 00:00:46-00:00:55, content of the current time segment: Sports news, speaker id: 1
# Output format requirements:
## Output example:
```json
{
"results": [
{
"startTime":"00:00:04",
"endTime":"00:00:26",
"title":"Weather forecast",
"summary":"Beijing's weather forecast for today"
},
{
"startTime":"00:00:27",
"endTime":"00:00:45",
"title":"International news",
"summary":"Content of international news"
}
]
}
```
## Output data content requirements:
startTime: start time, in HH:mm:ss format
endTime: end time, in HH:mm:ss format
title: entry title, a concise summary of the main event of the current entry
summary: entry description, summarizing the core content of the current entry
# Now process the following input data:
{query}
- name: videoDetectShotShowPrompt
### **Ideal output result**
Each program is in its own interval, and the hosting content between programs is also in its own interval
### **Task requirements**
You are a live program director. Based on the content of the input time intervals:
1. **Merge consecutive intervals of the same program** (same content/topic)
2. **Identify transition parts and handle them separately**
3. Generate a title and description for each final interval
4. Merge consecutive non-program content of the same topic such as transitions and advertisements into one time interval
**Core rules**:
1. Title rules:
- Program content: reflect the core topic (such as "Sports news")
- Transition content: uniformly named "Transition"
- Fabricating program names that are not mentioned is prohibited
2. Merge rules:
- Program hosting, advertisements, and other transition content between programs must be merged into one interval if consecutive. Note: if any two of the above three types of content appear consecutively, they must be merged
- Consecutive intervals whose content belongs to the same program must be merged into one interval
- Merging content of different programs is prohibited
- Transitions must not be merged with program content
- A time interval without specific content must be merged with the previous time interval, but the transition part must be in its own interval (for example: transition hosting)
3. Content summarization rules:
- Use 1 concise sentence to summarize the core content (no more than 20 characters)
- For multi-element content, focus on the most core topic
- Avoid repeatedly describing similar content
- Ensure the content is self-contained and does not depend on other intervals
4. Transition identification: host links between programs and transitions without specific content are treated as transitions
**Output format**:
```json
{
"results": [
{
"startTime": "HH:mm:ss",
"endTime": "HH:mm:ss",
"title": "Title",
"summary": "Description"
}
]
}
Processing flow:
Scan the time intervals in order
Merge the intervals that meet the criteria according to the rules above
For each final interval:
Identify whether it is a transition → yes: title = "Transition"
Not a transition → extract the core topic as the title
Use 1 sentence to summarize the core content
### <strong>Sorting rules</strong>
- Arrange in chronological order, maintaining the original order of the input.
### <strong>Input example</strong>
```
Time interval: 00:00:04-00:00:26, content of the current time segment: First let's look at the weather, speaker id: 1
Time interval: 00:00:28-00:00:45, content of the current time segment: Next is international news. Today's main events include..., speaker id: 2
Time interval: 00:00:46-00:00:55, content of the current time segment: Sports news. The latest match results are as follows..., speaker id: 1
```
### <strong>Output format</strong>
```json
{
"results": [
{
"startTime": "HH:mm:ss", // start time
"endTime": "HH:mm:ss", // end time
"title": "Entry title", // concisely summarize the topic of the current entry
"summary": "Entry description" // summary of the core content
}
]
}
```
### <strong>Output example</strong>
```json
{
"results": [
{
"startTime": "00:00:04",
"endTime": "00:00:26",
"title": "Weather forecast",
"summary": "Introduces Beijing's weather for the day."
},
{
"startTime": "00:00:28",
"endTime": "00:00:45",
"title": "International news",
"summary": "Reports today's major international events."
},
{
"startTime": "00:00:46",
"endTime": "00:00:55",
"title": "Sports news",
"summary": "Updates the results of the latest sports events."
}
]
}
```
### <strong>Please process the following input data</strong>
{query}
- name: videoDetectShotSecondShowPrompt
### <strong>Ideal output result</strong>
Each program is in its own interval, and other content between programs is also in its own interval
### <strong>Task requirements</strong>
You are a live program director. Identify the content based on the input time intervals:
1. Identify what type of program the video belongs to, and what type the content other than programs belongs to (for example, advertisements, announcements, etc.)
2. Merge consecutive intervals of the same program (same content/topic) and intervals of other content besides programs (same content/topic)
3. For video intervals that belong to a program, extract the content and provide a summary; for intervals of other content that does not belong to a program (for example, advertisements and announcements), extract the content and summarize it into more concise information. For other content of the same type, if the content is short, it can be merged appropriately
4. For videos containing multiple program intervals, the different programs must be split, the content summarized and output one by one; for videos containing only one program, the program content must be extracted, then split according to the different content/topics within the program, and the content summarized and output one by one
5. Identify the start time and end time of each interval (accurate to the second), and generate a title, description, start time, and end time for each final interval
<strong>Core rules</strong>:
1. Title rules:
- Program content: reflect the core topic (such as "Sports news")
- Other content: name it based on a summary of the specific content, such as "Transition" or "Advertisement"
- Fabricating program names that are not mentioned is prohibited
2. Merge rules:
- Consecutive intervals of the same program must be merged
- Merging content of different programs is prohibited
- Other content must not be merged with program content
- The host's introduction to a program must not be merged with the program into one interval
- A time interval without specific content must be merged with the previous time interval, but the transition part must be in its own interval (for example: transition hosting)
3. Content summarization rules:
- Use 1 concise sentence to summarize the core content (no more than 20 characters)
- For multi-element content, focus on the most core topic
- Avoid repeatedly describing similar content
- Ensure the content is self-contained and does not depend on other intervals
4. Transition identification: host links between programs and transitions without specific content are treated as transitions
5. Interval identification: the start time and end time of an interval must be accurate to the second
6. The core task is to identify program content; for non-program content, it must be summarized and generalized
<strong>Output format</strong>:
```json
{
"results": [
{
"startTime": "HH:mm:ss",
"endTime": "HH:mm:ss",
"title": "Title",
"summary": "Description"
}
]
}
Processing flow:
Scan the time intervals in order
Merge consecutive intervals of the same content
For each final interval:
Identify whether it is a program → yes: title = extract the program content of this interval
Not a program → title: a summary of the specific content, such as transition, advertisement, etc.
Use 1 sentence to summarize the core content
### **Sorting rules**
- Arrange in chronological order, maintaining the original order of the input.
### **Input example**
```
Time interval: 00:00:04-00:00:26, content of the current time segment: First let's look at the weather, speaker id: 1
Time interval: 00:00:28-00:00:45, content of the current time segment: Next is international news. Today's main events include..., speaker id: 2
Time interval: 00:00:46-00:00:55, content of the current time segment: Sports news. The latest match results are as follows..., speaker id: 1
```
### **Output format**
```json
{
"results": [
{
"startTime": "HH:mm:ss", // start time
"endTime": "HH:mm:ss", // end time
"title": "Entry title", // concisely summarize the topic of the current entry
"summary": "Entry description" // summary of the core content
}
]
}
```
### **Output example**
```json
{
"results": [
{
"startTime": "00:00:04",
"endTime": "00:00:26",
"title": "Weather forecast",
"summary": "Introduces Beijing's weather for the day."
},
{
"startTime": "00:00:28",
"endTime": "00:00:45",
"title": "International news",
"summary": "Reports today's major international events."
},
{
"startTime": "00:00:46",
"endTime": "00:00:55",
"title": "Sports news",
"summary": "Updates the results of the latest sports events."
}
]
}
```
### **Please process the following input data**
{query}
- name: videoDetectShotVlNewsPrompt
# Task objective
Identify the visual information in a set of images.
# Output rules:
- If no information is recognized, just fill in "none". Fabricating visual information is prohibited. The language must be concise and fluent.
- Output strictly according to the given output example. Do not omit escape characters.
- The length of the output content must not exceed 100, highlighting the coherent story of this group of images.
# Output example:
\nxxx\n
- name: videoDetectShotVlShowPrompt
# Task objective
The current input is a set of frame-extracted images from a program. Identify the text in these images and the coherent plot of the images (if a program name exists, incorporate the program name into the recognized plot and output them together; if there is no program name, it does not need to be output. If a host appears and provides transition hosting between programs, it must be specifically noted in the output content)
# Output rules:
- If no information is recognized, just fill in "none". Fabricating visual information is prohibited. The language must be concise and fluent.
- Output strictly according to the given output example. Do not omit escape characters.
- The length of the output content must not exceed 100, highlighting the coherent story of this group of images.
- The recognized **character speech subtitles** must be output completely and without duplication, excluding watermarks and subtitles such as xx TV station.
- A program name specifically refers to the name of different segments, performances, etc. in a program. Do not recognize names similar to xx gala or xx column as program names. **Fabricating or creating program names is prohibited**.
- The output content must be the core plot of this group of images. Do not reverse the priorities.
# Output example with program name:
Program name: "Do Androids Dream of Electric Sheep?"
Subtitles: xxx
Plot: Bounty hunter Rick hunts down androids. To encourage the remaining population to emigrate, anyone who immigrates to an alien planet will be assigned an android to help with their life.
# Output example without program name:
Subtitles: xxx
Plot: Bounty hunter Rick hunts down androids. To encourage the remaining population to emigrate, anyone who immigrates to an alien planet will be assigned an android to help with their life.
# Host transition output example:
Subtitles: xxx
Plot [transition]: Bounty hunter Rick hunts down androids. To encourage the remaining population to emigrate, anyone who immigrates to an alien planet will be assigned an android to help with their life.
- name: intelliSimpShowPrompt
{text}
Role: You are a director of TV programs
Task objective: This is a textual summary of a program. Based on the context, simplify the text, highlight the key content, and keep the structure and time interval order unchanged
The ideal output result is that each program is in its own interval, the hosting content between programs is also in its own interval, and the hosting content between programs must not be merged with a program into one interval
Execution steps:
1. Read through the full text and understand the topic of each time interval in context. If both dialogue and subtitle content exist in the interval (content explicitly marked as "Subtitles:" in the input text, and the specific content is not "none", "no content", or similar), use the subtitle content to replace the dialogue
2. If the content of adjacent time intervals is relatively coherent and belongs to the same topic, merge them into one time interval. The merged time interval uses the earliest start time and the latest end time among them.
3. Simplify the content within the time intervals, but keep the current structure of the text unchanged
4. Intelligently verify the final generated result according to the given rules. If the generated result does not meet the rules, regenerate it (do not output the verification process, output only the final result).
Specific rules:
1. The start time of the earliest time interval in the final output must be 00:00:00, and the end time of the last time interval must be consistent with the end time of the last time interval in the original text.
2. The output format must be exactly the same as the original text, and no additional explanation or annotation may be added.
3. Processing only part of the time intervals is prohibited. All intervals must be processed before the final result is output.
4. Provided that the split time intervals meet all other conditions, merge as many intervals as possible.
5. Different programs, transition hosting, advertisements, etc. must not be merged into one time interval.
6. The accuracy of the times must be guaranteed.
Please process the text strictly according to the rules above. Do not output only a simplified example. The complete simplified result must be output.
- intelliSimpSecondShowPrompt
{text}
Role: You are a director of TV programs
Task objective: This is a textual summary of a program. Based on the context, simplify the text, highlight the key content, and keep the structure and time interval order unchanged
The ideal output result is: if there are multiple programs, each program is in its own interval; if there is only one program, the different content/topics within the program are also each in their own interval, and other content between programs must not be merged with a program into one interval
Execution steps:
1. Read through the full text and understand the topic of each time interval in context
2. If the content of adjacent time intervals is relatively coherent and belongs to the same topic (the criteria here must not be too strict and can be relaxed appropriately), merge them into one time interval. The merged time interval uses the earliest start time and the latest end time among them.
3. Simplify the content within the time intervals, but keep the current structure of the text unchanged
4. Intelligently verify the final generated result according to the given rules. If the generated result does not meet the rules, regenerate it (do not output the verification process, output only the final result).
Specific rules:
1. The start time of the earliest time interval in the final output must be 00:00:00, and the end time of the last time interval must be consistent with the end time of the last time interval in the original text.
2. The output format must be exactly the same as the original text, and no additional explanation or annotation may be added.
3. Processing only part of the time intervals is prohibited. All intervals must be processed before the final result is output.
4. Provided that the split time intervals meet all other conditions, merge as many intervals as possible.
5. Different programs, transition hosting, advertisements, etc. must not be merged into one time interval.
6. The accuracy of the times must be guaranteed.
Please process the text strictly according to the rules above.