Skip to content

Submit Video Generation Task

POST https://www.kkiai.com/luma/generations

Official Documentation: https://docs.lumalabs.ai/docs/video-generation

Request Parameters

Authorization

Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.

Example: Authorization: Bearer ********************

Header Parameters

Parameter NameTypeRequiredDescriptionExample
Content-TypestringRequiredapplication/json
AcceptstringRequiredapplication/json
AuthorizationstringRequiredBearer {{YOUR_API_KEY}}

Body Parameters (application/json)

Parameter NameTypeRequiredDescription
user_promptstringRequiredRequired. User input prompt/problem description
expand_promptbooleanRequiredOptional. Prompt optimization switch
loopbooleanRequiredOptional. Whether to loop the reference image
image_urlstringRequired
image_end_urlstringRequiredOptional. Target keyframe image
notify_hookstringRequiredOptional. Callback notification URL after processing is complete
resolutionstringRequired720p or 1080p, default is 720p
durationstringRequired
model_namestringRequiredray-v1, ray-v2. Official display is ray1.6 ray2

Request Example

json
{
    "user_prompt": "A gust of wind passes through the woods, causing the woman's veil to flutter gently.",
    "model_name":"ray-v2",
    "duration":"5s",
    "resolution":"720p"
}

cURL Example

bash
curl --location --request POST 'https://www.kkiai.com/luma/generations' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "user_prompt": "A gust of wind passes through the woods, causing the woman's veil to flutter gently.",
    "model_name":"ray-v2",
    "duration":"5s",
    "resolution":"720p"
}'

Response

🟢 200 Success

Response Body

Parameter NameTypeRequiredDescription
codeintegerRequired
messagestringRequired
request_idstringRequired
dataobjectRequired
  └ task_idstringRequired
  └ task_statusstringRequired
  └ created_atintegerRequired
  └ updated_atintegerRequired

Response Example

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
}