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

图生视频

POST
/api/v1/video/generation

Header Parameters

Authorization*string

格式: Authorization: Bearer sk-xxxxxx

Request Body

application/json

duration?integer

视频时长,单位 s,支持: 5 8 10(aisphere-v5.5模型)

image*

图片信息

prompt*string

提示词

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,支持: normal fast (normal, fast, --fast only available when duration=5; --resolution=1080p does not support fast)

style?string

风格,非必填,支持: anime 3d_animation clay normal(aisphere-v5.5模型只支持此模式) comic cyberpunk (首尾生不支持配置)

soundEffectSwitch?boolean

是否开启背景音乐(aisphere-v5.5模型不支持),非必填,默认 false

soundEffectContent?string

背景音乐类型(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模型), 参考生必填

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"    },    "prompt": "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"
}