圖片
編輯圖片
以 multipart/form-data 上傳來源圖片並用文字提示編輯,與 OpenAI client.images.edit() 相容。內部沿用圖生圖(i2i)管線,回應一律是同步 JSON;mask 目前不支援,response_format 只支援 URL(不支援 b64_json)。
POST
/api/v1/images/edits驗證
Authorization必填string · header
在 Authorization 標頭以 Bearer token 傳入 API 金鑰。
Body
image必填file
要編輯的來源圖片檔。可重複傳多個 image 欄位(或 image[]),最多 8 張,每張上限 10 MB,MIME 必須是 image/*。
≤ 8 files, ≤ 10 MB each, image/*
prompt必填string
編輯指示的文字描述。
minLength: 1
Example:
"change the background to a night city"modelstring
圖片編輯模型。省略時使用伺服器預設(目前為 gpt-5.4-image-2)。
Example:
"openai/gpt-5.4-image-2"ninteger
要生成的結果數量,1–10。
1–10
Example:
1sizestring
輸出尺寸,必須是「寬x高」的像素格式(例如 1024x1024);格式不符時此欄位會被靜默忽略。
format: <width>x<height>
Example:
"1024x1024"回應範例