视频智能剪辑算子,基于多模态大模型实现视频智能剪辑能力,帮助用户从长视频中快速提取有价值的内容片段。支持自然语言描述的剪辑需求理解、参考图像辅助识别(角色、物品、场景、对话等)、多维度视频内容分析(视觉、字幕、剧情),并输出标准化的剪辑决策信息(时间戳、描述等)。
算子 ID:las_video_edit
task_name)快速调用算子进行剪辑。
spear、label、label_reason 等语义标签,便于后续基于处理结果进行深度口播视频剪辑处理。task_description)实现基于自然语言描述的灵活剪辑需求理解。enable_asr=true),适用于对话内容丰富、无字幕的剪辑场景,提升片段边界流畅性。{ "mode": "detail", "enable_asr":true, "task_name":"SHORT_DRAMA_HIGHLIGHT_EXTRACTION", "extra_config":{ "miniseries_elements":{ "title":"《错换千金:冰山机长将我宠上天》", "hint":"影视效果 请勿模仿 无不良价值观引导", "template_name":"模板1"} }, "preset_intro":{ "transition":"fade", "transition_duration":0.5 } }
{ "clip_id":"clip_001", "start_time":"00:00:43.000", "end_time":"00:02:12.240", "duration":89.24000000000001, "confidence":0.75 }
{ "clip_id":"clip_002", "start_time":"00:01:38.640", "end_time":"00:02:18.000", "duration":39.36, "confidence":0.95 }
{ "mode": "detail", "task_description":"提取莲影角色的所有片段,包含台词", "reference_images": { "target":"莲影", "images":[ "tos://las-doctest/las-ai/input/video/short_drama/中文剧集/reference-images/lianying-child-front-v1.png"] }, "output_tos_path": "tos://las-doctest/las-ai/output/las_video_edit/movie/lianying-cut/", "min_clip_duration": 30, "max_clip_count": 3 }
{ "video_url": "tos://las-doctest/las-ai/input/video/marketing_video/割草机口播-含画外音.mp4", "task_description": "这是一段割草机口播的录制素材。请保留自然割草机的产品介绍关系,删除拍摄调度、让对方重说、跳过、直接开始、设备沟通、画外提示、重复表达和无效口癖。label 使用 KEEP、REPEAT、CORRECTION、FILLER、NOISE;不要因为 speaker 不同就删除有效对话。", "enable_asr": true }
"label": "NOISE"的片段,通过剪辑工具删除这部分的视频。细分项 | 性能影响说明 |
|---|---|
最大 RPM | 600 |
最大并发数 | 10 |
耗时 |
|
网络性能 |
|
细分 | 详细要求 |
|---|---|
支持的输入数据模态 |
|
输入格式:视频/音频 |
|
输入格式:图片 |
|
输入路径要求 | 通过请求参数
|
细分 | 详细要求 |
|---|---|
输出数据模态 |
|
输出路径:TOS | 视频剪辑场景下,通过请求参数
|
输出路径:API | 音频剪辑场景下,算子处理完成后,会将剪辑好的结果直接通过算子 |
计费标准
细分项 | 计费标准说明 |
|---|---|
计费项 | 输入源文件的时长。 |
计费类型 | 按量计费,单位: |
单价 | 与选择智能剪辑的场景有关,不同剪辑场景、不同的剪辑模式的单价不同。 |
计费详情
计费公式:总费用 = 单价 * 用量
细分场景 | 单价 |
|---|---|
视频剪辑,且剪辑模式为
| 1.5 元/分钟 |
视频剪辑,且剪辑模式为
| 2 元/分钟 |
纯音频剪辑
| 0.3 元/分钟 |
说明
纯音频剪辑场景下,调用算子后,账单明细中展示的计费为“视频剪辑-simple模式”的计费项,计费项展示上的差异不影响实际费用统计与结算。
细分项 | 注意与前提 |
|---|---|
开通 LAS |
|
费用 | 调用算子前,您需先了解使用算子时的模型调用费用,详情请参见大模型调用计费。 |
鉴权(API Key) | 调用算子前,您需要先生成算子调用的API Key,并建议将API Key配置为环境变量,便于更安全地调用算子,详情请参见获取 API Key 并配置。 |
BaseURL | 调用算子前,您需要先根据您当前使用的LAS服务所在地域,了解算子调用的BaseURL,用于配置算子调用路径参数取值。 |
Submit 接口提交任务获得任务的 task_id,再通过 Poll 接口获取对应任务(task_id)运行状态,并获取算子处理结果。task_id 有效期为 3 天,超过 3 天后即无法通过此 task_id 来获取算子处理结果。调用视频智能剪辑算子提交处理任务,支持对公网、火山内网或 TOS 源文件进行智能分析,返回剪辑后的视频片段或基于音频语义的片段分析结果。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
operator_id | string | 是 | las_video_edit | 算子 ID |
operator_version | string | 是 | v1 | 算子版本 |
data | VideoEditUserReqParams | 是 | 视频剪辑请求参数 |
参数 | 类型 | 示例值 | 说明 |
|---|---|---|---|
metadata | metadata | 请求元信息 | |
task_id | string | task-xxx | 异步模式下的任务 ID,用于作业状态查询。 |
task_status | string | PENDING | 异步模式下的任务状态。
|
business_code | string | 0 | 业务码。 |
error_msg | string | 如有异常,会返回详细的异常信息。 |
curl --location "https://operator.las.cn-beijing.volces.com/api/v1/submit" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer $LAS_API_KEY" \ --data '{ "operator_id": "las_video_edit", "operator_version": "v1", "data": { "video_url": ["https://${LAS_TOS_BUCKET}.${TOS_ENDPOINT}/operator_cards_serving/public/${LAS_ENVIRONMENT}/shared_video_dataset/A_Quiet_Place_movie_clip.mp4"], "task_description": "提取戴帽子的小男孩的所有片段,包含台词", "output_tos_path": "$OUTPUT_TOS_PATH", "mode": "detail", "enable_asr": true } }'
{ "metadata": { "task_id": "task-20251125163544-abc123", "task_status": "PENDING", "business_code": "0", "error_msg": "" } }
HttpStatusCode | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
400 | Url.Invalid | The url is invalid. | 视频链接不合法 |
400 | Video.Invalid | The video file is invalid. | 视频文件不合法 |
400 | Video.DurationExceeded | Video duration exceeds maximum limit of 5 hours. | 单个视频时长或批量传入视频总时长超出最大限制 |
400 | Video.FileTooLarge | Video file size exceeds maximum limit of 5GB. | 视频文件大小超出限制 |
400 | Parameter.Invalid | The parameter is invalid. | 参数不合法 |
401 | Authorization.Missing | Missing Authorization. | 缺少鉴权 |
401 | ApiKey.InValid | The api key is invalid. | API不合法 |
400 | Video.DurationTooShort | Video duration is too short, minimum 1 second required. | 视频时长过短 |
400 | Video.Timeout | Video processing timeout. | 视频处理超时 |
500 | Internal.ServerError | Internal server error. | 服务内部错误 |
查询视频剪辑任务的执行状态和结果。
参数 | 类型 | 必填 | 示例值 | 说明 |
|---|---|---|---|---|
operator_id | string | 是 | las_video_edit | 算子 ID |
operator_version | string | 是 | v1 | 算子版本 |
task_id | string | 是 | task-xxx | 任务 ID |
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
metadata | metadata | 请求元信息 | |
data | VideoEditResponse | 任务结果数据。所有源文件处理成功时, task_status=COMPLETED、business_code=0。部分源文件处理失败时,task_status=FAILED、business_code=Video.PartialFailure,此时仍会返回 data:clips 包含处理成功源文件的片段,videos 包含各源文件的处理状态和失败原因。全部源文件处理失败时,business_code=Video.AllSourcesFailed,不返回有效处理结果。PENDING、RUNNING 或 TIMEOUT 时可能返回占位空结构,如 {"video_duration":0.0,"total_segments":0,"clips":[],"resolution":""},该结构不代表最终无命中片段。任务失败或超时时,请根据 metadata.business_code 和 metadata.error_msg 判断整体原因;部分源文件处理失败时,具体原因请查看 data.videos 中对应源文件的 business_code 和 error_msg。 |
curl --location "https://operator.las.cn-beijing.volces.com/api/v1/poll" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer $LAS_API_KEY" \ --data '{ "operator_id": "las_video_edit", "operator_version": "v1", "task_id": "task-20251125163544-abc123" }'
{ "metadata": { "task_id": "task-20251125163544-abc123", "task_status": "COMPLETED", "submit_time": "2026-07-21T16:04:06+08:00", "end_time": "2026-07-21T16:04:06+08:00", "business_code": "0", "error_msg": "" }, "data": { "total_segments": 8, "videos": [ { "episode": 1, "source_id": "source_001", "source_index": 0, "video_url": "https://example.com/video.mp4", "media_type": "video", "status": "SUCCEEDED", "file_size": 58499535, "duration": 482.482, "resolution": "1280x720", "candidate_clip_count": 2, "selected_clip_count": 2, "business_code": null, "error_msg": null } ], "clips": [ { "clip_id": "clip_001", "source_id": "source_001", "start_time": "00:02:05.000", "end_time": "00:02:14.500", "duration": 9.5, "description": "柜台后出现戴帽子的小男孩,画面下方显示台词 。 戴帽子的小男孩坐在货架旁的地面上", "dialogue": "Tak apa", "clip_url": "tos://${LAS_TOS_BUCKET}/operator_cards_serving/public/${LAS_ENVIRONMENT}/las_video_edit/v1/clip_001.mp4", "file_size": 1993083, "confidence": 1.0, "meta": null }, { "clip_id": "clip_002", "source_id": "source_001", "start_time": "00:02:27.000", "end_time": "00:02:30.500", "duration": 3.5, "description": "戴帽子的小男孩坐在货架旁的地面上,面向画面左侧", "clip_url": "tos://${LAS_TOS_BUCKET}/operator_cards_serving/public/${LAS_ENVIRONMENT}/las_video_edit/v1/clip_002.mp4", "file_size": 419782, "confidence": 1.0, "meta": null }, { "clip_id": "clip_003", "source_id": "source_001", "start_time": "00:02:52.000", "end_time": "00:03:17.500", "duration": 25.5, "description": "女人走向坐在地面上戴帽子的小男孩,与他互动,喂他东西并触碰他的帽子 。 戴花纹针织帽的小男孩靠墙坐着,一位女性递给他一个水壶,他接过水壶喝水,之后开口说话", "clip_url": "tos://${LAS_TOS_BUCKET}/operator_cards_serving/public/${LAS_ENVIRONMENT}/las_video_edit/v1/clip_003.mp4", "file_size": 4616337, "confidence": 1.0, "meta": null }, { "clip_id": "clip_004", "source_id": "source_001", "start_time": "00:03:26.000", "end_time": "00:03:51.500", "duration": 25.5, "description": "戴深色帽子的小男孩在超市的地面上,和另一个女孩一起蹲在地上互动玩耍,做出类似发射火箭的手势", "dialogue": "Roket", "clip_url": "tos://${LAS_TOS_BUCKET}/operator_cards_serving/public/${LAS_ENVIRONMENT}/las_video_edit/v1/clip_004.mp4", "file_size": 5612855, "confidence": 1.0, "meta": null }, { "clip_id": "clip_005", "source_id": "source_001", "start_time": "00:03:56.000", "end_time": "00:04:02.500", "duration": 6.5, "description": "戴带红白条针织帽的小男孩说话,表达要离开这个星球的想法 。 戴帽子的小男孩站在货架前,说出台词,同时举起一根手指", "dialogue": "Itulah caranya..... Kita pergi dari Planet ini", "clip_url": "tos://${LAS_TOS_BUCKET}/operator_cards_serving/public/${LAS_ENVIRONMENT}/las_video_edit/v1/clip_005.mp4", "file_size": 1037987, "confidence": 1.0, "meta": null }, { "clip_id": "clip_006", "source_id": "source_001", "start_time": "00:04:09.000", "end_time": "00:04:11.500", "duration": 2.5, "description": "戴帽子的小男孩露出笑容,随后跑动起来离开画面", "clip_url": "tos://${LAS_TOS_BUCKET}/operator_cards_serving/public/${LAS_ENVIRONMENT}/las_video_edit/v1/clip_006.mp4", "file_size": 456489, "confidence": 1.0, "meta": null }, { "clip_id": "clip_007", "source_id": "source_001", "start_time": "00:04:31.000", "end_time": "00:04:41.500", "duration": 10.5, "description": "戴帽子的小男孩踩着箱子爬到货架旁,伸手去拿货架上的物品", "clip_url": "tos://${LAS_TOS_BUCKET}/operator_cards_serving/public/${LAS_ENVIRONMENT}/las_video_edit/v1/clip_007.mp4", "file_size": 2120459, "confidence": 1.0, "meta": null }, { "clip_id": "clip_008", "source_id": "source_001", "start_time": "00:04:46.000", "end_time": "00:04:58.500", "duration": 12.5, "description": "戴帽子的小男孩站在女孩身旁,女孩看向他,之后小男孩伸手去拿货架上的物品", "clip_url": "tos://${LAS_TOS_BUCKET}/operator_cards_serving/public/${LAS_ENVIRONMENT}/las_video_edit/v1/clip_008.mp4", "file_size": 2910307, "confidence": 0.95, "meta": null } ], "video_duration": 300.091458, "resolution": "1920x800" } }
HttpStatusCode | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
400 | Parameter.Invalid | Invalid parameter. | 参数不合法 |
400 | Parameter.Missing | Missing required parameter. | 缺少必选参数 |
400 | Url.Invalid | Invalid URL. | URL 不合法 |
400 | Video.Invalid | Invalid video file. | 视频文件无效 |
400 | Video.DownloadFailed | Video download failed. | 视频下载失败 |
400 | Video.FormatUnsupported | Video format not supported. | 视频格式不支持 |
400 | Video.Timeout | Video processing timeout. | 视频处理超时 |
400 | Video.VLMFailed | VLM call failed. | VLM 调用失败 |
400 | Video.UploadFailed | Video upload failed. | 视频上传失败 |
400 | Video.DurationTooShort | Video duration too short. | 视频时长太短 |
400 | Video.FrameExtractionFailed | Frame extraction failed. | 帧提取失败 |
400 | Tos.AccessFailed | TOS access failed. | TOS 访问失败 |
400 | ReferenceImage.DownloadFailed | Reference image download failed. | 参考图片下载失败 |
400 | Video.PartialFailure | 1 of 2 input videos failed; see data.videos for details. | 部分输入源处理失败;data 保留成功源文件的处理结果,失败详情见 data.videos。 |
400 | Video.AllSourcesFailed | 2 of 2 input videos failed; error summary: Video.DownloadFailed=2. | 全部输入源处理失败;无可用处理结果,错误摘要见 error_msg。 |
401 | Authorization.Missing | Missing Authorization. | 缺少鉴权 |
401 | ApiKey.InValid | The api key is invalid. | API不合法 |
400 | Task.NotFound | Task not found. | 任务不存在 |
500 | Internal.ServerError | Internal server error. | 服务内部错误 |