认证
authorization string 必填
所有 API 均使用 Bearer Token 鉴权
获取 API Key:
访问 API Key 管理页面 获取 API Key
用法:
将以下 Header 添加到请求中:
Authorization: Bearer YOUR_API_KEY
参数
model string 必填
请求使用的模型 ID.
值:kirin_v3_t2v
multi_shot boolean
是否生成多镜头视频
当前参数为 true 时, prompt 参数无效
当前参数为 false 时, shot_type 参数及 multi_prompt 参数无效
默认值: false
shot_type string
分镜方式
当 multi_shot 参数为 true 时, 当前参数必填
选项: customize
prompt string
文本提示词, 可包含正向描述和负向描述
不能超过 2500 个字符
当 multi_shot 参数为 false 时, 当前参数不得为空
multi_prompt array
各分镜提示词, 可包含正向描述和负向描述
通过 index、prompt、duration 参数定义分镜序号及相应提示词和时长:
- 最多支持
6个分镜, 最小支持1个分镜 - 每个分镜相关内容的最大长度不超过
512 - 每个分镜的时长不大于当前任务的总时长, 不小于
1 - 所有分镜的时长之和等于当前任务的总时长
用 key:value 承载:
"multi_prompt": [
{
"index": int,
"prompt": "string",
"duration": "5"
},
{
"index": int,
"prompt": "string",
"duration": "5"
}
]
当 multi_shot 参数为 true 且 shot_type 参数为 customize 时, 当前参数不得为空
negative_prompt string
负向文本提示词
建议直接在正向提示词中, 通过否定句来补充负向提示词信息
不能超过 2500 个字符
sound string
生成视频时是否同时生成声音
仅 V2.6 及后续版本模型支持当前参数
选项: on, off
默认值: off
mode string
生成视频的模式
std:标准模式(标准), 基础模式, 生成 720P 视频, 性价比高
pro:专家模式(高品质), 高表现模式, 生成 1080P 视频, 视频质量更佳
选项: std, pro
默认值: std
aspect_ratio string
生成视频的画面纵横比(宽:高)
选项: 16:9, 9:16, 1:1
默认值: 16:9
duration string
生成视频时长, 单位 s
选项: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
默认值: 5
watermark_info array
是否同时生成含水印的结果
通过 enabled 参数定义, 用 key:value 承载:
"watermark_info": {
"enabled": boolean // true 为生成, false 为不生成
}
暂不支持自定义水印
callback_url string
本次任务结果回调通知地址, 如果配置, 服务端会在任务状态发生变更时主动通知
external_task_id string
自定义任务 ID
用户自定义任务 ID, 传入不会覆盖系统生成的任务 ID, 但支持通过该 ID 进行任务查询
请注意, 单用户下需要保证唯一性
轮询
由于视频生成需要时间, 您需要在创建任务后轮询任务状态
初始响应返回任务 ID 和初始状态. 实际的生成结果必须通过轮询任务状态端点来获取
响应格式
error object
错误信息. 仅在状态为 failed 时出现.
code
string错误码
error_message
string详细错误信息
output array
生成结果. 仅在状态为 completed 时出现.
content
array生成内容列表
type
string资源类型, 如
video,imageurl
string生成内容的 URL
duration
number视频时长
jobId
string远程任务 ID
usage object
使用统计. 仅在状态为 completed 时出现.
cost
string总费用 (美元)
discount
number折扣金额
metadata object
元数据信息
错误码
| 错误码 | 描述 |
|---|---|
| 006001094 | 任务资源不足 |
| 006001095 | 任务响应错误 |
| 006001099 | 任务创建错误 |