- OpenAI通用接口
- 聊天接口(Chat)
- 图像接口(Images)
- 帮助中心
- gemini
- Midjourney API文档
- Flux(文生图)
- Replicate格式
- OpenAI DallE3格式POST
- Runway视频接口
- Luma视频接口
- 可灵API(官方接口)
- 工作流接口
- suno
- ideogram
视频生成
POST
/luma/generations
请求参数
Header 参数
Authorization
string
必需
示例值:
{{Authorization}}
Body 参数application/json
user_prompt
string
必需
expand_prompt
boolean
是否开启prompt 优化
aspect_ratio
string
必需
image_url
string
参考图
image_end_url
string
关键帧
loop
boolean
是否循环
示例
{
"user_prompt": "kiss with a man",
"image_url": "https://storage.cdn-luma.com/app_data/photon/user_uploads/1f681e91-c59e-4486-ac49-a897de1b6e63/945475c1-c3fb-4bfe-91d3-092b5fb62665_image_file.jpg",
"expand_prompt": true,
"loop": false
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/luma/generations' \
--header 'Authorization: {{Authorization}}' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"user_prompt": "kiss with a man",
"image_url": "https://storage.cdn-luma.com/app_data/photon/user_uploads/1f681e91-c59e-4486-ac49-a897de1b6e63/945475c1-c3fb-4bfe-91d3-092b5fb62665_image_file.jpg",
"expand_prompt": true,
"loop": false
}'
返回响应
🟢200成功
application/json
Body
id
string
ID 编号
prompt
string
提示词
state
string
必需
pending
-未开始,processing
-生成中,completed
-成功,failed
-失败created_at
string
创建时间
liked
string
必需
estimate_wait_seconds
string
必 需
video
object
视频链接
url
string
资源链接
width
string
必需
height
string
必需
thumbnail
object
缩略图
url
string
资源链接
width
string
必需
height
string
必需
last_frame
object
尾帧
url
string
资源链接
width
string
必需
height
string
必需
示例
{
"id": "9d4b7516-77e5-481a-b015-48313946f33b",
"prompt": "cat dance",
"state": "pending",
"created_at": "2024-07-01T07:35:13.498660Z",
"video": null,
"liked": null,
"estimate_wait_seconds": null
}
修改于 2024-11-17 13:50:13