主题
提交生成视频任务
POST
https://az.gptplus5.com/luma/generations
官方文档:https://docs.lumalabs.ai/docs/video-generation
请求参数
Authorization
在 Header 添加参数Authorization,其值为在 Bearer 之后拼接 Token
示例:Authorization: Bearer ********************
Header 参数
| 参数名 | 类型 | 必需 | 说明 | 示例 |
|---|---|---|---|---|
Content-Type | string | 必需 | application/json | |
Accept | string | 必需 | application/json | |
Authorization | string | 必需 | Bearer {{YOUR_API_KEY}} |
Body 参数 (application/json)
| 参数名 | 类型 | 必需 | 说明 |
|---|---|---|---|
user_prompt | string | 必需 | 必传,用户输入的提示词/问题描述 |
expand_prompt | boolean | 必需 | 可选,提示词优化开关 |
loop | boolean | 必需 | 可选,是否循环使用参考图 |
image_url | string | 必需 | |
image_end_url | string | 必需 | 可选,目标关键帧图片 |
notify_hook | string | 必需 | 可选,处理完成后的回调通知地址 |
resolution | string | 必需 | 720p或者1080p默认720p |
duration | string | 必需 | |
model_name | string | 必需 | ray-v1、 ray-v2 官方显示是 ray1.6 ray2 |
请求示例
json
{
"user_prompt": "一阵风吹过树林,使女人的面纱微微飘动。",
"model_name":"ray-v2",
"duration":"5s",
"resolution":"720p"
}cURL 示例
bash
curl --location --request POST 'https://az.gptplus5.com/luma/generations' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"user_prompt": "一阵风吹过树林,使女人的面纱微微飘动。",
"model_name":"ray-v2",
"duration":"5s",
"resolution":"720p"
}'返回响应
🟢200成功
响应 Body
| 参数名 | 类型 | 必需 | 说明 |
|---|---|---|---|
code | integer | 必需 | |
message | string | 必需 | |
request_id | string | 必需 | |
data | object | 必需 | |
└ task_id | string | 必需 | |
└ task_status | string | 必需 | |
└ created_at | integer | 必需 | |
└ updated_at | integer | 必需 |
响应示例
json
{
"id": "4665a07c-7641-4809-a133-10786201bb56",
"prompt": "",
"state": "pending",
"queue_state": null,
"created_at": "2024-12-22T13:38:40.139409Z",
"batch_id": "",
"video": null,
"video_raw": null,
"liked": null,
"estimate_wait_seconds": null,
"thumbnail": null,
"last_frame": null
}