Runbase

Command Palette

Search for a command to run...

OpenAI

GPT Image 2

ID:openai/gpt-image-2

OpenAI 的 GPT Image 2 圖片產生 API — 最高 4K,原生推理能力、多語言文字渲染、參考圖片引導編輯。

文字轉圖片圖片編輯參考圖片商業用途
輸入
Aspect ratio
Resolution
Reference images
最多 4 張圖片,每張 4MB
輸出結果會顯示在這裡
1K
$0.05
2K
$0.07
4K
$0.12
cURL
curl https://api.runbase.net/v1/runs \
  -H "Authorization: Bearer $RUNBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2",
    "input": {
      "prompt": "A cinematic product photo of a ceramic lamp",
      "aspect_ratio": "1:1",
      "resolution": "1K"
    }
  }'

範例

科學資訊圖表

科學資訊圖表

1:1

A detailed scientific infographic of an integrated biohybrid artificial photosynthesis platform for solar-to-fuel conversion, with labeled cross-section diagrams, molecular structures, efficiency charts, and process flow annotations

抓拍寫實風

抓拍寫實風

16:9

A photorealistic candid shot of a young man in a light grey Covernat hoodie sitting at station 139 in a premium PC cafe, focused on his laptop screen, soft window light mixing with monitor glow, shallow depth of field

UI 重現

UI 重現

16:9

A pixel-perfect recreation of the YouTube homepage UI with a left sidebar showing Home, Shorts, Subscriptions, History, and Explore sections, a top navigation bar with search and profile icon, category filter chips, and an 8-video thumbnail grid with realistic titles, channel names, view counts, and duration stamps

概述

GPT Image 2 是 OpenAI 的旗艦圖片產生模型,於 2026 年 4 月發布。是首批內建推理能力的圖片模型之一 — 模型在產生前會規劃構圖並驗證提示詞的約束條件。支援跨文字系統的多語言文字渲染,包括 CJK、印地語和孟加拉語,非常適合全球化的創意工作。

使用情境

具有精確光線和材質的產品攝影。注重寫實感和精細細節的行銷活動和編輯視覺素材。需要清晰嵌入文字的資訊圖表、UI 模型和海報設計。參考圖片引導的編輯 — 上傳最多 4 張圖片來引導風格、色彩或構圖。

輸入參數

所有參數都在執行請求的 input 物件中傳遞。

ParameterRequiredDescription
promptYes圖片的文字描述(1–4000 字元)
aspect_ratioNo輸出比例。預設 1:1。選項:1:12:33:23:44:34:55:49:1616:921:9
resolutionNo輸出解析度。預設 1K。選項:1K2K4K(4K 僅限 16:9、9:16 或 21:9)
image_urlsNo最多 4 張參考圖片(每張最大 4 MB)用於圖片編輯

提示詞技巧

明確描述材質和光線

GPT Image 2 對物理描述的回應很好。「Matte ceramic vase on a walnut table, soft window light from the left」的效果持續優於「a vase on a table」。

4K 搭配寬螢幕比例

4K 輸出限定為 16:9、9:16 和 21:9。要在橫向或超寬構圖中獲得最大細節,將 resolution: "4K" 與這些比例之一搭配使用。

用參考圖片維持風格一致性

提供與目標風格接近的參考圖片 — 模型用它們來引導色彩和構圖,而非從差異較大的參考中推斷。

限制

  • 圖片中的小字可能需要反覆調整才能準確
  • 複雜的手部、Logo 和精確的版面約束應手動檢查
  • 4K 解析度僅在 16:9、9:16 或 21:9 比例下可用
  • 每次請求最多 4 張參考圖片,每張 4 MB
  • 提示詞長度上限 4000 字元

常見問題

GPT Image 2 支援哪些比例?

十種選項:1:1、2:3、3:2、3:4、4:3、4:5、5:4、9:16、16:9 和 21:9。預設為 1:1。

GPT Image 2 支援 4K 嗎?

支援 — 1K、2K 和 4K 可用。4K 限定為 16:9、9:16 和 21:9 比例。

可以編輯現有圖片嗎?

可以。透過 image_urls 上傳最多 4 張參考圖片來引導產生。