智能拼图 / 封面图

根据多张图片和标题文字,AI 智能计算最佳布局,生成优质的图文拼图或封面图,适用于社交媒体内容制作。

示例效果

智能拼图 / 封面图示例 1智能拼图 / 封面图示例 2智能拼图 / 封面图示例 3

创建任务

基本信息

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

请求参数(Body)

参数名类型必填默认值说明
file_idsarray图片文件 ID 数组,支持多张图片
main_titlestring主标题文本
sub_titlestring""副标题文本
modestring"full"生成模式:full(图文混排)/ image(纯图)/ text(纯文字)
aspectstring"3:4"画幅比例:"1:1" / "3:4" / "4:3" / "9:16" / "16:9"
qualitystring"1080p"输出质量:"360p" / "720p" / "1080p" / "2k" / "4k"
output_pic_countnumber0纯图版本数量(最多 20)
output_text_countnumber1图文版本数量(最多 20)

请求示例

curl -X POST https://api.ai-mcn.tv:10000/task/image_classic_template \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_ids": ["537489015178246", "537489015178247"],
    "main_title": "精彩瞬间",
    "sub_title": "2026 年度回顾",
    "mode": "full",
    "aspect": "3:4",
    "output_text_count": 3
  }'

成功响应示例

{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "537489015178248",
    "task_type": "image_classic_template",
    "status": "queued"
  }
}

查询任务结果

基本信息

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

响应参数(output_result)

参数名类型说明
filesarray生成的封面图文件列表
files[].file_idstring生成文件的 ID
files[].download_urlstring生成文件的下载路径

成功响应示例

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

错误码

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