請求參數 要求標頭(Headers) Content-Type string (必選)固定值:application/jsonAuthorization string (必選)API Key鑒權,格式為Bearer sk-xxxx。請求體(Request Body) model_name string (必選)待部署的模型ID(非基本模型名稱,而是微調或匯出後產生的模型標識)。擷取方式:
- 微調產出的模型:使用建立調優任務響應中
output.finetuned_output 的值,格式如 wan2.5-i2v-preview-ft-202511111122-xxxx。
- 匯出的模型:使用查詢匯出的模型詳情響應中
output[].model_name 的值。
capacity integer (必選)部署的模型執行個體數量。推薦設定為1。plan string (必選)部署方式。LoRA高效微調推薦為lora。aigc_config object (必選)提示詞配置。
use_input_prompt boolean (必選)控制調用已部署模型產生視頻時的提示詞來源。
false(預設值):自動產生模式。調用視頻產生介面時,系統忽略傳入的 prompt,強制使用 aigc_config.prompt 和 aigc_config.lora_prompt_default 配置的模板自動產生提示詞。
true:手動傳入模式。調用視頻產生介面時,系統直接使用傳入的 prompt,上述兩個參數將全部失效。
prompt string (必選)預設的Prompt模板。僅在use_input_prompt=false時生效。調用已部署模型產生視頻時,系統會分析輸入映像,將畫面內容填入該模板,自動產生帶特效指令的完整描述。注意:此參數會覆蓋視頻產生介面中傳入的 prompt 參數。lora_prompt_default string (必選)備用Prompt模板。僅在use_input_prompt=false時生效。當使用aigc_config.prompt產生失敗時,系統將使用此參數作為兜底提示詞來產生視頻。 | 以下樣本以金錢雨特效為例,上傳一張人物圖片,系統自動產生帶有特效的視頻。curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/deployments' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model_name": "<替換為模型名稱model_name>",
"aigc_config": {
"use_input_prompt": false,
"prompt": "Provide a video description based on the image content. The description must include the phrase "Then the s86b5p money rain effect begins, countless huge-sized US dollar bills (beige background/dark green patterns) pour down like a torrential rain, densely hitting and surrounding her. The bills continue to fall, she/he stretches her/his arms upward, neck slightly tilted back, expression surprised, completely immersed in this wild money rain."\nOutput Template:\nThe video begins with a shot of [subject description]. [Environment description]. Then the s86b5p money rain effect begins, countless huge-sized US dollar bills (beige background/dark green patterns) pour down like a torrential rain, densely hitting and surrounding her. The bills continue to fall, she/he stretches her/his arms upward, neck slightly tilted back, expression surprised, completely immersed in this wild money rain.\nExample:\nThe video begins showing a young woman standing in front of a brick wall covered with ivy. She has long, smooth reddish-brown hair, wearing a white sleeveless dress, a shiny silver necklace, and a smile on her face. The brick wall in the background is covered with green vines, appearing rustic and natural. Then the s86b5p money rain effect begins, countless huge-sized US dollar bills (beige background/dark green patterns) pour down like a torrential rain, densely hitting and surrounding her. The bills continue to fall, she stretches her arms upward, neck slightly tilted back, expression surprised, completely immersed in this wild money rain.",
"lora_prompt_default": "Then the s86b5p money rain effect begins, countless huge-sized US dollar bills (beige background/dark green patterns) pour down like a torrential rain, densely hitting and surrounding her. The bills continue to fall, she/he stretches her/his arms upward, neck slightly tilted back, expression surprised, completely immersed in this wild money rain."
},
"capacity": 1,
"plan": "lora"
}'
以下樣本以時尚雜誌換裝特效為例,上傳首幀和尾幀圖片,系統自動產生人物換裝變身的過渡視頻。curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/deployments' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model_name": "<替換為模型名稱model_name>",
"aigc_config": {
"use_input_prompt": false,
"prompt": "Provide a video description based on the image content. The description must include the phrase "Then she/he begins the s86b5p transformation."\nOutput Template:\nThe video begins with a shot of [subject description]. [Environment description]. Then she/he begins the s86b5p transformation.\nExample:\nThe video begins with a young woman in an outdoor setting. She has short, curly dark brown hair and a friendly smile. She is wearing a black Polo shirt with colorful floral embroidery. The background features green vegetation and distant mountains. Then she begins the s86b5p transformation.",
"lora_prompt_default": "Then she/he begins the s86b5p transformation."
},
"capacity": 1,
"plan": "lora"
}'
|