Vidu(首尾帧生成视频)
POST
/vidu/ent/v1/tasks一家国内新兴的视频生成公司,其中最新的1.5模型有用独家的主体生成功能
相关链接:https://www.vidu.studio/
模型版本 | 功能 | 时长/秒 | 清晰度 | 风格 | 生成时长/秒 | 单价(ptc) |
---|---|---|---|---|---|---|
Vidu-2.0 | 首尾帧生视频 headtailimg | 4 | 360 | 通用 | 30 | 0.25 |
4 | 720 | 通用 | 90 | 0.25 | ||
4 | 1080 | 通用 | 320 | 0.625 | ||
8 | 720 | 通用 | 250 | 1.25 | ||
Vidu-1.5 | 首尾帧生视频 headtailimg | 4 | 360 | 通用 | 30 | 0.25 |
4 | 720 | 通用 | 90 | 0.625 | ||
4 | 1080 | 通用 | 320 | 1.25 | ||
8 | 720 | 通用 | 250 | 1.25 |
价格:请看表格
请求参数
Header 参数
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Content-Type
string
可选
示例值:
application/json
Body 参数application/json
type
enum<string>
必需
枚举值:
text2videoimg2videocharacter2videoheadtailimgupscale
model
string
可选
模型类型,text2video、img2video、character2video 任务可选值:vidu-high-performance
upscale 任务可选值:stable。
当模型版本选择 1.0 时必传vidu-high-performance 和 stable,当为 1.5 时可以不传。这两个参数不会对生成效果有所影响,按要求传输即可
model_version
enum<string>
必需
枚举值:
1.01.5
style
enum<string>
可选
风格,仅 text2video 任务需要填写,选项:general,anime
枚举值:
generalanime
moderation
boolean
可选
是否打开审核,默认值为 true
input
object
必需
任务输入,包含以下字段
seed
integer
可选
随机种子,不传或者传 0 则使用随机数替代
enhance
boolean
可选
是否使用提示词增强功能,默认值为 true
creation_id
string
可选
生成物 ID,仅 upscale 任务必填
prompts
array [object {2}]
可选
output_params
object
可选
sample_count
integer
必需
生成视频数量,目前仅支持 1
duration
integer
必需
视频时长,支持 4 或 8
resolution
enum<string>
必需
分辨率, 仅 1.5 模型支持. 选项:512 。512 是指基础分辨率为 512*512
枚举值:
512720p1080p
movement_amplitude
enum<string>
可选
运动幅度,仅 1.5 模型支持. 选项:auto ,small,medium,large ,选择 auto 模型会根据输入自动选择最合适的运动幅度
枚举值:
autosmallmediumlarge
aspect_ratio
string
必需
视频比例,仅 1.5 模型支持. 选项:默认, 16:9 ,16:9 , 9:16 , 1:1
示例1
{
"type": "headtailimg2video",
"model_version": "1.5",
"input": {
"prompts": [
{
"type": "text",
"content": "两个人拥抱"
},
{ // first image
"type": "image",
"content": "https://test-ss-images.s3.ap-southeast1.amazonaws.com/tmp/prompt-300k.jpeg"
},
{ // last image
"type": "image",
"content": "https://test-ss-images.s3.ap-southeast1.amazonaws.com/tmp/prompt-300k.jpeg"
}
]
},
"output_params": {
"sample_count": 1,
"resolution": "512",
"movement_amplitude": "auto",
"duration": 4
},
"moderation": false
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
id
string
必需
type
string
必需
state
string
必需
model
string
必需
style
string
必需
moderation
boolean
必需
input
object
必需
creation_id
string
必需
prompts
array [object {3}]
必需
seed
integer
必需
enhance
boolean
必需
multi_image_boost
boolean
必需
output_params
object
必需
sample_count
integer
必需
duration
integer
必需
aspect_ratio
string
必需
resolution
string
必需
movement_amplitude
string
必需
err_code
string
必需
creations_count
integer
必需
model_version
string
必需
created_at
string
必需
示例
{
"id": "string",
"type": "string",
"state": "string",
"model": "string",
"style": "string",
"moderation": true,
"input": {
"creation_id": "string",
"prompts": [
{
"type": "string",
"content": "string",
"negative": true
}
],
"seed": 0,
"enhance": true,
"multi_image_boost": true
},
"output_params": {
"sample_count": 0,
"duration": 0,
"aspect_ratio": "string",
"resolution": "string",
"movement_amplitude": "string"
},
"err_code": "string",
"creations_count": 0,
"model_version": "string",
"created_at": "string"
}
最后修改时间: 1 个月前