生成视频
POST
/dream-machine/v1/generations请求参数
Header 参数
Content-Type
string
可选
示例值:
application/json; charset=utf-8
Body 参数application/json
prompt
string
提示词
aspect_ratio
string
长宽比
默认值:
16:9
loop
boolean
是否循环播放视频
keyframes
object
关键帧
frame0
object
首帧
frame1
object
尾帧
callback_url
string
可选
示例
{
"prompt": "A tiger walking in snow",
"keyframes": {
"frame0": {
"type": "image",
"url": "https://storage.cdn-luma.com/dream_machine/7e4fe07f-1dfd-4921-bc97-4bcf5adea39a/video_0_thumb.jpg"
}
}
}
返回响应
成功(201)
HTTP 状态码: 201
内容格式: JSONapplication/json
数据结构
id
string
必需
state
string
必需
failure_reason
null
必需
created_at
string
必需
assets
null
必需
version
null
必需
request
object
必需
prompt
string
必需
aspect_ratio
string
必需
loop
boolean
必需
keyframes
null
必需
callback_url
string
必需
示例
{
"id": "7ca76429-99d1-46ab-bb2e-84baa4acdb04",
"state": "queued",
"failure_reason": null,
"created_at": "2024-11-27T13:50:56.313494Z",
"assets": null,
"version": null,
"request": {
"prompt": "A serene lake surrounded by mountains at sunset",
"aspect_ratio": "16:9",
"loop": true,
"keyframes": null,
"callback_url": "xxx"
}
}
最后修改时间: 7 天前