imagesarray必填
The URLs of the images to use for image-to-image generation or image editing.
openai/gpt-image-2.5-flare/editGPT Image 2.5 Flare Edit is optimized for fast, high-quality image editing and multi-image composition.
試用這個模型
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
選擇一個範例,將其輸入與結果載入 playground。
{
"aspect_ratio": "16:9",
"images": [
"https://static.sandbase.ai/examples/3d800313-e314-4b73-b077-338c4e480f05/input/59dc1c2e-d32e-4373-973a-e3774421951f.png"
],
"prompt": "Create a realistic billboard mockup of the shampoo on a highway scene during sunset.\nBillboard text (EXACT, verbatim, no extra characters):\n\"Fresh and clean\"\nTypography: bold sans-serif, high contrast, centered, clean kerning.\nEnsure text appears once and is perfectly legible.\nNo watermarks, no logos."
}{
"aspect_ratio": "16:9",
"images": [
"https://static.sandbase.ai/examples/0e28f4cf-6cda-4abe-97ba-0a003d2bea1e/input/a49736c0-87a7-4bbb-b2a7-30136569bed5.png"
],
"prompt": "Turn this drawing into a photorealistic image.\nPreserve the exact layout, proportions, and perspective.\nChoose realistic materials and lighting consistent with the sketch intent.\nDo not add new elements or text."
}{
"aspect_ratio": "16:9",
"images": [
"https://static.sandbase.ai/examples/0e39dfef-6acd-4cc3-b89e-941defe58897/input/36bc1a5d-627c-4ef0-8f14-24a267fceb34.jpeg"
],
"prompt": "In this room photo, replace ONLY white with chairs made of wood.\nPreserve camera angle, room lighting, floor shadows, and surrounding objects.\nKeep all other aspects of the image unchanged.\nPhotorealistic contact shadows and fabric texture."
}{
"images": [
"https://static.sandbase.ai/examples/252f4520-5a86-4751-9ac0-7df448a41974/input/ea1dddac-515c-43bf-94de-768d9b69ebe2.png",
"https://static.sandbase.ai/examples/252f4520-5a86-4751-9ac0-7df448a41974/input/42a9f30a-828b-4e7c-ae56-9ecdaffec082.png",
"https://static.sandbase.ai/examples/252f4520-5a86-4751-9ac0-7df448a41974/input/4f11da88-1885-4b3a-a32d-09715f765ec1.png",
"https://static.sandbase.ai/examples/252f4520-5a86-4751-9ac0-7df448a41974/input/98e8110a-07a6-41b4-a733-7391365c82c7.png"
],
"output_format": "png",
"prompt": "Create a premium photorealistic spa bathroom scene using all four products from the reference images.\n\nArrange the body lotion, artisan soap, incense burner, and bath bomb together on a natural stone vanity beside a softly steaming bathtub. Add neatly folded white towels, a small eucalyptus branch, warm candlelight, and subtle morning sunlight coming through a frosted window.\n\nPreserve the recognizable shape, material, color, proportions, and visible label details of every referenced product. Each of the four products must appear exactly once and remain clearly visible.\n\nUse an elegant editorial product-photography composition with realistic reflections, soft shadows, shallow depth of field, and refined neutral colors. The result should feel luxurious, calm, cohesive, and suitable for a premium wellness campaign.\n\nDo not use a gift basket, gift box, ribbon, or additional branded products. Do not duplicate, merge, deform, or obscure any referenced item. No extra text, no watermark, and no unrelated logos.",
"quality": "high"
}GPT Image 2.5 Flare edit: fast edits and multi-image composition with GPT Image 2.5.
| Field | Type | Default | Notes |
|---|---|---|---|
images | image URL[], required | — | Images to edit or combine, Image 1, Image 2, … |
prompt | string, required | — | Up to 50,000 characters. |
quality | low / medium / high / xhigh / max | high | Higher quality costs more; high is the default. |
resolution | 1k / 2k / 4k | — | Output size tier; omit for 1K. |
aspect_ratio | 1:1 / 1:2 / 2:1 / 1:3 / 3:1 / 2:3 / 3:2 / 3:4 / 4:3 / 4:5 / 5:4 / 9:16 / 16:9 / 9:21 / 21:9 | — | Omit to follow the first input image. |
output_format | jpeg / png / webp | png | Output file format. |
Price depends on quality and resolution, per output image, plus $0.015 for each input image after the first:
| Quality, 1 input | 1k | 2k | 4k |
|---|---|---|---|
| low | $0.025 | $0.035 | $0.045 |
| medium | $0.039 | $0.055 | $0.085 |
| high (default) | $0.105 | $0.165 | $0.285 |
| xhigh | $0.175 | $0.285 | $0.495 |
| max | $0.375 | $0.615 | $1.015 |
Failed runs are not charged.
Other GPT Image endpoints: openai/gpt-image-2.5-sunburst, openai/gpt-image-2.5-sunburst/edit, openai/gpt-image-2.5-flare, openai/gpt-image-2, openai/gpt-image-2/edit.
開始建置
透過 SandBase Unified Run API 提交此模型。
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "openai/gpt-image-2.5-flare/edit",
"images": [
"https://cdn.openai.com/API/docs/images/body-lotion.png",
"https://cdn.openai.com/API/docs/images/soap.png",
"https://cdn.openai.com/API/docs/images/incense-kit.png",
"https://cdn.openai.com/API/docs/images/bath-bomb.png"
],
"prompt": "Generate a photorealistic image of a gift basket on a white background labeled 'Relax & Unwind' with a ribbon and handwriting-like font, containing all the items in the reference pictures.",
"quality": "high",
"output_format": "png"
}
SANDBASE_JSON
)
printf '%s\n' "$result"建立 SandBase API 金鑰,並將其設定在伺服器環境中。所有請求都使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開,也不要提交到儲存庫。
在模型的 image、video 或 audio 欄位中傳入可公開存取的檔案 URL。支援格式與限制會顯示在每個 Playground 輸入欄位旁。
在 Playground 中支援的圖片欄位上使用上傳或取代控制項。影片 URL 欄位可接受託管的 driving video;它們不代表支援影片上傳。
imagesarray必填The URLs of the images to use for image-to-image generation or image editing.
promptstring必填The text prompt to generate an image from.
預設:"Generate a photorealistic image of a gift basket on a white background labeled 'Relax & Unwind' with a ribbon and handwriting-like font, containing all the items in the reference pictures."
qualitystringRendering quality. `xhigh` and `max` add detail at higher latency and cost.
預設:"high"
可能值:"low", "medium", "high", "xhigh", "max"
resolutionstringThe resolution of the generated image. Leave unset to preserve the provider's standard dimensions.
可能值:"1k", "2k", "4k"
aspect_ratiostringThe aspect ratio of the generated image.
可能值:"1:1", "1:2", "2:1", "1:3", "3:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "9:21", "21:9"
output_formatstringThe format of the generated image.
預設:"png"
可能值:"jpeg", "png", "webp"
{
"model": "openai/gpt-image-2.5-flare/edit",
"images": [
"https://cdn.openai.com/API/docs/images/body-lotion.png",
"https://cdn.openai.com/API/docs/images/soap.png",
"https://cdn.openai.com/API/docs/images/incense-kit.png",
"https://cdn.openai.com/API/docs/images/bath-bomb.png"
],
"prompt": "Generate a photorealistic image of a gift basket on a white background labeled 'Relax & Unwind' with a ribbon and handwriting-like font, containing all the items in the reference pictures.",
"quality": "high",
"output_format": "png"
}已完成的執行會在輸出中顯示結果。以下為模型已儲存的範例,並非新的生成結果。
[
{
"source": "OpenAI Cookbook prompt (MIT)",
"source_url": "https://developers.openai.com/cookbook/examples/multimodal/image-gen-models-prompting-guide",
"url": "https://static.sandbase.ai/examples/3d800313-e314-4b73-b077-338c4e480f05/output/6c6b7aac-79ef-4928-b79e-bff0bea45964.png"
}
]