图生视频
/api/v1/video/generationHeader Parameters
格式: Authorization: Bearer sk-xxxxxx
Request Body
application/json
固定值i2v
模型名称, 支持:
aisphere-v5.5
aisphere-v5
aisphere-v4.5
aisphere-v4
aisphere-v3.5
图片信息,纯图生视频时必填
图片链接
首尾帧图片信息, 首尾生时必填
首帧图片信息
图片链接
尾帧图片信息
图片链接
参考图片信息,参考生视频时必填(仅 aisphere-v4.5、aisphere-v5 支持)。每个元素包含 imageUrl 字段
图片链接
必须是"subject"(主体), "background" (背景)之一
主体/背景名称,参考生提示词中可以用{}框住,例子:{person1} talking to {person2}
提示词,最大长度 2048 字符
负面提示词
视频时长,单位 s
aisphere-v3.5 ~ v5 支持:5、8
aisphere-v5.5 支持:5、8、10
视频分辨率,支持:360p、540p、720p、1080p
生成模式,默认 normal
aisphere-v3.5 ~ v4.5 支持:normal、fast
aisphere-v5、v5.5 仅支持 normal。(fast 仅在 duration=5 时可用,resolution=1080p 不支持 fast)
风格,支持:anime、3d_animation、clay、comic、cyberpunk、normal(normal 仅 aisphere-v5.5 支持;首尾帧生视频不支持配置 style)
随机种子
是否开启背景音乐,默认 false(aisphere-v3.5 ~ v5 支持,aisphere-v5.5 不支持)
背景音乐类型,默认自动匹配,支持字符串传入,如 鸟鸣(aisphere-v3.5 ~ v5 支持,aisphere-v5.5 不支持)
运镜参数(aisphere-v4、aisphere-v4.5模型),非必填,支持
horizontal_left: 向左水平移动
horizontal_right: 向右水平移动
vertical_up: 垂直向上移动
vertical_down: 垂直向下移动
zoom_in: 镜头拉近,画面放大
zoom_out: 镜头拉远,画面缩小
crane_up: 从低处上升
quickly_zoom_in: 快速拉近
quickly_zoom_out: 快速拉远
smooth_zoom_in: 平滑地拉近
camera_rotation: 围绕轴旋转
robo_arm: 使用机械臂进行复杂移动
super_dolly_out: 快速向后移动
whip_pan: 快速水平摇动,产生模糊
hitchcock: 同时变焦和推拉,改变背景关系
left_follow: 跟随主体向左
right_follow: 跟随主体向右
pan_left: 固定位置水平向左摇动
pan_right: 固定位置水平向右摇动
fix_bg: 移动时保持背景不变
控制开关Audio(aisphere-v5.5模型),非必填. true: Audio on , false: Audio off
控制单镜头, 多镜头(aisphere-v5.5模型),非必填. true: 多镜头 , false: 单镜头
是否使用系统优化提示词功能(aisphere-v5.5模型),非必填. "enabled" : 打开 "disabled" : 关闭. "auto" or 忽略: 让模型自动决定
Response Body
application/json
curl -X POST "https://api.aa.com.cn/api/v1/video/generation" \ -H "Authorization: string" \ -H "Content-Type: application/json" \ -d '{ "_action": "string", "model": "string", "image": { "imageUrl": "string" }, "headtailImages": { "headImage": { "imageUrl": "string" }, "tailImage": { "imageUrl": "string" } }, "characterImages": [ { "imageUrl": "string", "type": "string", "refName": "string" } ], "prompt": "string", "negativePrompt": "string", "duration": 0, "resolution": "string", "motionMode": "string", "style": "string", "seed": 0, "soundEffectSwitch": true, "soundEffectContent": "string", "cameraMovement": "string", "generateAudioSwitch": true, "generateMultiClipSwitch": true, "thinkingType": "string" }'{
"code": 0,
"data": {
"urls": [
"string"
],
"usage": {
"images": 0,
"seconds": 0,
"input_tokens": 0,
"total_tokens": 0,
"output_tokens": 0
},
"expired": "string",
"task_id": "string",
"task_status": "string"
},
"message": "string",
"request_id": "string"
}