跳至正文
image 2.5
繁體中文
開始創作

GPT Image 2.5 官方提示詞使用手冊2

官方指南裡所有「改圖」相關的方法都在這篇:八個圖像編輯場景、跨輪次迭代與角色一致性,外加一段可執行的官方程式範例。每段都是官方原文提示詞配兩個檔位的官方出圖,可以直接照著改。

編輯的寫法:改什麼、保什麼

生成類提示詞只描述畫面,編輯類提示詞要同時描述畫面與邊界。官方把這件事拆成兩個並行的清單:一個寫「要改什麼」,一個寫「必須不動的是什麼」。缺了後一個,模型就會順手把你沒提到的地方也重畫一遍。

官方給的編輯入口是介面裡的 client.images.edit,參考圖透過 image 參數傳入;需要遮罩的局部編輯另有對應做法。下面八個場景都建立在這一條寫法之上。

  • 說清「只改 X」,並列出要保留的細節:身分、幾何、版式、光線、標籤。
  • 把排除項也寫出來:不要多餘文字、不要標誌、不要浮水印。
  • 局部精修要額外點名飽和度、對比度、箭頭、機位與周圍物體。
  • 每張輸入圖都要分配角色並編號——主體、風格、服裝還是背景。
  • 一次只提一個改動,把上一輪輸出當作下一輪輸入,並重複要保留的細節。

場景一:翻譯文字並保留版式

官方這個範例用的輸入圖就是前面那台咖啡機的資訊圖:要求把圖裡的文字換成西班牙文,其他方面一概不動。出圖後要檢查兩件事——翻譯是否正確,以及有沒有殘留的原文。

這類提示詞的價值在於它只寫了一句,卻完整表達了「局部改動 + 全域凍結」的結構。

官方編輯參數:size="1024x1536",quality="high"。

官方提示詞(原文)
Translate the text in the infographic to Spanish. Do not change any other aspect of the image.
咖啡機資訊圖被翻譯為西班牙文後的結果,原版式保持,GPT Image 2.5 Flare 出圖
Flare官方範例出圖:Flare 檔位。檢查翻譯與殘留原文。
咖啡機資訊圖被翻譯為西班牙文後的結果,原版式保持,GPT Image 2.5 Sunburst 出圖
Sunburst官方範例出圖:Sunburst 檔位。

場景二:遷移視覺風格

風格遷移的關鍵是給參考圖一個明確的角色:這一張提供的是調色、質感還是媒介。官方範例把參考圖的作用限定為「風格」,新主體單獨描述,兩者不要混在一句話裡。

官方編輯參數:size="1024x1536",quality="medium"。

官方提示詞(原文)
Use the same style from the input image and generate a man riding a motorcycle on a white background.
用作風格參考的像素遊戲畫面
輸入圖官方輸入的風格參考圖:像素風遊戲畫面。
用參考風格生成的像素風摩托車騎士,白底,GPT Image 2.5 Flare 出圖
Flare官方範例出圖:Flare 檔位。
用參考風格生成的像素風摩托車騎士,白底,GPT Image 2.5 Sunburst 出圖
Sunburst官方範例出圖:Sunburst 檔位。

場景三:保持身分、更換服裝

這是官方演示「凍結清單」最完整的一段:先宣告只換服裝,然後把不許變的項目逐條列出——臉、五官、膚色、體型、姿勢、身分、神態、髮型、比例,連背景、機位、取景與畫質都要凍結,最後再排除配件、文字、標誌與浮水印。

同一個結構也適用於產品:要保留的是產品的可識別外形、標籤與材質,只允許一處發生變化。

官方編輯參數:size="1024x1536",quality="medium"。輸入圖:一張人物照片 + 三張服裝參考圖。

官方提示詞(原文)
Edit the image to dress the woman using the provided clothing images. Do not change her face, facial features, skin tone, body shape, pose, or identity in any way. Preserve her exact likeness, expression, hairstyle, and proportions. Replace only the clothing, fitting the garments naturally to her existing pose and body geometry with realistic fabric behavior. Match lighting, shadows, and color temperature to the original photo so the outfit integrates photorealistically, without looking pasted on. Do not change the background, camera angle, framing, or image quality, and do not add accessories, text, logos, or watermarks.
用作身分參考的女性照片,拍攝於博物館內
輸入圖 · 身分官方輸入圖:提供身分與姿勢的人物照片。
用作服裝參考的米色外套
輸入圖 · 服裝官方輸入圖:米色外套。
用作服裝參考的白色背心
輸入圖 · 服裝官方輸入圖:白色背心。
用作服裝參考的灰色靴子
輸入圖 · 服裝官方輸入圖:灰色靴子。
同一人物換上指定服裝後的合成結果,GPT Image 2.5 Flare 出圖
Flare官方範例出圖:Flare 檔位,檢查臉與身分是否被改動。
同一人物換上指定服裝後的合成結果,GPT Image 2.5 Sunburst 出圖
Sunburst官方範例出圖:Sunburst 檔位。

場景四:組合多張參考圖

多圖合成要交代三件事:把什麼元素搬走、搬到哪張圖的哪裡、以及除此之外什麼都不要改。官方範例把場景照作為第一張輸入、帶狗的照片作為第二張輸入,提示詞裡直接用編號指向對應圖片,並額外限制光線、構圖與背景沿用第一張。

官方編輯參數:size="1024x1536",quality="medium"。

官方提示詞(原文)
Place the dog from the second image into the setting of image 1, right next to the woman, use the same style of lighting, composition and background. Do not change anything else.
街景中的女性,多圖合成的第一張輸入圖
輸入圖 1官方輸入圖 1:提供場景、光線與構圖。
與狗合影的女性,多圖合成的第二張輸入圖
輸入圖 2官方輸入圖 2:提供要被搬走的元素。
狗被放進街景中女性身旁的合成結果,GPT Image 2.5 Flare 出圖
Flare官方範例出圖:Flare 檔位。
狗被放進街景中女性身旁的合成結果,GPT Image 2.5 Sunburst 出圖
Sunburst官方範例出圖:Sunburst 檔位。

場景五:透明產品去背

去背是唯一一個必須「提示詞 + 參數」雙管齊下的場景。官方要求提示詞裡既要主體居中、輪廓乾淨、沒有光暈與描邊、產品幾何與標籤可讀性精確保持,又要明確排除實底、棋盤格、場景與陰影;同時參數側設 background="transparent",輸出用 PNG 或 WebP,並且不要對 PNG 使用 output_compression。

後續如果要繼續編輯這張透明圖,官方提醒必須重複「保持透明背景」這一條。

官方編輯參數:size="1024x1536",quality="medium",background="transparent",output_format="png"。

官方提示詞(原文)
Extract the product from the input image and isolate it on a fully transparent background.
Output: centered product, crisp silhouette, no halos/fringing.
Preserve product geometry and label legibility exactly.
Add only light polishing. Do not add a solid backdrop, checkerboard, scenery, or shadow.
Do not restyle the product; remove the background and preserve clean alpha transparency.
原始洗髮精產品照片
輸入圖官方輸入圖:原始產品照片。
從原始照片中摳出的洗髮精,透明背景,GPT Image 2.5 Flare 出圖
Flare官方範例出圖:Flare 檔位。
從原始照片中摳出的洗髮精,透明背景,GPT Image 2.5 Sunburst 出圖
Sunburst官方範例出圖:Sunburst 檔位。

場景六:線稿轉寫實

線稿轉渲染這類工作流,官方把它定位成「把粗略草圖變成寫實概念圖,同時保留原本的意圖」。做法是把提示詞當規格來寫:先要求保持精確的版式、比例與透視,再讓模型自行選擇與草圖意圖一致的寫實材質與光線,最後加上「不要新增元素或文字」這道閘門,否則模型很可能按自己的理解重畫構圖。

官方編輯參數:size="1024x1536",quality="medium"。

官方提示詞(原文)
Turn this drawing into a photorealistic image.
Preserve the exact layout, proportions, and perspective.
Choose realistic materials and lighting consistent with the sketch intent.
Do not add new elements or text.
河谷的線條草圖
輸入圖官方輸入圖:河谷線稿。
從線稿渲染出的寫實河谷,GPT Image 2.5 Flare 出圖
Flare官方範例出圖:Flare 檔位。
從線稿渲染出的寫實河谷,GPT Image 2.5 Sunburst 出圖
Sunburst官方範例出圖:Sunburst 檔位。

場景七:移除畫面裡的物件

移除物件是最短的一類編輯提示詞:點名要移走的對象,然後凍結其餘全部。官方範例只寫了「把手裡的花去掉,其他什麼都不要改」,靠的就是後半句把人物、姿勢、光線與構圖全部鎖住,讓編輯停留在局部。

官方編輯參數:size="1024x1536",quality="medium"。

官方提示詞(原文)
Remove the flower from man's hand. Do not change anything else.
手持花朵、戴藍色帽子的男子
輸入圖官方輸入圖:待編輯的原始照片。
移除花朵之後的同一名男子,GPT Image 2.5 Flare 出圖
Flare官方範例出圖:Flare 檔位。
移除花朵之後的同一名男子,GPT Image 2.5 Sunburst 出圖
Sunburst官方範例出圖:Sunburst 檔位。

場景八:把人物放進新場景

把一個人放進全新場景,要同時處理身分保持與場景可信度。官方範例用的輸入圖就是博物館裡的那位女性,提示詞先要求畫面像「真實拍到的照片」而不是電影海報,再交代她的位置、朝向、服裝狀態與情緒,最後點出地點、時間與自然光線,並明確避開電影感打光、戲劇化調色與風格化構圖。

官方在這一節還有一條技術說明:遷移到 gpt-image-2 時要省略 input_fidelity 參數,因為圖像輸入始終按高保真處理。

官方編輯參數:size="1024x1536",quality="medium"。

官方提示詞(原文)
Generate a highly realistic action scene where this person is running away from a large, realistic brown bear attacking a campsite. The image should look like a real photograph someone could have taken, not an overly enhanced or cinematic movie-poster image.
She is centered in the image but looking away from the camera, wearing outdoorsy camping attire, with dirt on her face and tears in her clothing. She is clearly afraid but focused on escaping, running away from the bear as it destroys the campsite behind her.
The campsite is in Yosemite National Park, with believable natural details. The time of day is dusk, with natural lighting and realistic colors. Everything should feel grounded, authentic, and unstyled, as if captured in a real moment. Avoid cinematic lighting, dramatic color grading, or stylized composition.
人物在營地場景中躲避棕熊的動作場面,GPT Image 2.5 Flare 出圖
Flare官方範例出圖:Flare 檔位。
人物在營地場景中躲避棕熊的動作場面,GPT Image 2.5 Sunburst 出圖
Sunburst官方範例出圖:Sunburst 檔位。

多輪迭代:先出起始圖,再只改一個條件

官方的迭代寫法只有兩條規則:把上一輪的輸出作為下一輪的輸入,以及每次只改一個條件。這樣做的目的是讓「哪一步起了作用」這件事可歸因。

第一步用洗髮精產品照做一塊高速公路日落廣告牌,提示詞把廣告牌文案放進引號,要求原樣、只出現一次、清晰可讀,並排除浮水印與標誌。第二步只有一句話:把它變成下雪的冬夜——場景、版式、文案全部沿用上一輪的結果。

官方編輯參數(兩步相同):size="1024x1536",quality="medium"。

官方提示詞 · 第一步(原文)
Create a realistic billboard mockup of the shampoo on a highway scene during sunset.
Billboard text (EXACT, verbatim, no extra characters):
"Fresh and clean"
Typography: bold sans-serif, high contrast, centered, clean kerning.
Ensure text appears once and is perfectly legible.
No watermarks, no logos.
官方提示詞 · 第二步(原文)
Make it look like a winter evening with snowfall.
原始洗髮精產品照片,作為多輪迭代的起始輸入
輸入圖官方輸入圖:多輪迭代的起始輸入。
日落高速路旁的洗髮精廣告牌,GPT Image 2.5 Flare 出圖
第 1 輪 · Flare官方範例出圖:第一步結果,Flare 檔位。
日落高速路旁的洗髮精廣告牌,GPT Image 2.5 Sunburst 出圖
第 1 輪 · Sunburst官方範例出圖:第一步結果,Sunburst 檔位。
改成下雪冬夜之後的洗髮精廣告牌,GPT Image 2.5 Flare 出圖
第 2 輪 · Flare官方範例出圖:第二步結果,Flare 檔位。版式與文案沿用上一輪。
改成下雪冬夜之後的洗髮精廣告牌,GPT Image 2.5 Sunburst 出圖
第 2 輪 · Sunburst官方範例出圖:第二步結果,Sunburst 檔位。

角色一致性:先立角色,再換場景

給一本多插畫的書做圖,官方建議先建立一個可重用的角色參考,再在不同場景、姿勢與頁面之間複用它。做法是把角色的外貌、比例、服裝與氣質寫成一段固定的定義,每換一個場景就把這組定義重複一遍。

官方參數(第 1 步為生成,第 2 步為編輯):size="1024x1536",quality="medium"。

官方提示詞 · 立角色(原文)
Create a children's book illustration introducing a main character.

Character:
A young, storybook-style hero inspired by a little forest outlaw,
wearing a simple green hooded tunic, soft brown boots, and a small belt pouch.
The character has a kind expression, gentle eyes, and a brave but warm demeanor.
Carries a small wooden bow used only for helping, never harming.

Theme:
The character protects and rescues small forest animals like squirrels, birds, and rabbits.

Style:
Children's book illustration, hand-painted watercolor look,
soft outlines, warm earthy colors, whimsical and friendly.
Proportions suitable for picture books (slightly oversized head, expressive face).

Constraints:
- Original character (no copyrighted characters)
- No text
- No watermarks
- Plain forest background to clearly showcase the character
官方提示詞 · 延續故事(原文)
Continue the children's book story using the same character.

Scene:
The same young forest hero is gently helping a frightened squirrel
out of a fallen tree after a winter storm.
The character kneels beside the squirrel, offering reassurance.

Character Consistency:
- Same green hooded tunic
- Same facial features, proportions, and color palette
- Same gentle, heroic personality

Style:
Children's book watercolor illustration,
soft lighting, snowy forest environment,
warm and comforting mood.

Constraints:
- Do not redesign the character
- No text
- No watermarks
兒童繪本風格的森林小英雄角色介紹圖,GPT Image 2.5 Flare 出圖
立角色 · Flare官方範例出圖:第 1 步建立角色,Flare 檔位。
兒童繪本風格的森林小英雄角色介紹圖,GPT Image 2.5 Sunburst 出圖
立角色 · Sunburst官方範例出圖:第 1 步建立角色,Sunburst 檔位。
同一個森林小英雄在冬日雪林中救助松鼠的插畫,GPT Image 2.5 Flare 出圖
續表 · Flare官方範例出圖:第 2 步沿用同一角色,Flare 檔位。
同一個森林小英雄在冬日雪林中救助松鼠的插畫,GPT Image 2.5 Sunburst 出圖
續表 · Sunburst官方範例出圖:第 2 步沿用同一角色,Sunburst 檔位。

工作流一:替換房間裡的家具

官方把這類需求的目標定義為「外科手術式的真實感」:只換一個物體,同時保住機位、光線、陰影與周圍環境,讓結果看起來像一張真實照片而不是重新設計。提示詞的結構就是「只換 X + 凍結清單 + 材質要求」。

官方編輯參數:size="1536x1024",quality="medium"。

官方提示詞(原文)
In this room photo, replace ONLY the white chairs with chairs made of wood.
Preserve camera angle, room lighting, floor shadows, and surrounding objects.
Keep all other aspects of the image unchanged.
Photorealistic contact shadows and fabric texture.
放有白色椅子的原始廚房照片
輸入圖官方輸入圖:原始廚房照片。
白色椅子被替換為木椅後的廚房照片,GPT Image 2.5 Flare 出圖
Flare官方範例出圖:Flare 檔位。
白色椅子被替換為木椅後的廚房照片,GPT Image 2.5 Sunburst 出圖
Sunburst官方範例出圖:Sunburst 檔位。

工作流二:設計節日賀卡

季節性卡片要同時交代場景、情緒、材質、光線與確切文案。官方範例用懷舊泰迪熊場景演示,並且把「只允許出現這句文案」單獨寫成一條要求,原文照抄。

官方生成參數:size="1024x1536",quality="medium"。

官方提示詞(原文)
Create a Christmas holiday card illustration.

Scene:
a cozy Christmas scene with an old teddy bear sitting inside a keepsake box, slightly worn fur, soft stitching repairs, placed near a window with falling snow outside. The scene suggests the child has grown up, but the memories remain.

Mood:
Warm, nostalgic, gentle, emotional.

Style:
Premium holiday card photography, soft cinematic lighting,
realistic textures, shallow depth of field,
tasteful bokeh lights, high print-quality composition.

Constraints:
- Original artwork only
- No trademarks
- No watermarks
- No logos

Include ONLY this card text (verbatim):
"Merry Christmas — some memories never fade."
窗邊放著舊泰迪熊的聖誕賀卡插圖,GPT Image 2.5 Flare 出圖
Flare官方範例出圖:Flare 檔位。檢查卡片文案是否原樣出現。
窗邊放著舊泰迪熊的聖誕賀卡插圖,GPT Image 2.5 Sunburst 出圖
Sunburst官方範例出圖:Sunburst 檔位。

工作流三:設計收藏玩具與包裝

周邊與包裝概念圖靠的是產品攝影那套線索:材質、包裝與印刷清晰度。官方要求設計保持原創且不侵權,並建議一次比較多個角色或包裝變體。包裝上的文案同樣單獨寫成一條、原文照抄。

官方生成參數:size="1024x1536",quality="medium"。

官方提示詞(原文)
Create a collectible action figure of a vintage-style toy propeller airplane with rounded wings, a front-mounted spinning propeller, slightly worn paint edges, classic childhood proportions, designed as a nostalgic holiday collectible, in blister packaging.

Concept:
A nostalgic holiday collectible inspired by the simple toy airplanes
children used to play with during winter holidays.
Evokes warmth, imagination, and childhood wonder.

Style:
Premium toy photography, realistic plastic and painted metal textures,
studio lighting, shallow depth of field,
sharp label printing, high-end retail presentation.

Constraints:
- Original design only
- No trademarks
- No watermarks
- No logos

Include ONLY this packaging text (verbatim):
"Christmas Memories Edition"
節日包裝中的收藏款玩具螺旋槳飛機,GPT Image 2.5 Flare 出圖
Flare官方範例出圖:Flare 檔位。
節日包裝中的收藏款玩具螺旋槳飛機,GPT Image 2.5 Sunburst 出圖
Sunburst官方範例出圖:Sunburst 檔位。

可執行的完整範例

官方還給了一段可以直接跑的範例:一次請求生成四個標誌變體,再從一個參考圖裡摳出產品。官方說明這段範例固定使用 gpt-image-2,定位是基線,實際評估時再換成目前可用的模型與它支援的請求設定。

執行前需要安裝 OpenAI SDK(Python 用 pip install openai),設定 OPENAI_API_KEY,並把產品照片存成 input_images/shampoo.webp。官方提醒,真實請求會產生 API 費用。

  • 官方頁面同時提供 Python 與 Ruby 兩個版本,這裡照錄 Python 版。
  • 生成標誌時保留回傳的 PNG 位元組,包括 alpha 通道。
  • 摳圖那一步的提示詞與上文「透明產品去背」場景完全一致,可以對照使用。
官方 Python 範例(原文)
import base64
from pathlib import Path

from openai import OpenAI

client = OpenAI()


prompt = """
Create an original, non-infringing logo for a company called Field & Flour, a local bakery.
The logo should feel warm, simple, and timeless. Use clean, vector-like shapes, a strong silhouette, and balanced negative space.
Favor simplicity over detail so it reads clearly at small and large sizes. Flat design, minimal strokes, no gradients unless essential.
Fully transparent background. Deliver a single centered logo with generous padding, clean alpha edges, and no solid backdrop, scenery, checkerboard, or watermark.
"""

result = client.images.generate(
    model="gpt-image-2",
    prompt=prompt,
    size="1024x1536",
    quality="medium",
    background="transparent",
    output_format="png",
    n=4,  # Generate 4 versions of the logo
)

# Preserve the returned PNG bytes, including the alpha channel.
for index, item in enumerate(result.data, start=1):
    Path(f"logo-generation-{index}-gpt-image-2.png").write_bytes(
        base64.b64decode(item.b64_json)
    )

# Extract a product from a reference image.
prompt = """
Extract the product from the input image and isolate it on a fully transparent background.
Output: centered product, crisp silhouette, no halos/fringing.
Preserve product geometry and label legibility exactly.
Add only light polishing. Do not add a solid backdrop, checkerboard, scenery, or shadow.
Do not restyle the product; remove the background and preserve clean alpha transparency.
"""

result = client.images.edit(
    model="gpt-image-2",
    image=[
        Path("input_images/shampoo.webp"),
    ],
    prompt=prompt,
    size="1024x1536",
    quality="medium",
    background="transparent",
    output_format="png",
)

Path("extract-product-gpt-image-2.png").write_bytes(
    base64.b64decode(result.data[0].b64_json)
)

交付之前:驗收清單

官方在指南最後給了一份檢查清單,編輯類結果尤其需要過一遍——因為編輯最容易在「你沒提到的地方」出問題。

  • 必需文字是否準確、清晰可讀?圖表標註與它們之間的關係是否正確?
  • 身分、產品外形、標籤與參考細節是否保持完整?
  • 這次編輯是否只改了你要求改的地方?
  • 需要透明背景時,檔案裡是不是真的帶了 alpha 通道,而不是畫了一個背景上去?
  • 換提示詞或換模型時,要在有代表性的輸入上比較品質、延遲與成本。

常見問題

編輯圖片和生成圖片在寫法上有什麼不同?

官方把編輯的寫法總結成一句話:說清「只改 X」,並列出要保留的細節。要保留的對象包括身分、幾何、版式、光線與標籤;同時要宣告排除項,例如不要多餘文字、標誌或浮水印。做局部精修時,還要點名飽和度、對比度、箭頭、機位與周圍物體這些必須保持不變的元素。

為什麼多輪編輯之後人物或產品會越改越不像?

官方明確提示重複編輯仍然可能改掉你想保留的細節,處理方式是每次都重申限制並逐張檢查。如果某個區域必須逐像素保持一致,官方建議把通過的編輯結果合成回原圖,而不是繼續靠提示詞限制。

多張參考圖要怎麼在提示詞裡用?

官方要求給參考圖分配角色:依編號與用途標識每張輸入圖,說明它是主體、風格、服裝還是背景,再說清它們怎麼組合、哪些元素要移到哪裡。官方範例裡就是「把第二張圖裡的狗放進第一張圖的場景」,並為每張輸入圖標註了編號。

透明背景的去背為什麼有時候會失敗?

官方要求雙層保障:提示詞裡明確要求把主體單獨摳在完全透明的背景上,並說明不要加實底、棋盤格、場景或陰影;參數側同時設 background="transparent",輸出用 PNG 或 WebP。官方還提醒畫上去的棋盤格不是透明,必須檢查解碼後的 alpha 通道。

線稿轉寫實最容易出什麼問題?

官方把這類工作流定位為「保留原意、補上真實感」:要求保持精確的版式、比例與透視,自行選擇與草圖意圖一致的寫實材質與光線,並明確寫「不要新增元素或文字」,否則模型會自由發揮把構圖改掉。

官方那段可執行的程式範例可以直接用嗎?

官方說明該範例固定使用 gpt-image-2,用途是作為基線,實際評估時再換成目前可用的模型與它支援的請求設定。範例需要安裝 OpenAI SDK、設定 OPENAI_API_KEY,並把產品照片存成 input_images/shampoo.webp;真實請求會產生 API 費用。

拿一張自己的圖來試

編輯類提示詞的差距在實圖上一眼就能看出來。打開 GPT Image 2.5 工作區,上傳一張參考圖,把下面的範本換成你自己的限制。

開啟 GPT Image 2.5 出圖工作台