生成圖片
OpenAI Images 相容的文生圖:GPT Image、Gemini Banana 與 Seedream;Seedream 與 Gemini 也在這裡傳參考圖。
/v1/images/generations按提示詞生成圖片。GPT Image 與 Gemini 回傳 data[].b64_json,Seedream 回傳 data[].url(24 小時有效)。Seedream 與兩個 Gemini 分組也在這個端點用 image / images 做圖生圖。
每個模型的參數與上限不同:在下方選擇模型,參數列隨之切換,數字取自外掛校驗程式碼匯出的規格(與 /spec/models/<model>.json 同源)。GPT Image 生成超過約 40 秒時伺服器端先回 200 並寫空白保活,此後失敗也仍是 200——請以回應體是否含 error 判斷成敗,用戶端讀逾時不少於 300 秒。
可靈與 Midjourney 也在這個端點提交,但一律非同步(202 + id,用查詢影片任務輪詢),在模型選擇裡選「可靈」「Midjourney」查看;Grok Imagine 見 Grok Imagine 生圖。
- GPT Image 不支援官方串流欄位
partial_images,請省略;stream: true回傳的是 HopBase Images SSE,不是逐張預覽事件。 output_compression、moderation、user、response_format只在同步文生圖 JSON 與同步 multipart 編輯中透傳;JSON 編輯與非同步任務不保留這些欄位。GPT Image 非同步只保留model、prompt、n、size、quality、background、output_format、input_fidelity和編輯用的圖片 / mask。- Gemini 計費:「Gemini 全系(含生圖)」按張計費,1K / 2K / 4K 同價;「Gemini 官方直連」按 token 計費(輸出 token × 單價)。
- Chat Completions 轉 Images 的橋接路徑只保留前 6 張參考圖;要用 14 張請直接呼叫本端點。
請求標頭
Bearer sk-…:主控台「API 金鑰」中建立的金鑰,所屬分組須包含請求的模型
respond-async:GPT Image / Gemini 立即回傳 202 Accepted、task_id 與 status_url,再用 GET /v1/images/tasks?task_id=… 輪詢。生成 2K / 4K 大圖時建議使用;Seedream 忽略此標頭、照常同步回傳
可選值respond-async
請求主體參數JSON
data[].b64_json。 參考圖最多 16 張。先確認目前金鑰的 GET /v1/models 包含此 ID
生成或編輯指令;為空回傳 400 prompt must not be empty。網關不限長度,上限為官方上限
限制去除首尾空白後不能為空,否則 400「prompt must not be empty」長度1–32000 字元
例:1024x1024、2048x2048、3840x2160。不合規在生成前回傳 400、不計費;不接受 1K / 2K / 4K
限制auto 或 寬x高:邊長為 16 的倍數、單邊 ≤ 3840、長短邊比 ≤ 3:1、總像素 655360–8294400
檔位越高輸出 token 越多、費用越高:1024x1024 實測 low 約 200、high 約 1,760、xhigh 約 3,120、max 約 7,020 輸出 token
可選值autolowmediumhigh
限制網關不校驗、原樣轉發;檔位越高輸出 token 越多
部分分組只支援 1,傳更大值回傳 400;≤ 0 按 1 處理
範圍1–10預設1
transparent 需配合 png 或 webp;2.0 透明背景屬預覽能力
可選值autoopaquetransparent
決定 b64_json 解碼後的格式
可選值pngjpegwebp
僅 jpeg / webp;只在同步 generations JSON 與 multipart 編輯中保留
範圍0–100預設100
不會關閉內容安全檢查
可選值autolow
終端使用者識別字串,不是 HopBase 帳戶 ID,也不改變計費歸屬
傳什麼都以 b64_json 回傳,不能靠 url 取得下載連結,請省略
限制傳什麼都以 b64_json 回傳,請省略
true 改為 HopBase Images SSE(期間傳送 keepalive,最後一個 data: 事件才是 Images JSON,以 [DONE] 結束),不是 OpenAI 原生逐張預覽事件;SDK 請保持 false
限制true 回傳 HopBase Images SSE,SDK 請保持 false預設false
相容欄位;GPT Image 2 預設高保真處理參考圖,請省略
可選值lowhigh
- transparent 需要 png 或 webp
- output_compression 只對 jpeg / webp 生效
先確認目前金鑰的 GET /v1/models 包含此 ID
生成或編輯指令;為空回傳 400 prompt must not be empty。網關不限長度,上限為官方上限
限制去除首尾空白後不能為空,否則 400「prompt must not be empty」長度1–32000 字元
例:1024x1024、2048x2048、3840x2160。不合規在生成前回傳 400、不計費;不接受 1K / 2K / 4K
限制auto 或 寬x高:邊長為 16 的倍數、單邊 ≤ 3840、長短邊比 ≤ 3:1、總像素 655360–8294400
檔位越高輸出 token 越多、費用越高:1024x1024 實測 low 約 200、high 約 1,760、xhigh 約 3,120、max 約 7,020 輸出 token
可選值autolowmediumhighxhighmax
限制網關不校驗、原樣轉發;檔位越高輸出 token 越多
部分分組只支援 1,傳更大值回傳 400;≤ 0 按 1 處理
範圍1–10預設1
transparent 需配合 png 或 webp;2.0 透明背景屬預覽能力
可選值autoopaquetransparent
決定 b64_json 解碼後的格式
可選值pngjpegwebp
僅 jpeg / webp;只在同步 generations JSON 與 multipart 編輯中保留
範圍0–100預設100
不會關閉內容安全檢查
可選值autolow
終端使用者識別字串,不是 HopBase 帳戶 ID,也不改變計費歸屬
傳什麼都以 b64_json 回傳,不能靠 url 取得下載連結,請省略
限制傳什麼都以 b64_json 回傳,請省略
true 改為 HopBase Images SSE(期間傳送 keepalive,最後一個 data: 事件才是 Images JSON,以 [DONE] 結束),不是 OpenAI 原生逐張預覽事件;SDK 請保持 false
限制true 回傳 HopBase Images SSE,SDK 請保持 false預設false
相容欄位;GPT Image 2 預設高保真處理參考圖,請省略
可選值lowhigh
- transparent 需要 png 或 webp
- output_compression 只對 jpeg / webp 生效
先確認目前金鑰的 GET /v1/models 包含此 ID
生成或編輯指令;為空回傳 400 prompt must not be empty。網關不限長度,上限為官方上限
限制去除首尾空白後不能為空,否則 400「prompt must not be empty」長度1–32000 字元
例:1024x1024、2048x2048、3840x2160。不合規在生成前回傳 400、不計費;不接受 1K / 2K / 4K
限制auto 或 寬x高:邊長為 16 的倍數、單邊 ≤ 3840、長短邊比 ≤ 3:1、總像素 655360–8294400
檔位越高輸出 token 越多、費用越高:1024x1024 實測 low 約 200、high 約 1,760、xhigh 約 3,120、max 約 7,020 輸出 token
可選值autolowmediumhighxhighmax
限制網關不校驗、原樣轉發;檔位越高輸出 token 越多
部分分組只支援 1,傳更大值回傳 400;≤ 0 按 1 處理
範圍1–10預設1
transparent 需配合 png 或 webp;2.0 透明背景屬預覽能力
可選值autoopaquetransparent
決定 b64_json 解碼後的格式
可選值pngjpegwebp
僅 jpeg / webp;只在同步 generations JSON 與 multipart 編輯中保留
範圍0–100預設100
不會關閉內容安全檢查
可選值autolow
終端使用者識別字串,不是 HopBase 帳戶 ID,也不改變計費歸屬
傳什麼都以 b64_json 回傳,不能靠 url 取得下載連結,請省略
限制傳什麼都以 b64_json 回傳,請省略
true 改為 HopBase Images SSE(期間傳送 keepalive,最後一個 data: 事件才是 Images JSON,以 [DONE] 結束),不是 OpenAI 原生逐張預覽事件;SDK 請保持 false
限制true 回傳 HopBase Images SSE,SDK 請保持 false預設false
相容欄位;GPT Image 2 預設高保真處理參考圖,請省略
可選值lowhigh
- transparent 需要 png 或 webp
- output_compression 只對 jpeg / webp 生效
以目前金鑰 GET /v1/models 的回傳為準
模型拒答或只回文字時回傳 400(訊息引用該段文字)或 502:請改寫提示詞
限制去除首尾空白後不能為空,否則 400「prompt must not be empty」長度≥ 1 字元
並行生成。全有或全無:任一張失敗則整個請求失敗、不計費
限制按輸出檔位封頂:1K ≤ 10,2K ≤ 5範圍1–10預設1
頂層扁平寫法,等價於 google.image_config.image_size;覆蓋 size 推導的檔位
可選值1K2K
預設"1K"
頂層扁平寫法,等價於 google.image_config.aspect_ratio,優先於 size
可選值1:12:33:23:44:34:55:49:1616:921:9
預設"1:1"
寬x高 從不因比例被拒:映射到最接近的官方比例,檔位按長邊推導並靜默降到型號最高檔位。明確寫出超過型號檔位的 1K / 2K / 4K 回傳 400;同時傳 image_size 時以它為準
可選值1K2K
限制auto、任意比例的 寬x高(映射到最接近的官方比例,檔位按長邊推導並靜默降到型號最高檔位),或型號檔位
SDK 可寫成 extra_body.google.image_config;三種寫法等價
可選值1:12:33:23:44:34:55:49:1616:921:9
可選值1K2K
參考圖,放在 generations 請求體即可;同時傳時以 images 為準。「Gemini 官方直連」單張解碼後 ≤ 20 MiB,沒有 /v1/images/edits
限制參考圖:字串或字串陣列,最多 14 張
同 image,同時傳時以 images 為準
限制參考圖:字串或字串陣列,最多 14 張
不支援:傳 mask 回傳 400;局部修改請在 prompt 中描述區域
不支援 transparent(回傳 400)
不能為"transparent"
不支援,請省略或傳 false
不能為true
- 2K 輸出每次最多 5 張(回應體積上限)
以目前金鑰 GET /v1/models 的回傳為準
模型拒答或只回文字時回傳 400(訊息引用該段文字)或 502:請改寫提示詞
限制去除首尾空白後不能為空,否則 400「prompt must not be empty」長度≥ 1 字元
並行生成。全有或全無:任一張失敗則整個請求失敗、不計費
限制按輸出檔位封頂:1K ≤ 10,2K ≤ 5範圍1–10預設1
頂層扁平寫法,等價於 google.image_config.image_size;覆蓋 size 推導的檔位
可選值1K2K
預設"1K"
頂層扁平寫法,等價於 google.image_config.aspect_ratio,優先於 size
可選值1:12:33:23:44:34:55:49:1616:921:9
預設"1:1"
寬x高 從不因比例被拒:映射到最接近的官方比例,檔位按長邊推導並靜默降到型號最高檔位。明確寫出超過型號檔位的 1K / 2K / 4K 回傳 400;同時傳 image_size 時以它為準
可選值1K2K
限制auto、任意比例的 寬x高(映射到最接近的官方比例,檔位按長邊推導並靜默降到型號最高檔位),或型號檔位
SDK 可寫成 extra_body.google.image_config;三種寫法等價
可選值1:12:33:23:44:34:55:49:1616:921:9
可選值1K2K
參考圖,放在 generations 請求體即可;同時傳時以 images 為準。「Gemini 官方直連」單張解碼後 ≤ 20 MiB,沒有 /v1/images/edits
限制參考圖:字串或字串陣列,最多 14 張
同 image,同時傳時以 images 為準
限制參考圖:字串或字串陣列,最多 14 張
不支援:傳 mask 回傳 400;局部修改請在 prompt 中描述區域
不支援 transparent(回傳 400)
不能為"transparent"
不支援,請省略或傳 false
不能為true
- 2K 輸出每次最多 5 張(回應體積上限)
以目前金鑰 GET /v1/models 的回傳為準
模型拒答或只回文字時回傳 400(訊息引用該段文字)或 502:請改寫提示詞
限制去除首尾空白後不能為空,否則 400「prompt must not be empty」長度≥ 1 字元
並行生成。全有或全無:任一張失敗則整個請求失敗、不計費
限制按輸出檔位封頂:1K ≤ 10,2K ≤ 5,4K ≤ 2範圍1–10預設1
頂層扁平寫法,等價於 google.image_config.image_size;覆蓋 size 推導的檔位
可選值1K2K4K
預設"1K"
頂層扁平寫法,等價於 google.image_config.aspect_ratio,優先於 size
可選值1:12:33:23:44:34:55:49:1616:921:9
預設"1:1"
寬x高 從不因比例被拒:映射到最接近的官方比例,檔位按長邊推導並靜默降到型號最高檔位。明確寫出超過型號檔位的 1K / 2K / 4K 回傳 400;同時傳 image_size 時以它為準
可選值1K2K4K
限制auto、任意比例的 寬x高(映射到最接近的官方比例,檔位按長邊推導並靜默降到型號最高檔位),或型號檔位
SDK 可寫成 extra_body.google.image_config;三種寫法等價
可選值1:12:33:23:44:34:55:49:1616:921:9
可選值1K2K4K
參考圖,放在 generations 請求體即可;同時傳時以 images 為準。「Gemini 官方直連」單張解碼後 ≤ 20 MiB,沒有 /v1/images/edits
限制參考圖:字串或字串陣列,最多 14 張
同 image,同時傳時以 images 為準
限制參考圖:字串或字串陣列,最多 14 張
不支援:傳 mask 回傳 400;局部修改請在 prompt 中描述區域
不支援 transparent(回傳 400)
不能為"transparent"
不支援,請省略或傳 false
不能為true
- 2K 輸出每次最多 5 張(回應體積上限)
- 4K 輸出每次最多 2 張(回應體積上限)
以目前金鑰 GET /v1/models 的回傳為準
模型拒答或只回文字時回傳 400(訊息引用該段文字)或 502:請改寫提示詞
限制去除首尾空白後不能為空,否則 400「prompt must not be empty」長度≥ 1 字元
並行生成。全有或全無:任一張失敗則整個請求失敗、不計費
限制按輸出檔位封頂:1K ≤ 10範圍1–10預設1
頂層扁平寫法,等價於 google.image_config.image_size;覆蓋 size 推導的檔位
可選值1K
預設"1K"
頂層扁平寫法,等價於 google.image_config.aspect_ratio,優先於 size
可選值1:12:33:23:44:34:55:49:1616:921:9
預設"1:1"
寬x高 從不因比例被拒:映射到最接近的官方比例,檔位按長邊推導並靜默降到型號最高檔位。明確寫出超過型號檔位的 1K / 2K / 4K 回傳 400;同時傳 image_size 時以它為準
可選值1K
限制auto、任意比例的 寬x高(映射到最接近的官方比例,檔位按長邊推導並靜默降到型號最高檔位),或型號檔位
SDK 可寫成 extra_body.google.image_config;三種寫法等價
可選值1:12:33:23:44:34:55:49:1616:921:9
可選值1K
參考圖,放在 generations 請求體即可;同時傳時以 images 為準。「Gemini 官方直連」單張解碼後 ≤ 20 MiB,沒有 /v1/images/edits
限制參考圖:字串或字串陣列,最多 14 張
同 image,同時傳時以 images 為準
限制參考圖:字串或字串陣列,最多 14 張
不支援:傳 mask 回傳 400;局部修改請在 prompt 中描述區域
不支援 transparent(回傳 400)
不能為"transparent"
不支援,請省略或傳 false
不能為true
以目前金鑰 GET /v1/models 的回傳為準
模型拒答或只回文字時回傳 400(訊息引用該段文字)或 502:請改寫提示詞
限制去除首尾空白後不能為空,否則 400「prompt must not be empty」長度≥ 1 字元
並行生成。全有或全無:任一張失敗則整個請求失敗、不計費
限制按輸出檔位封頂:1K ≤ 10範圍1–10預設1
頂層扁平寫法,等價於 google.image_config.image_size;覆蓋 size 推導的檔位
可選值1K
預設"1K"
頂層扁平寫法,等價於 google.image_config.aspect_ratio,優先於 size
可選值1:12:33:23:44:34:55:49:1616:921:9
預設"1:1"
寬x高 從不因比例被拒:映射到最接近的官方比例,檔位按長邊推導並靜默降到型號最高檔位。明確寫出超過型號檔位的 1K / 2K / 4K 回傳 400;同時傳 image_size 時以它為準
可選值1K
限制auto、任意比例的 寬x高(映射到最接近的官方比例,檔位按長邊推導並靜默降到型號最高檔位),或型號檔位
SDK 可寫成 extra_body.google.image_config;三種寫法等價
可選值1:12:33:23:44:34:55:49:1616:921:9
可選值1K
參考圖,放在 generations 請求體即可;同時傳時以 images 為準。「Gemini 官方直連」單張解碼後 ≤ 20 MiB,沒有 /v1/images/edits
限制參考圖:字串或字串陣列,最多 3 張
同 image,同時傳時以 images 為準
限制參考圖:字串或字串陣列,最多 3 張
不支援:傳 mask 回傳 400;局部修改請在 prompt 中描述區域
不支援 transparent(回傳 400)
不能為"transparent"
不支援,請省略或傳 false
不能為true
使用目前金鑰 GET /v1/models 回傳的完整 ID
圖片內容、構圖、風格或編輯指令;局部編輯可描述座標、bbox、箭頭或參考圖中的塗畫區域
限制去除首尾空白後不能為空,否則 400「missing prompt」長度≥ 1 字元
不合規在生成前回傳 400 並提示合法區間、不計費
可選值1K1.5K2K
限制簡寫 1K / 1.5K / 2K,或 寬x高:總像素 921600–4624220,寬高比 1:16–16:1
其他值(含 null)回傳 400
限制only a single output is supported (n=1)預設1
回傳 24 小時有效的簽名連結
可選值url
預設"url"
4.5 僅 jpeg
可選值pngjpeg
必須是物件
可選值standardfast
傳入後觸發單圖 / 多圖圖生圖或編輯;/v1/images/edits 必須至少 1 張。URL 在提交時不下載、不檢查大小
限制參考圖(傳入即圖生圖 / 編輯):最多 10 張;Data URL 單張 ≤ 31457280 位元組;URL 提交時不下載
伺服器端固定為 false
使用目前金鑰 GET /v1/models 回傳的完整 ID
圖片內容、構圖、風格或編輯指令;局部編輯可描述座標、bbox、箭頭或參考圖中的塗畫區域
限制去除首尾空白後不能為空,否則 400「missing prompt」長度≥ 1 字元
不合規在生成前回傳 400 並提示合法區間、不計費
可選值2K3K4K
限制簡寫 2K / 3K / 4K,或 寬x高:總像素 3686400–16777216,寬高比 1:16–16:1
其他值(含 null)回傳 400
限制only a single output is supported (n=1)預設1
回傳 24 小時有效的簽名連結
可選值url
預設"url"
4.5 僅 jpeg
可選值pngjpeg
必須是物件
可選值standard
傳入後觸發單圖 / 多圖圖生圖或編輯;/v1/images/edits 必須至少 1 張。URL 在提交時不下載、不檢查大小
限制參考圖(傳入即圖生圖 / 編輯):最多 14 張;Data URL 單張 ≤ 31457280 位元組;URL 提交時不下載
伺服器端固定為 false
使用目前金鑰 GET /v1/models 回傳的完整 ID
圖片內容、構圖、風格或編輯指令;局部編輯可描述座標、bbox、箭頭或參考圖中的塗畫區域
限制去除首尾空白後不能為空,否則 400「missing prompt」長度≥ 1 字元
不合規在生成前回傳 400 並提示合法區間、不計費
可選值2K4K
限制簡寫 2K / 4K,或 寬x高:總像素 3686400–16777216,寬高比 1:16–16:1
其他值(含 null)回傳 400
限制only a single output is supported (n=1)預設1
回傳 24 小時有效的簽名連結
可選值url
預設"url"
4.5 僅 jpeg
可選值jpeg
必須是物件
可選值standard
傳入後觸發單圖 / 多圖圖生圖或編輯;/v1/images/edits 必須至少 1 張。URL 在提交時不下載、不檢查大小
限制參考圖(傳入即圖生圖 / 編輯):最多 14 張;Data URL 單張 ≤ 31457280 位元組;URL 提交時不下載
伺服器端固定為 false
可靈生圖型號 ID;傳影片型號回傳 400
可選值kling-image-expandkling-image-o1kling-image-v2-1kling-image-v2-1-i2ikling-image-v2-1-multi-refkling-image-v3kling-image-v3-omni
與非空 images 至少提供一個
不區分大小寫,OpenAI 風格的 high、standard 等會被拒絕。各型號可選檔:kling-image-v3 1k / 2k;kling-image-v3-omni 1k / 2k / 4k;kling-image-o1 1k / 2k / 4k;kling-image-v2-1 1k / 2k;kling-image-v2-1-i2i 1k / 2k;kling-image-v2-1-multi-ref 1k / 2k;kling-image-expand 1k
可選值1k2k4k
預設"1k"
按實際產出張數計費
範圍1–9預設1
參考圖;每項 url(公網 HTTP(S) 位址)/ file_id 二選一,不能帶 usage;file_id 須是目前金鑰可用的可靈素材,不是 Seedance 素材 ID。張數:kling-image-v3 0–1 張;kling-image-v3-omni 0–10 張;kling-image-o1 0–10 張;kling-image-v2-1 不接受;kling-image-v2-1-i2i 恰好 1 張;kling-image-v2-1-multi-ref 2–4 張;kling-image-expand 恰好 1 張
公開網路 HTTP(S) 位址
可靈素材 ID,與 url 二選一
僅擴圖 kling-image-expand:四個比例均為 0–2 的數字,省略為 0,不能全為 0;擴充後面積不超過原圖 3 倍:(1+左+右) × (1+上+下) ≤ 3。其他型號傳非空 extra 回傳 400
擴充比例
範圍0–2
擴充比例
範圍0–2
擴充比例
範圍0–2
擴充比例
範圍0–2
精確匹配
畫面描述,可在描述之後加 -- 參數(--ar 畫幅、--hd 原生 2K、--s、--c、--weird、--iw、--sref + --sw、--no、--seed、--tile、--exp)。必須有畫面描述,不能只有 -- 參數,也不能含 ::。--ar 比例不超過 14:1,帶 --hd 時不超過 4:1;--q、--niji、--repeat、--oref、--cref、--stealth、--stop、--draft、--profile 回傳 400
長度≥ 1 字元
參考圖,0–1 項;每項 url(公網絕對 HTTP(S) 位址)/ file_id 二選一,不能帶 usage
數量≤ 1 項
公網絕對 HTTP(S) 位址
素材 ID,與 url 二選一
只能是 4:每個任務固定出 4 張,按回傳的每張圖計費
預設4
請省略:非空回傳 400;要 2K 請在 prompt 寫 --hd
請省略:非空物件回傳 400
回傳
200同步成功
202非同步受理:GPT Image / Gemini 帶 Prefer: respond-async 時;可靈與 Midjourney 一律如此
Unix 秒
每張圖一項
GPT Image / Gemini:Base64 圖片資料,解碼後按 output_format 儲存;Gemini 可能是 JPEG,請看 mime_type
Seedream:24 小時有效的簽名連結,過期只能重新生成
圖片 MIME
模型改寫後的提示詞(部分模型)
可能回傳
輸入 Token
輸出 Token
合計
錯誤
safety_rejectedmissing_api_key / invalid_api_key / api_key_expired)insufficient_quota)model_not_found),或路徑不屬於該分組(route_not_found)request_too_large)user_concurrency_limit / apikey_concurrency_limit),帶 Retry-AfterGPT Image 報錯原文
# size: 按上表尺寸規則修改
size must be WIDTHxHEIGHT or auto
size side length exceeds 3840px (4096x2048)
size width and height must be multiples of 16 (1000x1000)
size aspect ratio must not exceed 3:1 (3840x1024)
size total pixel count must be at least 655360 (512x512=262144)
size total pixel count must not exceed 8294400 (3840x3840=14745600)
# prompt 為空
prompt must not be empty
# edits JSON: 參考圖放在 "image",用字串或 {"url": ...};不讀取 "images"
/v1/images/edits requires at least one image
image object is missing the url field
image must be a data URL or an http(s) URL
# 遠端參考圖:需為回傳 image/* 的公開 URL,單張 ≤ 25 MiB
image download returned HTTP 404
image is too large
image Content-Type is not image/*: text/html
reference image URL must not point to an internal address
image is too large, please compress it to under 4MB and retry
# 內容安全攔截 (error.code: safety_rejected)
Your request was rejected by the safety system.
# HTTP 413
Request body exceeds the size limit (60 MB)Gemini 報錯原文
# 「Gemini 全系(含生圖)」
prompt must not be empty
n must be between 1 and 10 for model gemini-3-pro-image
n=3 is too large for 4K output on model gemini-3-pro-image; at most 2 images per request at this size (response size limit); lower n or send separate requests
model gemini-3.1-flash-image does not support tier 4K; supported: 1K, 2K
model gemini-3-pro-image: size "big" is not valid; expected WIDTHxHEIGHT (any aspect ratio, mapped to the nearest official tier) or 1K/2K/4K
aspect_ratio "7:3" is not supported for model gemini-3-pro-image; allowed values: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
image_size "4K" is not supported for model gemini-3.1-flash-image; supported: 1K, 2K
background=transparent is not supported for model gemini-3-pro-image; Gemini image models cannot output transparent images
mask is not supported for Gemini image models; remove mask and describe the region to edit in the prompt
too many reference images: at most 14 are supported for this model, got 15
# 「Gemini 官方直連」
missing prompt
Gemini image generation does not support stream=true; send a non-streaming request
n must be at most 10
n=6 is too large for 2K output on model gemini-3.1-flash-image; at most 5 images per request at this size (response size limit); lower n or send separate requests
Images generations only accepts a JSON request body: ...
size 4K is not supported for model gemini-3.1-flash-image; supported tiers: 1K, 2K
size "banana" is not valid for model gemini-3-pro-image; use auto, WIDTHxHEIGHT (e.g. 1024x1024, mapped to the nearest supported aspect ratio and capped at the model's largest tier), or one of: 1K, 2K, 4K
image_config.aspect_ratio "7:3" is not supported; allowed values: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
image_config.image_size "4K" is not supported for model gemini-3.1-flash-image; allowed values: 1K, 2K
mask is not supported for model gemini-3-pro-image; remove mask and describe the region to edit in the prompt
background=transparent is not supported for model gemini-3-pro-image; Gemini image models cannot output transparent images
reference image 1: reference image exceeds the 20MB limit
reference image 1: reference image URL must not point to an internal address
reference image 1: reference image download returned HTTP 404
reference image 1: reference file is not a supported image typeSeedream 報錯原文
model seedream-5-0-pro only supports size 1K, 1.5K, 2K or a valid WIDTHxHEIGHT pixel size # 例如 "size": "auto"
model seedream-5-0-lite requires the total pixel count of size to be between 3686400 and 16777216
size aspect ratio must be between 1:16 and 16:1
missing prompt
response_format only supports url
only a single output is supported (n=1)
model seedream-4-5 only supports output_format jpeg
optimize_prompt_options must be an object
image must be a URL/data URL string or an array of strings
every item in the image array must be a URL or data URL string
image must not be empty
at most 10 reference images are supported
reference image 1 is invalid: data URL must be base64-encoded
reference image 1 is invalid: unsupported image format image/svg+xml
reference image 1 is invalid: a single image must not exceed 30 MB
image edits require at least one image reference # /v1/images/edits 未帶圖
seedream does not accept a traditional mask; ... # /v1/images/edits 帶 "mask" 即拒,null 也一樣