##所有接口均需要使用Bearer Token进行认证##
获取 API Key :
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY图像生成模型名称
gpt-image-1.5-lite "gpt-image-1.5-lite"
提示词,描述想要生成的图像,或描述如何编辑已输入的图像,限制为2000token
2000"海面上绚丽多彩的美丽日落"
生成图像的尺寸,支持两种格式:
简化比例格式:
1:1:正方形2:3:竖版3:2:横版像素格式:
1024x1024:正方形1024x1536:竖版1536x1024:横版1:1, 2:3, 3:2, 1024x1024, 1024x1536, 1536x1024 "1024x1024"
生成图像的质量
支持的质量等级:
low:低质量,生成速度快medium:中等质量high:高质量,生成速度慢auto:自动选择(默认)low, medium, high, auto "auto"
参考图像URL列表,用于图生图与图像编辑功能
注意:
1~16张50MB.jpeg、.jpg、.png、.webp.png、.jpg)[
"https://example.com/image1.png",
"https://example.com/image2.png"
]生成图像的数量,目前仅支持1张
1 1
图像任务创建成功
任务创建时间戳
1757156493
任务ID
"task-unified-1757156493-imcg5zqt"
实际使用的模型名称
"gpt-image-1.5-lite"
任务的具体类型
image.generation.task 任务进度百分比 (0-100)
0 <= x <= 1000
任务状态
pending, processing, completed, failed "pending"
异步任务信息
任务的输出类型
text, image, audio, video "image"
使用量和计费信息