典名词元典名词元首页
API 文档
AI 模型接口视频AiSphere

图生视频

POST
/api/v1/video/generation

Header Parameters

Authorization*string

格式: Authorization: Bearer sk-xxxxxx

Request Body

application/json

duration?integer

视频时长,单位 s

aisphere-v3.5 ~ v5 支持:5、8

aisphere-v5.5 支持:5、8、10

image*

图片信息,纯图生视频时必填

prompt?string

提示词,最大长度 2048 字符

resolution?string

视频分辨率,支持:360p、540p、720p、1080p

model*string

模型名称, 支持:

aisphere-v5.5

aisphere-v5

aisphere-v4.5

aisphere-v4

aisphere-v3.5

_action*string

固定值i2v

seed?integer

随机种子

headtailImages*

首尾帧图片信息, 首尾生时必填

negativePrompt?string

负面提示词

motionMode?string

生成模式,默认 normal

aisphere-v3.5 ~ v4.5 支持:normal、fast

aisphere-v5、v5.5 仅支持 normal。(fast 仅在 duration=5 时可用,resolution=1080p 不支持 fast)

style?string

风格,支持:anime、3d_animation、clay、comic、cyberpunk、normal(normal 仅 aisphere-v5.5 支持;首尾帧生视频不支持配置 style)

soundEffectSwitch?boolean

是否开启背景音乐,默认 false(aisphere-v3.5 ~ v5 支持,aisphere-v5.5 不支持)

soundEffectContent?string

背景音乐类型,默认自动匹配,支持字符串传入,如 鸟鸣(aisphere-v3.5 ~ v5 支持,aisphere-v5.5 不支持)

cameraMovement?string

运镜参数(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: 移动时保持背景不变

characterImages*

参考图片信息,参考生视频时必填(仅 aisphere-v4.5、aisphere-v5 支持)。每个元素包含 imageUrl 字段

generateAudioSwitch?boolean

控制开关Audio(aisphere-v5.5模型),非必填. true: Audio on , false: Audio off

generateMultiClipSwitch?boolean

控制单镜头, 多镜头(aisphere-v5.5模型),非必填. true: 多镜头 , false: 单镜头

thinkingType?string

是否使用系统优化提示词功能(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 '{    "image": {      "imageUrl": "string"    },    "model": "string",    "_action": "string",    "headtailImages": {},    "characterImages": [      {        "imageUrl": "string",        "type": "string",        "refName": "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"
}