AI Video Segment

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

Current Time: 00:00.00

Playback, scrubbing, or clicking the timeline below will all keep the two sides in sync.

Click to seek00:00.00 / 06:28.77

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.

{
"mode": "narrative",
"total_shots": 51,
"total_duration": 388.77,
"categories": [
{
"category": "开场噩梦片段",
"category_desc": "昏暗冷调画面呈现男子被追赶的噩梦内容,营造悬疑压抑氛围",
"shots": [
]
},
{
"category": "影片标题页",
"category_desc": "展示影片名称的文字标题卡,属于片头内容",
"shots": [
]
},
{
"category": "现实心理咨询开场",
"category_desc": "现实明亮场景中,戴眼镜男子醒来,与同伴对话提及自己的噩梦困扰",
"shots": [
]
},
{
"category": "催眠引导段落",
"category_desc": "短发男子引导戴眼镜男子进行催眠,帮助他回溯梦境内容",
"shots": [
]
},
{
"category": "首次催眠梦境片段",
"category_desc": "催眠过程中男子闪回的梦境片段,包含奔跑、光斑等意象",
"shots": [
]
},
{
"category": "催眠后对话段落",
"category_desc": "男子从催眠中苏醒,和同伴交流梦境相关的信息",
"shots": [
]
},
{
"category": "二次催眠梦境段落",
"category_desc": "二次催眠后男子进入更深的梦境,遇到同伴和陌生少女,获得素描画",
"shots": [
]
},
{
"category": "往事回忆段落",
"category_desc": "男子回忆过去在中山楼楼梯画画,与少女相遇的过往经历",
"shots": [
]
},
{
"category": "开篇约定",
"category_desc": "讲述两名穿校服的学生约定暑假一同去学画的开篇情节",
"shots": [
]
},
{
"category": "冲突离别",
"category_desc": "时间跳转后男生告知女生无法一同学画,两人分别的情节",
"shots": [
]
},
{
"category": "回忆闪回",
"category_desc": "男生以蒙太奇形式回忆过往经历,表达内心愧疚与遗憾的情节",
"shots": [
]
},
{
"category": "迷茫求助",
"category_desc": "男生向他人求助未果,陷入迷茫沉思的情节",
"shots": [
]
},
{
"category": "行走感悟",
"category_desc": "男生在校园中行走,逐渐感悟青春选择的意义的情节",
"shots": [
]
},
{
"category": "和解结局",
"category_desc": "男生不再逃避,回到楼梯找女生和解的收尾情节",
"shots": [
]
},
{
"category": "片尾标识",
"category_desc": "视频末尾的演职员表与出品方标识展示",
"shots": [
]
}
]
}

Create Task

Basic Information

ItemValue
Request MethodPOST
Request Path/task/video_ai_segment
Content-Typeapplication/json
AuthenticationRaw API key in the Authorization header

Request Body

ParameterTypeRequiredDefaultDescription
file_idstringYes-Uploaded video file ID
modestringNo"scene"Segmentation mode. Supports scene, shot_type, narrative, and subject
min_durationnumberNo1.5Minimum shot duration in seconds
max_durationnumberNo300Maximum shot duration in seconds. Must be greater than or equal to min_duration
start_timenumberNo-Optional analysis start time in seconds
end_timenumberNo-Optional analysis end time in seconds. Must be greater than start_time
only_structbooleanNotrueWhether to return only structured results without exporting files
need_audiobooleanNotrueWhether exported clips should keep audio. Applies only when only_struct=false

Mode Reference

modeDescription
sceneGroup shots by scene semantics
shot_typeGroup shots by framing and shot type
narrativeGroup shots by narrative stage or content block
subjectGroup shots by main subject or visual focus

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

ItemValue
Request MethodGET
Request Path/task/video_ai_segment/{task_id}
AuthenticationRaw API key in the Authorization header

Output Result (output_result)

ParameterTypeDescription
modestringActive segmentation mode
total_shotsintegerNumber of final shots
total_durationnumberTotal covered duration in seconds
categoriesarray<object>Structured category result. Each category includes category, category_desc, and shots
filesarray<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

ParameterTypeDescription
idintegerShot index
subjectsarray<string>Main subjects detected in the shot
tagsarray<string>Shot tags
shot_typestringShot framing or shot type, such as Close-up or Medium Shot
descstringObjective description of the shot content
start_timenumberShot start time in seconds
end_timenumberShot end time in seconds
confidencenumberModel confidence for the shot split result
thumbnail_timenumberRecommended thumbnail timestamp in seconds
categorystringCategory name for this shot
category_descstringDescription of the category this shot belongs to

files Fields

ParameterTypeDescription
idintegerCorresponds to shots[].id in the structured result
file_idstringClip file ID
download_urlstringDownload 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 CodeHTTP StatusDescriptionResolution
6013400Missing file_idAdd the required field
6014400File type does not matchPass a video file ID
6016400Invalid mode, duration, or time range parametersAdjust the request parameters
6004404File not foundVerify the file_id
6502401Authentication failedCheck 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=false if you also need clip files