圖片
gpt-image-2.5-sunburst API
透過 Modelflare 使用本頁顯示的確切型號 ID 呼叫 gpt-image-2.5-sunburst。
使用準確的型號 ID gpt-image-2.5-sunburst。模型欄位必須與此頁面完全相符。

參數: 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"}身份驗證與端點
Section titled “身份驗證與端點”將 Modelflare API 金鑰與 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-sunburst", "prompt": "A white cat runs through a neon-lit street in the rain", "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 相容的圖像 API。產生使用JSON;編輯接受 JSON 影像引用或多部分檔案;回應傳回 data[].b64_json 中的 Base64 影像資料。
| 場 | 必填 | 註釋 |
|---|---|---|
model |
是 | gpt-image-2.5-sunburst |
prompt |
是 | 產生或編輯指令,1–32,000 個字符 |
images[] |
有條件 | 對於 JSON 編輯,最多 16 個 file_id 或 image_url 對象 |
images[].file_id |
有條件 | 上傳檔案API ID |
images[].image_url |
有條件 | 圖片 URL 或 Base64 資料 URL;資料 URL 限制為 20,971,520 個字符 |
image |
有條件 | 一個多部分來源檔案;對多個檔案使用 image[] |
image[] |
有條件 | 對於多部分編輯,最多 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;多部分編輯使用 image/image[],每個來源影像和遮罩小於 50 MB。提示符號為 1–32,000 個字元;畫質支援low/medium/high/xhigh/max/auto;尺寸規則為 16 像素倍數、1:3–3:1 寬高比、最大邊緣 3,840 像素、總像素倍數 655,360,25,360,409 像素、總像素 65,360,49,360,094,009,094。透明背景需要PNG或WebP;壓縮僅適用於 JPEG/WebP,對於 PNG 會被忽略。 2560x1440 以上的解析度是實驗性的。閱讀data[].b64_json;不要發送 DALL·E-only response_format。 Flare 是日常生成和編輯的快速、高品質的預設; Sunburst 適用於更高保真度、更高控制力的工作。
GPT Image 2.5 支援 JSON 影像引用和透過 /v1/images/edits 進行分段檔案上傳。 JSON 使用 file_id 或 image_url 最多接受 16 個物件; 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-sunburst", "images": [{"file_id": "file-example123"}, {"image_url": "https://example.com/reference.png"}], "prompt": "Keep the product unchanged and replace the background with a warm studio gradient", "size": "1536x1024", "quality": "xhigh", "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-sunburst" \ -F "image[]=@/path/to/product.png" \ -F "mask=@/path/to/mask.png" \ -F "prompt=Keep the product unchanged and replace the background with a warm studio gradient" \ -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 |
最終尺寸為 WIDTHxHEIGHT |
錯誤與失敗的任務
Section titled “錯誤與失敗的任務”無效的模型參數傳回帶有請求ID的4xx;使用所選模型合約定義的回應欄位和錯誤訊息。
此頁面涵蓋 Modelflare 模型產生和編輯呼叫。搜尋或地圖豐富、語音管理和元素庫管理是此公共模型呼叫表面之外的資源 API,並且不是必需的請求欄位。
此模型使用基於令牌的計費。請參閱 型號定價頁面 ,以了解當前客戶價格、參考標價和完整規格。
媒體合約 · v1
官方來源: OpenAI
合約參數
| 意圖字段 | 控制項 | 選項 |
|---|---|---|
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
意圖
{
"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
意圖
{
"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"
}