102 lines
3.5 KiB
JSON
102 lines
3.5 KiB
JSON
{
|
|
"body": {
|
|
"input": {
|
|
"media": {
|
|
"description": "媒体素材数组。参考图像和参考视频至少传入1个,合计不超过5个。首帧图像最多1张",
|
|
"items": {
|
|
"properties": {
|
|
"reference_voice": {
|
|
"description": "音频URL,用于指定参考素材中主体角色的音色。与reference_image或reference_video搭配使用。格式WAV/MP3,时长1-10s,≤15MB",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"description": "reference_image=参考图像, reference_video=参考视频, first_frame=首帧图像",
|
|
"enum": ["reference_image", "reference_video", "first_frame"],
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"description": "媒体素材URL。支持公网HTTP/HTTPS、OSS临时URL、Base64编码",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"max_items": 5,
|
|
"min_items": 1,
|
|
"required": true,
|
|
"type": "array"
|
|
},
|
|
"negative_prompt": {
|
|
"description": "反向提示词,用来描述不希望在视频画面中出现的内容",
|
|
"max_chars": 500,
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
"prompt": {
|
|
"description": "文本提示词。支持中英文,每个汉字/字母/标点占一个字符,超过部分自动截断。参考图片时通过'图1、图2'指代,参考视频时通过'视频1、视频2'指代。顺序与media数组顺序一致。图和视频分别计数",
|
|
"max_chars": 5000,
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
},
|
|
"parameters": {
|
|
"duration": {
|
|
"default": 5,
|
|
"description": "生成视频时长(秒)。含视频参考时2-10秒,不含视频参考时2-15秒",
|
|
"max": 15,
|
|
"min": 2,
|
|
"required": false,
|
|
"type": "integer"
|
|
},
|
|
"prompt_extend": {
|
|
"default": true,
|
|
"description": "是否开启prompt智能改写。开启后对prompt进行改写,对较短prompt效果提升明显",
|
|
"required": false,
|
|
"type": "boolean"
|
|
},
|
|
"ratio": {
|
|
"default": "16:9",
|
|
"description": "生成视频的宽高比。传入首帧图像时自动忽略,以首帧宽高比为准",
|
|
"enum": ["16:9", "9:16", "1:1", "4:3", "3:4"],
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
"resolution": {
|
|
"default": "1080P",
|
|
"description": "生成视频的分辨率档位,用于控制清晰度。直接影响费用",
|
|
"enum": ["720P", "1080P"],
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
"seed": {
|
|
"description": "随机数种子。固定seed可提升生成结果的可复现性",
|
|
"max": 2147483647,
|
|
"min": 0,
|
|
"required": false,
|
|
"type": "integer"
|
|
},
|
|
"watermark": {
|
|
"default": false,
|
|
"description": "是否添加水印标识,位于视频右下角,文案固定为'AI生成'",
|
|
"required": false,
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"Content-Type": {
|
|
"default": "application/json",
|
|
"description": "请求内容类型",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
"X-DashScope-Async": {
|
|
"default": "enable",
|
|
"description": "异步任务提交标识",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
}
|
|
} |