Skip to content

create_draft ​

POST /create_draft

接口说明 ​

创建一个新的剪映或 CapCut 草稿,返回后续所有编辑操作都要使用的 draft_id。这是最常用的起点接口,可以按竖屏、横屏或方形项目设置画布尺寸。服务端只创建草稿结构,不会下载任何素材。

请求参数 ​

参数必填默认值说明
width否1080画布或素材宽度
height否1920画布或素材高度

调用示例 ​

bash
curl -X POST https://your-domain.example/api/create_draft \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $VECTCUT_API_KEY" \
  -d '{
    "width": 1080,
    "height": 1920
  }'

返回格式 ​

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&is_capcut=0",
    "cache": {
      "cached": true,
      "created_at": 1791381973.6179492,
      "expires_at": 1791468373.6179492,
      "last_access_at": 1791381973.6179492,
      "remaining_seconds": 86399,
      "ttl_seconds": 86400,
      "updated_at": 1791381973.6179492
    }
  },
  "error": ""
}

个人自建服务