跳转到内容
打开 Castaly控制台

图片

gpt-image-2.5-sunburst API

通过 Modelflare 使用 gpt-image-2.5-sunburst,使用本页显示的精确模型 ID。

使用精确模型 ID gpt-image-2.5-sunburst。请求中的模型名必须与本页完全一致。

黄昏的停车场顶层,胶片条带在身着钴蓝风衣的女性身旁展开成发光的带状螺旋。

示例输出gpt-image-2.5-sunburstPOST /v1/images/generations

请求参数:size=1536x1024n=1

提示词:The open top deck of a car park at dusk, wet asphalt still throwing back the sky. A woman in a cobalt-blue structured trench coat has just thrown a stack of contact sheets and film strips out of her hands. The strips are not falling: they have started to unwind and climb around her in a slow rotating ribbon, every frame lit a different neon colour, magenta and acid green and amber running through the coil. One hard magenta light rakes across the deck from behind her, the city beyond still cold blue. Wide low camera, 35mm, real weight in the paper, film grain, slight vignette, no text.

生成该示例的请求
{
"model": "gpt-image-2.5-sunburst",
"prompt": "The open top deck of a car park at dusk, wet asphalt still throwing back the sky. A woman in a cobalt-blue structured trench coat has just thrown a stack of contact sheets and film strips out of her hands. The strips are not falling: they have started to unwind and climb around her in a slow rotating ribbon, every frame lit a different neon colour, magenta and acid green and amber running through the coil. One hard magenta light rakes across the deck from behind her, the city beyond still cold blue. Wide low camera, 35mm, real weight in the paper, film grain, slight vignette, no text.",
"n": 1,
"size": "1536x1024"
}

使用 Modelflare API Key,通过 https://modelflare.dev/v1 发送请求。网关入口为 POST /v1/images/generations。

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
终端窗口bash
curl https://modelflare.dev/v1/images/generations \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.5-sunburst",
"prompt": "一只白猫在雨夜霓虹街道上奔跑",
"size": "1536x1024", "quality": "xhigh", "background": "opaque", "output_format": "jpeg",
"output_compression": 85, "moderation": "auto", "n": 1
}'

GPT Image 2.5 Sunburst 面向更高保真度和控制力的精细创作与编辑;生成与编辑都保留 images[]、image[]、mask、xhigh/max 和输出控制字段。

GPT Image 2.5 使用 OpenAI 兼容 Images API。生成支持 JSON,编辑支持 JSON 图片引用或 multipart 文件上传;响应在 data[].b64_json 返回 Base64 图片。

字段 必填 说明
model 是 gpt-image-2.5-sunburst
prompt 是 生图或编辑指令,长度为 1–32,000 个字符
images[] 条件 JSON 编辑时最多 16 个 file_id 或 image_url 对象
images[].file_id 条件 已上传文件的 File API ID
images[].image_url 条件 图片 URL 或 Base64 data URL;data URL 最大 20,971,520 个字符
image 条件 multipart 单张源图;多图改用 image[]
image[] 条件 multipart 编辑时最多 16 张源图
mask 否 带 Alpha、与第一张源图同格式和尺寸,且小于 50 MB
size 否 auto 或自定义 WIDTHxHEIGHT;宽高为 16 的倍数、宽高比 1:3–3:1、单边不超过 3,840、总像素 655,360–8,294,400
quality 否 low / medium / high / xhigh / max / auto;默认 auto
background 否 auto / opaque / transparent;透明背景必须搭配 PNG 或 WebP 输出
output_format 否 png / jpeg / webp;默认 png
output_compression 否 JPEG/WebP 取 0–100,默认 100;PNG 忽略此参数
moderation 否 auto / low;默认 auto
n 否 1–10 张,默认 1

GPT Image 2.5 的 Flare 与 Sunburst 都支持最多 16 张编辑输入;JSON 编辑使用 images[](每项为 file_id 或 image_url),multipart 编辑使用 image/image[],单张源图和蒙版小于 50 MB。提示词长度为 1–32,000 个字符;质量支持 low/medium/high/xhigh/max/auto;尺寸规则为 16 倍数、1:3–3:1、单边不超过 3,840、总像素 655,360–8,294,400。透明背景必须使用 PNG 或 WebP;压缩仅作用于 JPEG/WebP,PNG 会忽略。高于 2560x1440 的分辨率属于实验能力。响应从 data[].b64_json 读取,不能传入 DALL·E 专用的 response_format。Flare 适合快速高质量日常生成与编辑,Sunburst 适合更高保真度和控制力的创作与编辑。

GPT Image 2.5 支持 JSON 图片引用和 multipart 文件上传;两种形式都使用 /v1/images/edits。JSON 输入最多 16 个对象,每项使用 file_id 或 image_url;multipart 输入最多 16 张源图。不要在同一个请求中混用 images 与 image/image[]。

终端窗口bash
curl https://modelflare.dev/v1/images/edits \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.5-sunburst",
"images": [{"file_id": "file-example123"}, {"image_url": "https://example.com/reference.png"}],
"prompt": "保持产品主体不变,将背景替换为暖色摄影棚渐变",
"size": "1536x1024", "quality": "xhigh", "background": "opaque", "output_format": "png", "n": 1
}'
终端窗口bash
curl https://modelflare.dev/v1/images/edits \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-F "model=gpt-image-2.5-sunburst" \
-F "image[]=@/path/to/product.png" \
-F "mask=@/path/to/mask.png" \
-F "prompt=保持产品主体不变,将背景替换为暖色摄影棚渐变" \
-F "size=1536x1024" \
-F "quality=xhigh" \
-F "background=opaque" \
-F "output_format=png" \
-F "n=1"

生成和编辑都从 data[] 读取结果。GPT Image 2.5 返回 Base64 图片,不要按 URL 响应处理。

字段 说明
created 创建时间,Unix 秒级时间戳
data 生成或编辑图片结果数组
data[].b64_json Base64 编码的图片数据
background 最终背景模式:opaque 或 transparent
output_format 返回图片格式:png、jpeg 或 webp
quality 实际使用的质量档位
size 最终尺寸,格式为宽x高

参数不符合模型契约时,接口会返回带 request ID 的 4xx;响应字段和错误消息以当前模型接口为准。

本页只覆盖 Modelflare 的模型生成/编辑调用。搜索或地图增强、声音管理、元素库管理等资源型接口不属于本页的公开调用范围,也不需要作为模型请求字段传入。

本模型按 Token 计费。请查看模型价格页查看当前销售价、参考原价和完整规格。

媒体契约 · v1

契约 ID: media.gpt-image-2-5-sunburst.v1Adapter: image.openai.edit.v1@v1指纹: b510eb6a7bb6c393959a811f0f3a5689ee5b9501bfbf2daa85eeb25889cd24ad

官方来源: OpenAI

契约参数

Intent 字段控件选项
sizeselectauto / 1024x1024 / 1536x1024 / 1024x1536
qualityselectlow / medium / high
output_formatselectpng / jpeg / webp
backgroundselectauto / opaque / transparent
moderationselectauto / low
nnumber—
output_compressionnumber—

支持能力

  • allowed_values · size · auto, 1024x1024, 1536x1024, 1024x1536
  • allowed_values · quality · low, medium, high
  • max_assets · reference_asset_ids · 16

结构化请求示例

text

Intent

{
  "background": "auto",
  "moderation": "auto",
  "n": 1,
  "output_compression": 1,
  "output_format": "png",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "quality": "medium",
  "size": "auto"
}

上游请求

{
  "background": "auto",
  "model": "gpt-image-2.5-sunburst",
  "moderation": "auto",
  "n": 1,
  "output_compression": 1,
  "output_format": "png",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "quality": "medium",
  "size": "auto"
}

reference

Intent

{
  "background": "auto",
  "moderation": "auto",
  "n": 1,
  "output_compression": 1,
  "output_format": "png",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "quality": "medium",
  "size": "auto"
}

上游请求

{
  "background": "auto",
  "images": [
    {
      "image_url": "https://example.com/reference.png"
    }
  ],
  "model": "gpt-image-2.5-sunburst",
  "moderation": "auto",
  "n": 1,
  "output_compression": 1,
  "output_format": "png",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "quality": "medium",
  "size": "auto"
}