- 序言
- OpenAI接口
- Suno音乐接口
- 绘画接口
- 视频接口
- Luma视频接口
- Runway视频接口
- Pika视频接口
- 文本生成(通用)
- 可灵AI
生成视频
POST
https://api.openai-hub.com/luma/generations
生成视频
请求参数
Header 参数
Content-Type
string
可选
示例值:
application/json; charset=utf-8
Authorization
string
必需
示例
Authorization: Bearer 2f68dbbf-519d-4f01-9636-e2421b68f379
默认值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
user_prompt
string
用户提示
示例值:
cat dance
aspect_ratio
string
长宽比
示例值:
16:9
expand_prompt
boolean
可选
示例值:
true
loop
boolean
循环一张参考图
示例值:
true
image_url
string
可选
示例值:
https://example.com/image.png
image_end_url
string
可选
示例值:
https://example.com/end_image.png
notify_hook
string
回调地址
示例值:
https://xxxxxxx
model
string
必需
示例
{
"user_prompt": "cat dance",
"aspect_ratio": "16:9",
"expand_prompt": true,
"loop": true,
"image_url": "https://example.com/image.png",
"image_end_url": "https://example.com/end_image.png",
"notify_hook": "https://xxxxxxx"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.openai-hub.com/luma/generations' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"user_prompt": "cat dance",
"aspect_ratio": "16:9",
"expand_prompt": true,
"loop": true,
"image_url": "https://example.com/image.png",
"image_end_url": "https://example.com/end_image.png",
"notify_hook": "https://xxxxxxx"
}'
返回响应
🟢201Created
application/json
Body
created_at
string
必需
示例值:
2024-07-22T12:47:28.553735Z
estimate_wait_seconds
null
必需
示例值:
null
id
string
必需
示例值:
fc7fb008-7a5e-40ad-a7ff-dbb63db61be8
last_frame
null
必需
示例值:
null
liked
null
必需
示例值:
null
prompt
string
必需
示例值:
cat dance
state
string
必需
示例值:
pending
thumbnail
null
必需
示例值:
null
video
null
必需
示例值:
null
示例
{
"created_at": "2024-07-22T12:47:28.553735Z",
"estimate_wait_seconds": null,
"id": "fc7fb008-7a5e-40ad-a7ff-dbb63db61be8",
"last_frame": null,
"liked": null,
"prompt": "cat dance",
"state": "pending",
"thumbnail": null,
"video": null
}