拼长图

将多张图片按顺序竖向拼接为一张长图,可选择是否在每张图片上显示文件名标签。

创建任务

基本信息

项目
请求方法POST
请求路径/task/image_vertical_stitch
Content-Typeapplication/json
鉴权方式Authorization 请求头(直接传 API Key)

请求参数(Body)

参数名类型必填默认值说明
file_idsarray图片文件 ID 数组,按顺序从上到下拼接
show_filenamebooleanfalse是否在每张图片上显示文件名标签

请求示例

curl -X POST https://api.ai-mcn.tv:10000/task/image_vertical_stitch \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_ids": ["537489015178246", "537489015178247", "537489015178248"],
    "show_filename": false
  }'

成功响应示例

{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "537489015178249",
    "task_type": "image_vertical_stitch",
    "status": "queued"
  }
}

查询任务结果

基本信息

项目
请求方法GET
请求路径/task/image_vertical_stitch/{task_id}
鉴权方式Authorization 请求头(直接传 API Key)

响应参数(output_result)

参数名类型说明
file_idstring生成的长图文件 ID
download_urlstring长图下载路径

成功响应示例

{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "537489015178249",
    "status": "completed",
    "progress": 100,
    "output_result": {
      "file_id": "537489015178250",
      "download_url": "/download/a1/output.jpg"
    },
    "create_time": "2026-04-05T08:00:00Z",
    "update_time": "2026-04-05T08:00:05Z"
  }
}

错误码

错误码HTTP 状态码说明解决方案
6013400file_ids 缺失传入 file_ids 参数
6004404文件不存在检查 file_ids 中的 ID 是否正确
6502401鉴权失败检查 Authorization 请求头
6202402余额不足前往仪表盘充值