Skip to content

提交生成视频任务

POST https://az.gptplus5.com/luma/generations

官方文档:https://docs.lumalabs.ai/docs/video-generation

请求参数

Authorization

在 Header 添加参数Authorization,其值为在 Bearer 之后拼接 Token

示例:Authorization: Bearer ********************

Header 参数

参数名类型必需说明示例
Content-Typestring必需application/json
Acceptstring必需application/json
Authorizationstring必需Bearer {{YOUR_API_KEY}}

Body 参数 (application/json)

参数名类型必需说明
user_promptstring必需必传,用户输入的提示词/问题描述
expand_promptboolean必需可选,提示词优化开关
loopboolean必需可选,是否循环使用参考图
image_urlstring必需
image_end_urlstring必需可选,目标关键帧图片
notify_hookstring必需可选,处理完成后的回调通知地址
resolutionstring必需720p或者1080p默认720p
durationstring必需
model_namestring必需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

参数名类型必需说明
codeinteger必需
messagestring必需
request_idstring必需
dataobject必需
  └ task_idstring必需
  └ task_statusstring必需
  └ created_atinteger必需
  └ updated_atinteger必需

响应示例

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
}