智能拼图 / 封面图
根据多张图片和标题文字,AI 智能计算最佳布局,生成优质的图文拼图或封面图,适用于社交媒体内容制作。
示例效果
创建任务
基本信息
| 项目 | 值 |
|---|
| 请求方法 | POST |
| 请求路径 | /task/image_classic_template |
| Content-Type | application/json |
| 鉴权方式 | Authorization 请求头(直接传 API Key) |
请求参数(Body)
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|
file_ids | array | 是 | — | 图片文件 ID 数组,支持多张图片 |
main_title | string | 是 | — | 主标题文本 |
sub_title | string | 否 | "" | 副标题文本 |
mode | string | 否 | "full" | 生成模式:full(图文混排)/ image(纯图)/ text(纯文字) |
aspect | string | 否 | "3:4" | 画幅比例:"1:1" / "3:4" / "4:3" / "9:16" / "16:9" |
quality | string | 否 | "1080p" | 输出质量:"360p" / "720p" / "1080p" / "2k" / "4k" |
output_pic_count | number | 否 | 0 | 纯图版本数量(最多 20) |
output_text_count | number | 否 | 1 | 图文版本数量(最多 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)
| 参数名 | 类型 | 说明 |
|---|
files | array | 生成的封面图文件列表 |
files[].file_id | string | 生成文件的 ID |
files[].download_url | string | 生成文件的下载路径 |
成功响应示例
{
"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 状态码 | 说明 | 解决方案 |
|---|
6013 | 400 | file_ids 或 main_title 缺失 | 补充必填参数 |
6004 | 404 | 文件不存在 | 检查 file_ids 中的 ID 是否正确 |
6502 | 401 | 鉴权失败 | 检查 Authorization 请求头 |
6202 | 402 | 余额不足 | 前往仪表盘充值 |