影片
wan2.7-t2v API
透過 Modelflare 非同步視訊路由使用準確的 wan2.7-t2v 模型 ID。
使用準確的型號 ID wan2.7-t2v。模型欄位必須與此頁面完全相符。
參數: duration=5resolution=1080pratio=16:9
提示詞: One continuous take, no cuts. A glasshouse at night, rows of plants and misted panes. A figure in an emerald latex suit presses one palm flat against the glass; every drop of condensation on that wall begins running upward instead of down, gathering as it goes until the whole pane is a moving constellation of green and gold points that spreads to the roof panels overhead. The camera starts on the hand, pulls back through the planting and cranes up to take in the whole roof. One hard warm key from a work lamp on the floor, cold moonlight outside. Real weight and inertia, water surface tension on glass, no text.
{ "model": "wan2.7-t2v", "prompt": "One continuous take, no cuts. A glasshouse at night, rows of plants and misted panes. A figure in an emerald latex suit presses one palm flat against the glass; every drop of condensation on that wall begins running upward instead of down, gathering as it goes until the whole pane is a moving constellation of green and gold points that spreads to the roof panels overhead. The camera starts on the hand, pulls back through the planting and cranes up to take in the whole roof. One hard warm key from a work lamp on the floor, cold moonlight outside. Real weight and inertia, water surface tension on glass, no text.", "seconds": "5", "duration": 5, "resolution": "1080p", "ratio": "16:9", "aspect_ratio": "16:9"}身份驗證與端點
Section titled “身份驗證與端點”將 Modelflare API 金鑰與 https://modelflare.dev/v1 結合使用。網關入口點是POST /v1/videos。
Authorization: Bearer YOUR_MODELFLARE_API_KEYcurl https://modelflare.dev/v1/videos \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "wan2.7-t2v", "input": {"prompt": "A white cat runs through a neon-lit street in the rain, cinematic tracking shot"}, "parameters": {"resolution": "1080P", "duration": 5, "prompt_extend": false} }'儲存任務ID。輪詢 GET /v1/videos/{task_id} 並使用 GET /v1/videos/{task_id}/content 下載。結果 URL 可能會過期,因此請立即傳輸檔案。
curl https://modelflare.dev/v1/videos/TASK_ID \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"萬常用input和parameters;幀引導模式和參考媒體模式不得混合。
Wan2.7 T2V 以 input.prompt 為中心,並可選擇接受 input.audio_url。在提示中描述鏡頭變化;不要發送shot_type。
| 場 | 必填 | 註釋 |
|---|---|---|
model |
是 | wan2.7-t2v |
input.prompt |
是 | 使用官方頁面上記錄的限制 |
input.negative_prompt |
否 | 負面提示 |
input.audio_url |
否 | 公共WAV/MP3;省略讓模型產生音訊 |
parameters.resolution |
否 | 720P / 1080P(預設 1080P) |
parameters.ratio |
否 | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 |
parameters.duration |
否 | 視訊時長(以秒為單位) |
parameters.prompt_extend |
否 | 當此專用模型合約需要時設定為 false |
parameters.watermark |
否 | 是否添加浮水印 |
parameters.seed |
否 | 可選的隨機種子 |
輸入與輸出限制
Section titled “輸入與輸出限制”T2V 輸出 720P 或 1080P,持續 2–15 秒。省略input.audio_url產生同步音訊;提供的 WAV/MP3 會被修剪或保持靜音以符合請求的持續時間。在提示中描述多拍計時,請勿傳送shot_type。
記錄的工作流程範例
Section titled “記錄的工作流程範例”curl https://modelflare.dev/v1/videos \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "wan2.7-t2v", "input": {"prompt": "从文字生成一段稳定的电影镜头"}, "parameters": {"resolution": "1080P", "duration": 8, "prompt_extend": false} }'錯誤與失敗的任務
Section titled “錯誤與失敗的任務”無效模型參數傳回帶有請求 ID 的 4xx。非同步任務建立成功後也可能進入失敗;使用輪詢回應中的 error_code 和 error_message 作為最終任務原因。不要使用不同的 JSON 形狀重試相同的請求。
此頁面涵蓋 Modelflare 模型產生和編輯呼叫。搜尋或地圖豐富、語音管理和元素庫管理是此公共模型呼叫表面之外的資源 API,並且不是必需的請求欄位。
此模型採用按秒視訊計費。請參閱 型號定價頁面 ,以了解當前客戶價格、參考標價和完整規格。
| 型號 ID | 差異 |
|---|---|
wan2.7-t2v |
本頁記錄的模型。 |
媒體合約 · v1
官方來源: Alibaba Cloud Model Studio
合約參數
| 意圖字段 | 控制項 | 選項 |
|---|---|---|
ratio | select | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 |
resolution | select | 720p / 1080p |
duration | select | 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15 |
支援的功能
allowed_values·ratio· 16:9, 9:16, 1:1, 4:3, 3:4allowed_values·resolution· 720p, 1080pallowed_values·duration· 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
結構化請求範例
text
意圖
{
"duration": 2,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"resolution": "720p"
}提供者請求
{
"duration": 2,
"model": "wan2.7-t2v",
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"resolution": "720p",
"seconds": "2"
}