CQTAI
GPT-Image · 图片

图生图

📌 这是什么基于参考图 + 文字生成新图。
💡 什么时候用有图想转风格时用。

接口地址

用途方法路径
提交任务POST/api/cqt/generator/sora
查询结果GET/api/cqt/info/sora?id={taskId}
建议轮询时间建议每 30 秒轮询一次(响应含 progress 0~1 可显示进度)。

请求参数

参数类型必填说明
modelstring必填gpt-image-1 / gpt-image-1.5(4 积分)、gpt-image-2(6 积分)
promptstring必填生成描述(1–4000 字符)
filesUrlstring[]必填参考图 URL 数组
sizestring推荐直接传官方像素(默认 1024x1024)。方形 1024x1024 / 2048x2048(2K);横版 1536x1024 / 1792x1024 / 1920x1080 / 2048x1152(2K) / 3840x2160(4K);竖版 1024x1536 / 1024x1792 / 1080x1920 / 2160x3840(4K)。比例别名 1:1 / 2:3 / 3:2 / 16:9 / 9:16 仅兼容旧客户端、不再推荐;非法/缺省回落 1024x1024

请求示例

curl -X POST https://api.cqtai.com/api/cqt/generator/sora \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gpt-image-2",
    "prompt": "convert this photo into a watercolor",
    "filesUrl": ["https://example.com/input.jpg"],
    "size": "1024x1024"
  }'
# -> { "code":200, "data":"<taskId>" }

响应示例

{
  "code": 200,
  "msg": "success",
  "data": {
    "id": "<taskId>",
    "status": "succeeded",
    "resultUrl": "https://.../result.png",
    "createTime": "2026-06-15 10:00:00",
    "completeTime": "2026-06-15 10:00:20"
  }
}

计费与积分

4 / 6 / 12 积分/张(按模型)(× 你的用户费率)。任务失败自动退回。