Skip to content

Extend Video

POST https://www.kkiai.com/luma/generations/{task_id}/extend

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 ********************

Path Parameters

ParameterTypeRequiredDescription
task_idstringRequiredThe task id of the video task to be extended

Header Parameters

ParameterTypeRequiredDescriptionExample
Content-TypestringRequiredapplication/json
AcceptstringRequiredapplication/json
AuthorizationstringRequiredBearer {{YOUR_API_KEY}}

Body Parameters (application/json)

ParameterTypeRequiredDescription
user_promptstringRequiredRequired. User input prompt/problem description, the main input for generating content
expand_promptbooleanRequiredOptional. Whether to enable prompt optimization
image_urlstringRequiredOptional. Reference image URL or Base64 encoded
image_end_urlstringRequiredOptional. Keyframe image URL or Base64 encoded
notify_hookstringRequired

Request Example

json
{
    "user_prompt": "add cat",
    "expand_prompt": true
}

cURL Example

bash
curl --location --request POST 'https://www.kkiai.com/luma/generations/4665a07c-7641-4809-a133-10786201bb56/extend' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "user_prompt": "add cat",
    "expand_prompt": true
}'

Response

🟢 200 Success

Response Body

ParameterTypeRequiredDescription
codeintegerRequired
messagestringRequired
request_idstringRequired
dataobjectRequired
  └ task_idstringRequired
  └ task_statusstringRequired
  └ created_atintegerRequired
  └ updated_atintegerRequired

Response Example

json
{
    "id": "749d328e-4fd0-43a8-8c89-32394d60da69",
    "prompt": "",
    "state": "pending",
    "queue_state": null,
    "created_at": "2024-12-22T14:48:39.947851Z",
    "batch_id": "",
    "video": null,
    "video_raw": null,
    "liked": null,
    "estimate_wait_seconds": null,
    "thumbnail": null,
    "last_frame": null
}