圖片
wan2.7-image API
透過 Modelflare 使用本頁顯示的確切型號 ID 呼叫 wan2.7-image。
使用準確的型號 ID wan2.7-image。模型欄位必須與此頁面完全相符。

參數: size=1536x1024n=1
提示詞: A long hotel corridor with a heavily patterned carpet, doors receding into the distance. A woman in a floor-length crimson satin coat has just taken one step forward. Behind her heel the carpet pattern has started to peel up off the floor, lifting away as loose ribbons of colour that keep the print exactly and curl into the air down the length of the hall. One hard green exit sign above, warm wall sconces along the corridor. Wide low camera on the floor line, deep perspective, real cloth weight, film grain, slight vignette, no text.
{ "model": "wan2.7-image", "prompt": "A long hotel corridor with a heavily patterned carpet, doors receding into the distance. A woman in a floor-length crimson satin coat has just taken one step forward. Behind her heel the carpet pattern has started to peel up off the floor, lifting away as loose ribbons of colour that keep the print exactly and curl into the air down the length of the hall. One hard green exit sign above, warm wall sconces along the corridor. Wide low camera on the floor line, deep perspective, real cloth weight, film grain, slight vignette, no text.", "n": 1, "size": "1536x1024"}身份驗證與端點
Section titled “身份驗證與端點”將 Modelflare API 金鑰與 https://modelflare.dev/v1 結合使用。網關入口點是POST /v1/images/generations。
Authorization: Bearer YOUR_MODELFLARE_API_KEYcurl https://modelflare.dev/v1/images/generations \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "wan2.7-image", "prompt": "A white cat runs through a neon-lit street in the rain", "size": "1024x1024", "n": 1 }'OpenAI相容的影像模型使用prompt、n、size和quality;僅在官方頁面記錄時才使用編輯。
Wan2.7 Image / Pro 使用同步影像 API。使用相容 OpenAI 的扁平形狀進行簡單呼叫;使用 input.messages 和 parameters 進行多圖像、區域編輯和順序生成。 Pro文字轉影像最高支援4K外序模式;標準型號最高支援2K。
| 場 | 必填 | 註釋 |
|---|---|---|
model |
是 | wan2.7-image |
prompt |
是 | 產生或編輯指令 |
image |
否 | 單圖 URL/Base64;使用 input.messages 最多可拍攝 9 張影像 |
input.messages |
否 | 用於多圖像、區域編輯和順序生成的嵌套訊息 |
size |
否 | 1K / 2K; Pro非順序文字轉影像也支援4K |
n |
否 | 1-4為普通一代;1–12 用於順序生成;按成功圖像計費 |
thinking_mode |
否 | 無影像時的思考模式 |
watermark |
否 | 是否添加浮水印 |
parameters.prompt_extend |
否 | 提示擴展,預設true; |
parameters.bbox_list |
否 | 互動式編輯區域框 |
parameters.enable_sequential |
否 | 啟用順序生成 |
parameters.color_palette |
否 | 3–10 種十六進位顏色,百分比總計為 100% |
回應與輸入限制
Section titled “回應與輸入限制”使用扁平形狀進行簡單呼叫;使用input.messages和parameters進行多圖像、區域編輯和順序生成。最多支援 9 個輸入影像,每個影像小於 20 MB,每邊 240–8,000 像素,長寬比為 1:8 到 8:1。普通輸出計數為1-4,順序輸出計數為1-12; Pro 文字轉影像支援 4K 外部順序模式,而其他組合最高可達 2K。
記錄的工作流程範例
Section titled “記錄的工作流程範例”Wan2.7影像既支援平面形狀,也支援嵌套的input.messages/parameters形狀;使用嵌套形狀進行多重影像、區域編輯和順序產生。
多影像編輯
curl https://modelflare.dev/v1/images/generations \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "wan2.7-image", "input": {"messages": [{"role": "user", "content": [ {"image": "https://example.com/person.png"}, {"image": "https://example.com/background.png"}, {"text": "将图 1 中的人物放入图 2 的场景中"} ]}], "parameters": {"size": "2K", "n": 1, "prompt_extend": true}} }'互動式區域編輯
curl https://modelflare.dev/v1/images/generations \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "wan2.7-image", "input": {"messages": [{"role": "user", "content": [ {"image": "https://example.com/room.png"}, {"text": "将选中区域的花瓶替换成红玫瑰"} ]}], "parameters": {"size": "2K", "n": 1, "bbox_list": [[[420, 280, 760, 720]]]}} }'序列影像組
curl https://modelflare.dev/v1/images/generations \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "wan2.7-image", "input": {"messages": [{"role": "user", "content": [{"text": "生成四张角色一致的季节分镜"}]}]}, "parameters": {"size": "2K", "enable_sequential": true, "n": 4, "watermark": false} }'錯誤與失敗的任務
Section titled “錯誤與失敗的任務”無效的模型參數傳回帶有請求ID的4xx;使用所選模型合約定義的回應欄位和錯誤訊息。
此頁面涵蓋 Modelflare 模型產生和編輯呼叫。搜尋或地圖豐富、語音管理和元素庫管理是此公共模型呼叫表面之外的資源 API,並且不是必需的請求欄位。
此模型使用按呼叫計費。請參閱 型號定價頁面 ,以了解當前客戶價格、參考標價和完整規格。
| 型號 ID | 差異 |
|---|---|
wan2.7-image |
本頁記錄的模型。 |
媒體合約 · v1
官方來源: Alibaba Cloud Model Studio
合約參數
| 意圖字段 | 控制項 | 選項 |
|---|---|---|
size | select | 1K / 2K |
n | number | — |
支援的功能
allowed_values·size· 1K, 2Kmax_assets·reference_asset_ids· 9
結構化請求範例
text
意圖
{
"n": 1,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"size": "1K"
}提供者請求
{
"model": "wan2.7-image",
"n": 1,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"size": "1K"
}reference
意圖
{
"n": 1,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"size": "1K"
}提供者請求
{
"image": "https://example.com/reference.png",
"model": "wan2.7-image",
"n": 1,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"size": "1K"
}