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

文生视频

POST
/api/v1/video/generation

Header Parameters

Authorization*string

格式: Authorization: Bearer sk-xxxxxx

Request Body

application/json

prompt?string

提示词,最大长度 2048 字符

duration?integer

视频时长,单位 s

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

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

model?string

模型名称, 支持:

aisphere-v5.5

aisphere-v5

aisphere-v4.5

aisphere-v4

aisphere-v3.5

motionMode?string

生成模式,默认 normal

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

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

_action*string

固定值t2v

resolution?string

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

style?string

风格,支持:anime、3d_animation、clay、comic、cyberpunk

seed?integer

随机种子

negativePrompt?string

负面提示词,用于描述不希望在画面中出现的内容

aspectRatio?string

画面比例,支持:16:9、9:16、1:1、4:3、3:4

soundEffectSwitch?boolean

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

soundEffectContent?string

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

cameraMovement?string

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

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 '{    "_action": "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"
}