图片
gpt-image-2.5-flare API
通过 Modelflare 使用 gpt-image-2.5-flare,使用本页显示的精确模型 ID。
使用精确模型 ID gpt-image-2.5-flare。请求中的模型名必须与本页完全一致。

请求参数:size=1536x1024quality=mediumn=1
提示词:Children's picture-book illustration: a small fox carrying a paper lantern through a snowy birch forest at dusk, soft gouache textures, gentle blues and warm orange glow, friendly and calm, no text.
{ "model": "gpt-image-2.5-flare", "prompt": "Children's picture-book illustration: a small fox carrying a paper lantern through a snowy birch forest at dusk, soft gouache textures, gentle blues and warm orange glow, friendly and calm, no text.", "n": 1, "size": "1536x1024", "quality": "medium"}使用 Modelflare API Key,通过 https://modelflare.dev/v1 发送请求。网关入口为 POST /v1/images/generations。
Authorization: Bearer YOUR_MODELFLARE_API_KEYcurl https://modelflare.dev/v1/images/generations \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2.5-flare", "prompt": "一只白猫在雨夜霓虹街道上奔跑", "size": "1536x1024", "quality": "high", "background": "opaque", "output_format": "jpeg", "output_compression": 85, "moderation": "auto", "n": 1 }'GPT Image 2.5 Flare 是快速、高质量生成和日常编辑的默认选择;生成与编辑都保留 images[]、image[]、mask 和完整输出控制字段。
GPT Image 2.5 使用 OpenAI 兼容 Images API。生成支持 JSON,编辑支持 JSON 图片引用或 multipart 文件上传;响应在 data[].b64_json 返回 Base64 图片。
| 字段 | 必填 | 说明 |
|---|---|---|
model |
是 | gpt-image-2.5-flare |
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 |
响应与输入限制
Section titled “响应与输入限制”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[]。
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-flare", "images": [{"file_id": "file-example123"}, {"image_url": "https://example.com/reference.png"}], "prompt": "保持产品主体不变,将背景替换为暖色摄影棚渐变", "size": "1536x1024", "quality": "high", "background": "opaque", "output_format": "png", "n": 1 }'curl https://modelflare.dev/v1/images/edits \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -F "model=gpt-image-2.5-flare" \ -F "image[]=@/path/to/product.png" \ -F "mask=@/path/to/mask.png" \ -F "prompt=保持产品主体不变,将背景替换为暖色摄影棚渐变" \ -F "size=1536x1024" \ -F "quality=high" \ -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高 |
错误与失败任务
Section titled “错误与失败任务”参数不符合模型契约时,接口会返回带 request ID 的 4xx;响应字段和错误消息以当前模型接口为准。
本页只覆盖 Modelflare 的模型生成/编辑调用。搜索或地图增强、声音管理、元素库管理等资源型接口不属于本页的公开调用范围,也不需要作为模型请求字段传入。
本模型按 Token 计费。请查看模型价格页查看当前销售价、参考原价和完整规格。
媒体契约 · v1
官方来源: OpenAI
契约参数
| Intent 字段 | 控件 | 选项 |
|---|---|---|
size | select | auto / 1024x1024 / 1536x1024 / 1024x1536 |
quality | select | low / medium / high |
output_format | select | png / jpeg / webp |
background | select | auto / opaque / transparent |
moderation | select | auto / low |
n | number | — |
output_compression | number | — |
支持能力
allowed_values·size· auto, 1024x1024, 1536x1024, 1024x1536allowed_values·quality· low, medium, highmax_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-flare",
"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-flare",
"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"
}