{
"video_url": "https://cdn.wanx.aliyuncs.com/wanx/1719234057367822001/text_to_video/092faf3c94244973ab752ee1280ba76f.mp4?spm=5176.29623064.0.0.41ed26d6cBOhV3&file=092faf3c94244973ab752ee1280ba76f.mp4", // Video resource URL (Required, used to obtain video material)
"start": 0, // Start time for video material cropping (seconds, Optional, default 0)
"end": 0, // End time for video material cropping (seconds, Optional, default 0, 0 usually means crop to the end of the video)
"width": 1080, // Canvas width (Optional, default 1080)
"height": 1920, // Canvas height (Optional, default 1920)
"draft_id": "draft_123456", // Draft ID (Optional, used to associate with the target draft)
"transform_y": 0, // Y-axis position offset (Optional, default 0)
"scale_x": 1, // X-axis scaling ratio (Optional, default 1)
"scale_y": 1, // Y-axis scaling ratio (Optional, default 1)
"transform_x": 0, // X-axis position offset (Optional, default 0)
"speed": 1.0, // Video playback speed (Optional, default 1.0, greater than 1 for acceleration, less than 1 for deceleration)
"target_start": 0, // Starting position of the video on the timeline (seconds, Optional, default 0)
"track_name": "video_main", // Track name (Optional, default "video_main")
"relative_index": 0, // Relative index (Optional, default 0, used to control the arrangement order of materials within the track)
"duration": null, // Total duration of the video material (seconds, Optional, setting this can improve the running speed of the current node)
"transition": "Flash", // Transition type (Optional, such as "Flash", must match supported types)
"transition_duration": 0.5, // Transition duration (seconds, Optional, default 0.5)
"volume": 1.0, // Video volume (Optional, default 1.0, usually ranges from 0.0-1.0)
// Mask-related parameters
"mask_type": "Circle", // Mask type (Optional, such as Circle, Rectangle, etc.)
"mask_center_x": 0.5, // X-coordinate of the mask center (Optional, default 0.5, proportion relative to screen width)
"mask_center_y": 0.5, // Y-coordinate of the mask center (Optional, default 0.5, proportion relative to screen height)
"mask_size": 1.0, // Mask size (Optional, default 1.0, proportion relative to screen height)
"mask_rotation": 0.0, // Mask rotation angle (Optional, default 0.0 degrees)
"mask_feather": 0.0, // Mask feathering degree (Optional, default 0.0, larger value means softer edge)
"mask_invert": false, // Whether to invert the mask (Optional, default false)
"mask_rect_width": null, // Width of the rectangular mask (Optional, only valid when mask_type is Rectangle)
"mask_round_corner": null // Rounded corner radius of the rectangular mask (Optional, only valid when mask_type is Rectangle)
}
curl --location --request POST 'https://open.capcutapi.top/cut_capcut/add_video' \
--header 'Authorization: Bearer your-api-key' \
--header 'Content-Type: application/json' \
--data-raw '{
"video_url": "https://cdn.wanx.aliyuncs.com/wanx/1719234057367822001/text_to_video/092faf3c94244973ab752ee1280ba76f.mp4?spm=5176.29623064.0.0.41ed26d6cBOhV3&file=092faf3c94244973ab752ee1280ba76f.mp4", // Video resource URL (Required, used to obtain video material)
"start": 0, // Start time for video material cropping (seconds, Optional, default 0)
"end": 0, // End time for video material cropping (seconds, Optional, default 0, 0 usually means crop to the end of the video)
"width": 1080, // Canvas width (Optional, default 1080)
"height": 1920, // Canvas height (Optional, default 1920)
"draft_id": "draft_123456", // Draft ID (Optional, used to associate with the target draft)
"transform_y": 0, // Y-axis position offset (Optional, default 0)
"scale_x": 1, // X-axis scaling ratio (Optional, default 1)
"scale_y": 1, // Y-axis scaling ratio (Optional, default 1)
"transform_x": 0, // X-axis position offset (Optional, default 0)
"speed": 1.0, // Video playback speed (Optional, default 1.0, greater than 1 for acceleration, less than 1 for deceleration)
"target_start": 0, // Starting position of the video on the timeline (seconds, Optional, default 0)
"track_name": "video_main", // Track name (Optional, default "video_main")
"relative_index": 0, // Relative index (Optional, default 0, used to control the arrangement order of materials within the track)
"duration": null, // Total duration of the video material (seconds, Optional, setting this can improve the running speed of the current node)
"transition": "Flash", // Transition type (Optional, such as "Flash", must match supported types)
"transition_duration": 0.5, // Transition duration (seconds, Optional, default 0.5)
"volume": 1.0, // Video volume (Optional, default 1.0, usually ranges from 0.0-1.0)
// Mask-related parameters
"mask_type": "Circle", // Mask type (Optional, such as Circle, Rectangle, etc.)
"mask_center_x": 0.5, // X-coordinate of the mask center (Optional, default 0.5, proportion relative to screen width)
"mask_center_y": 0.5, // Y-coordinate of the mask center (Optional, default 0.5, proportion relative to screen height)
"mask_size": 1.0, // Mask size (Optional, default 1.0, proportion relative to screen height)
"mask_rotation": 0.0, // Mask rotation angle (Optional, default 0.0 degrees)
"mask_feather": 0.0, // Mask feathering degree (Optional, default 0.0, larger value means softer edge)
"mask_invert": false, // Whether to invert the mask (Optional, default false)
"mask_rect_width": null, // Width of the rectangular mask (Optional, only valid when mask_type is Rectangle)
"mask_round_corner": null // Rounded corner radius of the rectangular mask (Optional, only valid when mask_type is Rectangle)
}'
{
"error": "",
"output": {
"draft_id": "dfd_cat_1753840275_eb8942dd",
"draft_url": "https://www.capcutapi.top/draft/downloader?draft_id=dfd_cat_1753840275_eb8942dd"
},
"purchase_link": "https://www.coze.cn/store/project/7498257920212647946?entity_id=1&bid=6g6miqtbk3009",
"success": true
}