GPT Image 2.5 Sunburst
https://api.hiapi.ai /v1/tasks 图片、视频和音频模型通过 统一异步接口 POST /v1/tasks 调用,区别只在 input 字段(见下方 input 参数)。
模型概览
| 模型名称 | gpt-image-2.5-sunburst |
|---|---|
| 类型 | 文生图 / 图像编辑 |
| 输出 | 每次请求生成一张图片 |
| 价格 | 查看实时价格 |
GPT Image 2.5 Sunburst 使用同一个模型 ID 完成文生图和图像编辑,支持最多 16 张参考图、六档画质,以及比例或像素尺寸选择。
生产建议
- 只使用提示词时省略 image_urls;需要编辑或参考时传入图片地址,不要传空数组。
- 每次请求生成一张图片。生成后及时下载或转存结果,避免临时结果地址过期。
- 透明背景需要 PNG 或 WebP 格式;也请在提示词中说明主体和背景要求。
适用场景
描述主体、材质、构图与光线,从文字生成完整画面。
promptaspect_ratio通过参考图提供主体或风格,并说明需要改变和保留的元素。
promptimage_urls请求参数
model string 必填 选择此模型。
input object 必填 图片生成或编辑参数。
prompt string 必填 描述需要生成的画面;编辑图片时,说明要修改和保留的内容。长度为 1–32000 个字符。
image_urls string[] 可选 用于编辑或视觉参考的图片 URL 数组,传入时包含 1–16 张图片。纯文生图请省略此字段;多图时按数组顺序说明每张图片的用途。
aspect_ratio enum 可选 选择输出画幅比例,或直接选择宽x高像素尺寸。auto 由模型选择适合内容的画幅;像素尺寸使用小写 x 分隔。
比例预设
1:13:22:34:33:416:99:16auto 像素尺寸
1024x10241536x10241024x15361536x11521152x15362048x20482048x11521152x20483840x21602160x3840 quality enum 可选 选择图片质量档位。low、medium、high、xhigh、max 提供不同的细节程度;auto 由模型决定。
background enum 可选 背景方式:auto 自动选择,transparent 请求透明背景,opaque 请求不透明背景。
output_format enum 可选 下载图片的文件格式。需要透明背景时选择 PNG 或 WebP;JPEG 不支持透明度。
callback object 可选 设置任务完成后的通知。
url string 必填 接收任务终态通知的 HTTPS 地址。
when enum 可选 任务成功或失败时触发通知。
用例示例
将示例地址替换为待编辑的漆柜图片,只改变中央月相嵌饰,同时保留周围装饰、柜体与光线。
{
"model": "gpt-image-2.5-sunburst",
"input": {
"prompt": "Change only the central crescent-moon inlay on the open lacquer cabinet into a perfectly circular total lunar eclipse disc made from deep crimson mother-of-pearl with a thin copper-gold halo. Preserve every surrounding shell fragment, gold-wire constellation, cabinet shape, door angle, brass hinge, conservation tool, tray, lacquer reflection, camera position, focus, lighting direction, shadow, and background exactly. Do not add, remove, move, resize, or recolor anything else. No text, logos, people, animals, perfume, or watches.",
"image_urls": [
"https://example.com/reference.webp"
],
"aspect_ratio": "1:1",
"quality": "high",
"background": "opaque",
"output_format": "webp"
}
}从文字生成漆器修复工作室中的螺钿月相柜,展示贝壳镶嵌、金丝星图与黑漆细节。
{
"model": "gpt-image-2.5-sunburst",
"input": {
"prompt": "Create a museum-grade square still-life photograph inside a quiet lacquer conservation studio. Center an open, deep black urushi lacquer jewelry cabinet on a charcoal conservation table. Its doors and interior panels contain an intricate lunar map made from hundreds of tiny iridescent mother-of-pearl fragments, hair-thin gold wire constellations, miniature brass hinges, and hand-polished black lacquer with controlled mirror reflections. Around it place only precise archival tools: fine tweezers, a sable brush, a linen glove, and two labeled-free shell trays. A single warm raking task lamp reveals nacre rainbow colors and minute surface texture against an obsidian background. Symmetrical yet natural composition, exceptional micro-detail, restrained black, pearl, teal, violet, and champagne-gold palette, luxury craft editorial photography, no people, no animals, no perfume, no watches, no text, no logos, no watermark.",
"aspect_ratio": "1:1",
"quality": "high",
"background": "opaque",
"output_format": "webp"
}
}获取结果
- 提交后获得 taskId,图片将在后台生成。
- 轮询 GET /v1/tasks/:id,或等待 callback.url 接收终态通知。
- status=success 时,从 data.output[].url 保存图片,并留意 expireAt。
- status=fail 时查看 data.error,修正请求后再决定是否重新提交。
常见问题
文生图和图生图需要不同的模型 ID 吗?
不需要。使用本页的同一模型 ID;省略 image_urls 为文生图,传入图片则用于编辑或视觉参考。
多张参考图应该如何组织?
按 image_urls 的顺序说明每张图片承担的角色,例如第一张作为商品主体,第二张作为场景参考,同时写出应保留的元素。
怎样选择尺寸?
常用画幅可选择比例值;需要准确像素尺寸时,从 aspect_ratio 参数列出的宽x高枚举中选择。不要传入枚举之外的自定义尺寸。
是否需要分别创建 API Key?
使用 HiAPI 控制台创建的 API Key,并以 Bearer Token 发送即可。密钥应保存在服务端。