Edit image
圖像
Qwen 圖像編輯
Edit an uploaded image with an optional mask using the OpenAI-compatible image editing endpoint. Also accepts Qwen-compatible JSON payloads with an input.messages wrapper.
POST
Edit image
本頁使用與 編輯圖像 相同的
images/edits 操作,上方 playground 已預先填入通用 OpenAI 風格的編輯結構(image、mask、prompt 等)。以下說明 wanx-v1 類模型的 Qwen 專用請求格式。
Qwen 圖像編輯模型接受另一種 JSON 請求格式:將編輯指令與來源圖像參照包在
input.messages 中,而不是透過 multipart form data 上傳 image/mask 檔案。若要使用這種格式,請在 playground 的請求本文中同時提供 model 與 input。Qwen 專用請求欄位
| 欄位 | 類型 | 必填 | 說明 |
|---|---|---|---|
model | string | 是 | 模型識別碼,例如 wanx-v1。 |
input | object | 是 | 在請求本文中傳送的輸入包裝物件,用來取代 multipart 的 image/mask 欄位。 |
input.messages | array | 是 | 巢狀於 input 之下的 messages 陣列。 |
input.messages[].role | string | 是 | 訊息角色,例如 user。 |
input.messages[].content | string | 是 | 編輯指令,以及任何被參照的來源圖像。 |
範例:編輯圖像
回應欄位
回應遵循標準圖像編輯結構:建立時間戳。
生成圖像條目。
回應範例
200
授權
Your DGrid API key. All endpoints use Authorization: Bearer <DGRID_API_KEY>.

