AI Video Segment
The enum values printed on this page are a snapshot. The machine-readable source of truth is the Enum Catalog — where the two disagree, that one wins.
Use a multimodal large model to understand video semantics and split shots from scene, shot-type, narrative, or subject perspectives. The API returns structured results by default. Set only_struct to false if you also want exported clip files.
Interactive Example
Mode
narrative
Shots
51
Duration
06:28.77
Categories
15
Example Video
Playback, scrubbing, or clicking the timeline below will all keep the two sides in sync.
Current Shot
All fields for the active shot are shown here.
JSON Path
output_result.categories[0].shots[0]
ID
#1
Duration
00:04.80
Category
开场噩梦片段
Shot Type
全景
Current Time
00:01.70 - 00:06.50
Thumbnail Time
00:04.00
Category Description
昏暗冷调画面呈现男子被追赶的噩梦内容,营造悬疑压抑氛围
Description
昏暗的室内走廊中,穿白T恤的戴眼镜男子正快步向前奔跑
Subjects
Tags
Confidence
96%
JSON Navigator
Grouped by output_result.categories with automatic highlight for the current shot.
Create Task
Basic Information
| Item | Value |
|---|---|
| Request Method | POST |
| Request Path | /task/video_ai_segment |
| Content-Type | application/json |
| Authentication | Raw API key in the Authorization header |
Request Body
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file_id | string | Yes | - | Uploaded video file ID |
mode | string | No | "scene" | Segmentation mode. Supports scene, shot_type, narrative, and subject |
speed | string | No | "standard" | Processing tier. Supports standard and fast, both at the same price. See "Processing tiers" below |
min_duration | number | No | 1.5 | Minimum shot duration in seconds |
max_duration | number | No | 300 | Maximum shot duration in seconds. Must be greater than or equal to min_duration |
start_time | number | No | - | Optional analysis start time in seconds |
end_time | number | No | - | Optional analysis end time in seconds. Must be greater than start_time |
only_struct | boolean | No | true | Whether to return only structured results without exporting files |
need_audio | boolean | No | true | Whether exported clips should keep audio. Applies only when only_struct=false |
Mode Reference
mode | Description |
|---|---|
scene | Group shots by scene semantics |
shot_type | Group shots by framing and shot type |
narrative | Group shots by narrative stage or content block |
subject | Group shots by main subject or visual focus |
Processing tiers
Both tiers cost the same and return exactly the same output structure. They differ in cut accuracy and processing time:
speed | Description |
|---|---|
standard | Default. More accurate shot boundaries and more consistent results when the same video is processed again. Slower: a video under 4 minutes takes about 4–8 minutes; longer videos are split into segments processed in parallel, so total time grows slowly |
fast | Total time is about 1/4 to 2/3 of the standard tier, with the biggest savings on short videos. Cut accuracy is on par with earlier versions; results vary a little more between runs on the same video, and adjacent short shots are occasionally merged into one |
Use fast when turnaround matters and the result will be reviewed by a person anyway (bulk rough splits, split-then-pick workflows). Use standard when the segmentation is used directly.
Request Example
curl -X POST https://api.ai-mcn.tv:10000/task/video_ai_segment \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_id": "537489015178246",
"mode": "scene",
"min_duration": 1.5,
"max_duration": 120,
"only_struct": true
}'
Success Example
{
"code": 200,
"msg": "success",
"data": {
"task_id": "537489015178247",
"task_type": "video_ai_segment",
"status": "queued"
}
}
Query Task Result
Basic Information
| Item | Value |
|---|---|
| Request Method | GET |
| Request Path | /task/video_ai_segment/{task_id} |
| Authentication | Raw API key in the Authorization header |
Output Result (output_result)
| Parameter | Type | Description |
|---|---|---|
mode | string | Active segmentation mode |
total_shots | integer | Number of final shots |
total_duration | number | Total covered duration in seconds |
categories | array<object> | Structured category result. Each category includes category, category_desc, and shots |
files | array<object> | Exported clip files, returned only when only_struct=false. Each item contains id, file_id, and download_url, and id maps to shots[].id |
shots Fields
| Parameter | Type | Description |
|---|---|---|
id | integer | Shot index |
subjects | array<string> | Main subjects detected in the shot |
tags | array<string> | Shot tags |
shot_type | string | Shot framing or shot type, such as Close-up or Medium Shot |
desc | string | Objective description of the shot content |
start_time | number | Shot start time in seconds |
end_time | number | Shot end time in seconds |
confidence | number | Model confidence for the shot split result |
thumbnail_time | number | Recommended thumbnail timestamp in seconds |
category | string | Category name for this shot |
category_desc | string | Description of the category this shot belongs to |
files Fields
| Parameter | Type | Description |
|---|---|---|
id | integer | Corresponds to shots[].id in the structured result |
file_id | string | Clip file ID |
download_url | string | Download URL for the exported clip |
[
{
"id": 1,
"file_id": "56817731376500742",
"download_url": "https://api.ai-mcn.tv:9000/cloud/file/a6/56817731376500742.mp4"
}
]
Success Example
{
"code": 200,
"msg": "success",
"data": {
"task_id": "537489015178247",
"status": "completed",
"progress": 100,
"output_result": {
"mode": "scene",
"total_shots": 2,
"total_duration": 18.6,
"categories": [
{
"category": "Talking Head",
"category_desc": "A person speaks directly to the camera",
"shots": [
{
"id": 1,
"subjects": ["Speaker", "Indoor background"],
"tags": ["Talking", "Front-facing"],
"shot_type": "Medium Shot",
"desc": "A person speaks indoors",
"start_time": 0.0,
"end_time": 8.2,
"confidence": 0.96,
"thumbnail_time": 4.1,
"category": "Talking Head",
"category_desc": "A person speaks directly to the camera"
}
]
}
],
"files": [
{
"id": 1,
"file_id": "56817731376500742",
"download_url": "https://api.ai-mcn.tv:9000/cloud/file/a6/56817731376500742.mp4"
}
]
},
"create_time": "2026-04-09T08:00:00Z",
"update_time": "2026-04-09T08:02:10Z"
}
}
Error Codes
| Error Code | HTTP Status | Description | Resolution |
|---|---|---|---|
6013 | 400 | Missing file_id | Add the required field |
6014 | 400 | File type does not match | Pass a video file ID |
6016 | 400 | Invalid mode, speed, duration, or time range parameters | Adjust the request parameters |
6004 | 404 | File not found | Verify the file_id |
6502 | 401 | Authentication failed | Check the Authorization header |
Usage Limits
- This API currently accepts a single video file per task
- Long videos are automatically split into overlapping chunks and merged on the server after analysis
- Structured output is returned by default. Set
only_struct=falseif you also need clip files - The standard tier takes a while per video. Poll "Query Task Result" or subscribe to progress events instead of waiting synchronously