Skip to content

全能图像模型 2.5 Pro ​

任务进度与结果查询见 使用说明。

说明 ​

异步任务接口,用于提交全能图像模型 2.5 Pro 图片生成任务。该模型对应 GPT Image 2.5 Sunburst,支持纯文字生成图片,也支持上传参考图后通过文字指令编辑图片。模型支持精准生成与编辑,复制指令稳定还原。

请求地址 ​

http
POST /open/v1/ai_creation/task/submit
http
access_token: {{access_token}}
Content-Type: application/json

请求参数 Body ​

json
{
  "ref_img_url": [
    "https://res.chanjing.cc/chanjing/res/aigc_creation/photo/ref.jpg"
  ],
  "ref_prompt": "将女生头发改成红色",
  "creation_type": 3,
  "aspect_ratio": "1:1",
  "clarity": 2048,
  "quality_mode": "medium",
  "number_of_images": 1,
  "pay_currency": "bean",
  "model_code": "image2.5_sunburst"
}

参数说明

字段类型是否必传示例说明
ref_img_urlarray<string>否["https://res.chanjing.cc/chanjing/res/aigc_creation/photo/ref.jpg"]参考图 URL 列表,不传则为文生图;最多 10 张
ref_promptstring是将女生头发改成红色图片生成或编辑指令
creation_typeint是3创作类型,图片生成为 3
aspect_ratiostring是1:1输出图片宽高比,支持 1:1、3:2、2:3、3:4、4:3、16:9、9:16、21:9、9:21
clarityint是2048图片分辨率,支持 1024、2048、4096,分别对应 1K、2K、4K
quality_modestring是medium输出画质,支持 low、medium、high、xhigh、max
number_of_imagesint是1本次任务生成图片数量,1-4 张
pay_currencystring否bean支付币种,bean 为蝉豆,magic 为魔力;默认 bean
model_codestring是image2.5_sunburst模型编码,固定为 image2.5_sunburst

参考图仅作为模型的整体输入,不支持在提示词中使用 @图片N 指定某一张图片。

总费用按“输出规格单价 x 生成数量 + 参考图单张附加价 x 实际参考图数量”计算。输出规格单价由 quality_mode 和 clarity 共同决定,具体价格和预计扣费请通过蝉镜 AIGC 价格计算器查询。

响应示例 ​

json
{
  "trace_id": "96afa792520b0e6a86d72e89435bc0a7",
  "code": 0,
  "msg": "success",
  "data": "a60747d7-dc05-4afc-b2ef-ee4370ed53c6"
}

响应字段说明 ​

字段说明
code响应状态码
msg响应信息
trace_id请求链路追踪 ID
data创作任务唯一 ID(unique_id)

响应状态码说明 ​

code说明
0响应成功
400传入参数格式错误
10400AccessToken 验证失败
40000参数错误
40001超出 QPS 限制
50000系统内部错误

示例代码 ​

shell
curl --location --request POST 'https://open-api.chanjing.cc/open/v1/ai_creation/task/submit' \
--header 'access_token: {{access_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "ref_prompt": "生成一张高级感品牌视觉图,准确保留文字与版式,真实材质,细节清晰",
  "creation_type": 3,
  "aspect_ratio": "1:1",
  "clarity": 2048,
  "quality_mode": "medium",
  "number_of_images": 1,
  "pay_currency": "bean",
  "model_code": "image2.5_sunburst"
}'
go
payload := strings.NewReader(`{
  "ref_prompt": "生成一张高级感品牌视觉图,准确保留文字与版式,真实材质,细节清晰",
  "creation_type": 3,
  "aspect_ratio": "1:1",
  "clarity": 2048,
  "quality_mode": "medium",
  "number_of_images": 1,
  "pay_currency": "bean",
  "model_code": "image2.5_sunburst"
}`)
java
RequestBody body = RequestBody.create(mediaType, "{\n  \"ref_prompt\": \"生成一张高级感品牌视觉图,准确保留文字与版式,真实材质,细节清晰\",\n  \"creation_type\": 3,\n  \"aspect_ratio\": \"1:1\",\n  \"clarity\": 2048,\n  \"quality_mode\": \"medium\",\n  \"number_of_images\": 1,\n  \"pay_currency\": \"bean\",\n  \"model_code\": \"image2.5_sunburst\"\n}");
py
payload = json.dumps({
  "ref_prompt": "生成一张高级感品牌视觉图,准确保留文字与版式,真实材质,细节清晰",
  "creation_type": 3,
  "aspect_ratio": "1:1",
  "clarity": 2048,
  "quality_mode": "medium",
  "number_of_images": 1,
  "pay_currency": "bean",
  "model_code": "image2.5_sunburst"
})