请求参数 请求头(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"
}'
|