Skip to content

add_effect ​

POST /add_effect

口径:本页参数表最后核对于 v23.9(2026-10-27)。v24.0~v24.8 的改动(add_video 的 timeline_start/timeline_end 别名、apply_edl 批内失败计数、resource/search 的 limit 与 count 等价、/agent/route 类型分诊等)以 llms-full.txt 与 GET /agent/capabilities 为准。

接口说明 ​

向草稿添加场景特效或人物特效,并设置生效区间、轨道和可选参数。特效名称或资源 ID 先通过 resource_search 查询;也兼容 get_video_scene_effect_types 和 get_video_character_effect_types。

运镜也属于场景特效。先搜索 category=scene_effect&keyword=运镜,再用本接口添加,effect_category 传 scene。不要用关键帧接口硬模拟运镜。

同一轨道、同一特效、同一时间段重复调用时默认做幂等复用,避免客户端超时重试造成重复特效。确实需要叠加相同特效时,传 force_duplicate: true。

请求参数 ​

参数必填默认值说明
effect_type条件必填—特效名称或资源 ID
resource_id条件必填—剪映资源 ID,和 effect_type 至少提供一个
effect_id否—剪映效果 ID
md5否—资源 MD5
start否0源素材开始时间,单位秒
effect_category否'scene'特效分类,scene 或 character
end否3.0源素材结束时间,单位秒
draft_id是—草稿 ID,创建草稿后获得
track_name否'effect_01'目标轨道名称
params否[]特效参数列表;不传时使用默认值
width否1080画布或素材宽度
height否1920画布或素材高度
force_duplicate否false为 true 时允许重复写入相同特效

调用示例 ​

bash
curl -X POST https://your-domain.example/api/add_effect \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $VECTCUT_API_KEY" \
  -d '{
    "draft_id": "dfd_cat_demo_001",
    "effect_type": "_1998",
    "effect_category": "scene",
    "start": 0,
    "end": 3,
    "params": []
  }'

运镜示例 ​

查询:

text
GET /resource/search?category=scene_effect&keyword=运镜&count=50

已确认可用的运镜资源:

名称resource_id
推拉运镜7382100760630137381
S形运镜7291263159023702584
跟随运镜7299426452896748042
360运镜7430701460901335603
摇晃运镜7241063267357954619

添加:

json
{
  "draft_id": "dfd_cat_demo_001",
  "resource_id": "7382100760630137381",
  "effect_category": "scene",
  "start": 0,
  "end": 5
}

添加后用 query_timeline 或 get_segment 检查特效片段是否真实出现在草稿里。

返回格式 ​

json
{
  "success": true,
  "output": {
    "draft_id": "dfd_cat_demo_001",
    "draft_url": "https://your-domain.example/api/draft/downloader?draft_id=dfd_cat_demo_001",
    "reused": false
  },
  "error": ""
}

个人自建服务