JianYingAPI
main
  • main
  • afanti
  1. 工作流
JianYingAPI
main
  • main
  • afanti
  • 默认模块
    • 一分钟,了解 流光剪辑!
    • 扣子工作流示例
    • 如何下载草稿
    • 在线预览草稿
    • 获取API Key
    • 使用工作流功能
    • 飞书智能表格示例
    • 直播间演示
    • 文本
      • 使用花字
      • 使用文字模版
      • 如何上传文字模板
      • get_text_intro_types
      • get_text_outro_types
      • get_text_loop_anim_types
      • get_font_types
      • add_text
      • add_subtitle
      • search_artist
      • add_text_template
    • 图片
      • get_intro_animation_types
      • get_outro_animation_types
      • get_combo_animation_types
      • add_image
    • 视频
      • add_video
    • 转场
      • get_transition_types
    • 蒙版
      • get_mask_types
    • 音频
      • get_audio_effect_types
      • add_audio
    • 关键帧
      • add_video_keyframe
    • 特效
      • get_video_character_effect_types
      • get_video_scene_effect_types
      • add_effect
    • 贴纸
      • search_sticker
      • add_sticker
    • 云渲染
      • generate_video
      • task_status
    • 工作流
      • 工作流脚本技术文档
      • 工作流 AI Prompt 提示词
      • execute_workflow
        POST
    • 模版/预设
      • 如何使用模版/预设功能
      • 如何上传模版
      • add_preset
    • 滤镜
      • add_filter
      • get_filter_types
    • create_draft
      POST
    • save_draft
      POST
    • get_duration
      POST
  1. 工作流

execute_workflow

POST
/execute_workflow
执行剪辑操作工作流

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数application/json必填

示例

返回响应

🟢200成功
application/json
Body

请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST 'https://open.capcutapi.top/cut_jianying/execute_workflow' \
--header 'Authorization: Bearer  <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "inputs": {
        "text": "Hello!",
        "start": 0,
        "end": 15.0
    },
    "script": [
        {
            "type": "action",
            "id": "uuid_1",
            "index": 0,
            "action_type": "add_text",
            "params": {
                "text": "${text}",
                "start": "${start}",
                "end": "${end}",
                "track_name": "text_main",
                "font_size": "8.0",
                "font_color": "#FF0000"
            }
        },
        {
            "type": "action",
            "id": "uuid_2",
            "index": 1,
            "action_type": "add_text",
            "params": {
                "text": "这是第二行文本",
                "start": "0",
                "end": "5.0",
                "track_name": "text_1",
                "transform_y": "0.3"
            }
        },
        {
            "type": "action",
            "id": "uuid_3",
            "index": 2,
            "action_type": "add_subtitle",
            "params": {
                "srt": "1\\n00:00:00,000 --> 00:00:04,433\\n你好,我是孙观楠开发的剪映草稿助手。\\n\\n2\\n00:00:04,433 --> 00:00:11,360\\n我擅长将音频、视频、图片素材拼接在一起剪辑输出剪映草稿。\\n",
                "track_name": "subtitle_1",
                "font_size": "5.0"
            }
        },
        {
            "type": "action",
            "id": "uuid_4",
            "index": 3,
            "action_type": "add_text_template",
            "params": {
                "template_id": "7373303725881822491",
                "start": "2.0",
                "track_name": "text_template_main"
            }
        },
        {
            "type": "action",
            "id": "uuid_5",
            "index": 4,
            "action_type": "add_image",
            "params": {
                "image_url": "https://pic1.imgdb.cn/item/68ba8fc058cb8da5c8801ab0.png",
                "start": "5.0",
                "end": "10.0",
                "track_name": "image_main"
            }
        },
        {
            "type": "action",
            "id": "uuid_6",
            "index": 5,
            "action_type": "add_video",
            "params": {
                "video_url": "https://cdn.wanx.aliyuncs.com/wanx/1719234057367822001/text_to_video/092faf3c94244973ab752ee1280ba76f.mp4?spm=5176.29623064.0.0.41ed26d6cBOhV3&file=092faf3c94244973ab752ee1280ba76f.mp4",
                "target_start": "10.0",
                "track_name": "video_main"
            }
        },
        {
            "type": "action",
            "id": "uuid_7",
            "index": 6,
            "action_type": "add_audio",
            "params": {
                "audio_url": "https://lf3-lv-music-tos.faceu.com/obj/tos-cn-ve-2774/oYACBQRCMlWBIrZipvQZhI5LAlUFYii0RwEPh",
                "start": "0.0",
                "track_name": "audio_main",
                "volume": "0.8"
            }
        },
        {
            "type": "action",
            "id": "uuid_8",
            "index": 7,
            "action_type": "add_video_keyframe",
            "params": {
                "track_name": "video_main",
                "time": "10.5",
                "property_type": "position_y",
                "value": "1"
            }
        },
        {
            "type": "action",
            "id": "uuid_9",
            "index": 8,
            "action_type": "add_video_keyframe",
            "params": {
                "track_name": "video_main",
                "time": "11.5",
                "property_type": "position_y",
                "value": "0.2"
            }
        },
        {
            "type": "action",
            "id": "uuid_10",
            "index": 9,
            "action_type": "add_video_keyframe",
            "params": {
                "track_name": "video_main",
                "times": [
                    10.5,
                    12.5
                ],
                "property_types": [
                    "position_x",
                    "position_x"
                ],
                "values": [
                    1,
                    -1
                ]
            }
        },
        {
            "type": "action",
            "id": "uuid_11",
            "index": 10,
            "action_type": "add_effect",
            "params": {
                "effect_category": "scene",
                "effect_type": "金粉闪闪",
                "start": "0",
                "end": "10",
                "track_name": "effect_01",
                "params": [
                    100,
                    50,
                    34
                ]
            }
        },
        {
            "type": "action",
            "id": "uuid_12",
            "index": 11,
            "action_type": "add_sticker",
            "params": {
                "sticker_id": "7107529669750066445",
                "start": "20.0",
                "end": "25.0",
                "transform_y": "0.3",
                "transform_x": "-0.2",
                "alpha": "0.8",
                "rotation": "45.0",
                "scale_x": "1.5",
                "scale_y": "1.5",
                "track_name": "sticker_main"
            }
        },
        {
            "type": "action",
            "id": "uuid_13",
            "index": 12,
            "action_type": "add_filter",
            "params": {
                "filter_type": "黑胶唱片",
                "start": 0,
                "end": 3,
                "track_name": "filter_1",
                "relative_index": 1,
                "intensity": 86
            }
        }
    ]
}'
响应示例响应示例
{
    "error": "",
    "output": {
        "draft_id": "dfd_cat_1760946180_fc9a8560",
        "draft_url": "https://cn.capcutapi.top/draft/downloader?draft_id=dfd_cat_1760946180_fc9a8560&is_capcut=0&api_key_hash=15b082f53a67b381693cc2c62982d3bf662463523721ca35544106af2d2bb57c"
    },
    "purchase_link": "https://www.coze.cn/store/project/7498257920212647946?entity_id=1&bid=6g6miqtbk3009",
    "success": true
}
修改于 2025-12-08 06:29:18
上一页
工作流 AI Prompt 提示词
下一页
如何使用模版/预设功能
Built with