Skip to main content
POST
Edit image
本頁使用與 編輯圖像 相同的 images/edits 操作,上方 playground 已預先填入通用 OpenAI 風格的編輯結構(imagemaskprompt 等)。以下說明 wanx-v1 類模型的 Qwen 專用請求格式。
Qwen 圖像編輯模型接受另一種 JSON 請求格式:將編輯指令與來源圖像參照包在 input.messages 中,而不是透過 multipart form data 上傳 imagemask 檔案。若要使用這種格式,請在 playground 的請求本文中同時提供 modelinput

Qwen 專用請求欄位

來源圖像可以直接在 input.messages[].content 中以內嵌方式參照(例如 URL 或嵌入式參照),而不必另外上傳 multipart 檔案。

範例:編輯圖像

回應欄位

回應遵循標準圖像編輯結構:
integer
建立時間戳。
array
生成圖像條目。

回應範例

200

授權

Authorization
string
header
必填

Your DGrid API key. All endpoints use Authorization: Bearer <DGRID_API_KEY>.

主體

image
file
必填

Source image in PNG format, under 4 MB.

prompt
string
必填

Editing instruction.

mask
file

Optional mask image.

model
string

Target image model.

n
integer

Number of outputs.

size
string

Output size.

response_format
string

Response format.

user
string

End-user identifier.

回應

Edited images in the image generation response format.

created
integer

Creation timestamp.

data
object[]

Generated image entries.

usage
object