腾讯混元 生图 · 3D · 图片
参考图生图NEW
📌 这是什么:以参考图中的主体 / 风格为依据生成新图片(图生图 / 多图参考)。
💡 什么时候用:想保留指定人物、商品或风格并改变场景 / 构图时用;传了 imageUrls 即为参考生。
接口地址
| 用途 | 方法 | 路径 |
|---|---|---|
| 提交任务 | POST | /api/cqt/generator/hunyuan |
| 查询结果 | GET | /api/cqt/info/hunyuan?id={taskId} |
⏱ 建议轮询时间:建议每 5~10 秒轮询一次,直到 status = succeeded / failed。
子模型对照表
「档位价」列单位为积分/张(按次的模型为积分/次);(default output) = 只用缺省输出、不接受 resolution;≥N refs → 为多图参考档。
| model | 用途 | 可用素材 | 出图张数 | 档位价(积分) |
|---|---|---|---|---|
| hunyuan-image-3.5-preview | 3.5 预览版,缺省输出 1344×1792 | 参考图 ≤3 张 | 1 | 2K=15 (default output) |
| hunyuan-image-3.0 | 3.0,缺省输出 1024×1024 | 参考图 ≤3 张 | 1 | 1K=20 (default output) |
⚠ hunyuan-image-3.5-preview:每次 1 张;hunyuan-image-3.0:每次 1 张
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| model | string | 必填 | 子模型:hunyuan-image-3.5-preview / hunyuan-image-3.0 |
| prompt | string | — | 图片描述(可留空,由参考图驱动) |
| imageUrls | array | 必填 | 参考图 URL 数组(须公网可直连),上限见对照表 |
| aspectRatio | string | — | 画面比例,如 1:1 / 16:9 / 9:16 |
| negativePrompt / seed / enhancePrompt | string / integer / boolean | — | 反向提示词 / 随机种子 / 自动优化提示词(可选) |
请求示例
curl -X POST https://api.cqtai.com/api/cqt/generator/hunyuan \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "hunyuan-image-3.0",
"prompt": "the same woman sitting in a cozy cafe by the window on a rainy day, soft light",
"imageUrls": [
"https://cdn.novapi.ai/kling/1791949942892_d18ee23dfa3048e097c58c9c3e32a754.png"
],
"aspectRatio": "16:9"
}'
# -> { "code":200, "data":"<taskId>" }响应示例
{
"code": 200,
"msg": "success",
"data": {
"id": "00eb0acfe12942368f95cea6065cf8c3",
"resultUrl": "https://cdn.novapi.ai/hunyuan/1791950035031_a4b29b00483b475781d7a9038560a578.png",
"status": "succeeded",
"errorMsg": null,
"createTime": "2026-10-14 11:53:25",
"completeTime": "2026-10-14 11:53:55"
}
}⏳ 文件链接保存 15 天,到期自动删除,请及时下载转存。
响应字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| code | number | 200 表示请求成功 |
| data.id | string | 任务 ID(taskId) |
| data.status | string | queued / running / succeeded / failed |
| data.resultUrl | string | 结果地址(我方 CDN,长期有效);多个结果用英文逗号分隔;未完成或失败为 null |
| data.errorMsg | string | null | 失败原因;成功时为 null |