提交Video任务(文生视频、文图生视频)
方法: POST路径: /mj/submit/video
一次出 4 个视频
请求参数
Header 参数
text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}Body 参数 application/json
text
prompt
string
必需
motion
enum<string>
必需
枚举值:
low
低动态
high
高动态
image
string
必需
url \ base64; 首帧图片,扩展时可为空
notifyHook
string
可选
action
enum<string>
可选
扩展视频;对视频任务进行操作。不为空时,index、taskId必填
值:
extend
扩展视频
index
string
可选
扩展视频;执行的视频索引号
>= 0 字符
<= 3 字符
task_id
string
可选
扩展视频; 需要操作的视频父任务ID
示例
{
"prompt"
:
"飞来一只蜜蜂"
,
"motion"
:
"low"
,
"image"
:
"https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488&"
,
"notifyHook"
:
""
,
"state"
:
"9"
}请求示例代码
Shell
bash
curl --location --request POST '/mj/submit/video' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "飞来一只蜜蜂",
"motion": "low",
"image": "https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488&",
"notifyHook": "",
"state": "9"
}'返回响应
🟢 200 OK
内容类型: application/json
响应结构
text
code
integer
<int32>
必需
状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)
示例:
1
description
string
描述
必需
示例:
提交成功
properties
object
扩展字段
可选
result
string
任务ID
可选
示例:
1320098173412546示例
json
{
"code": 1,
"description": "Submit Success",
"result": "1752813114021206"
}