type
of the frame can only be set to image
, you can choose to set to frame0 and/or frame1.public
means this task will be processed under PAYG mode.private
means this task will be processed under HYA mode.{
"model": "luma",
"task_type": "video_generation",
"input": {
"prompt": "Fly fishing",
"key_frames": {
"frame0": {
"type": "laborum ad",
"url": "https://glaring-fishery.com/",
"id": "XFT5J9GBfGDm_iqe4z3oU"
},
"frame1": {
"type": "do ex dolor ea",
"url": "https://hungry-oil.org/"
}
},
"model_name": "ray-v1",
"duration": 5,
"aspect_ratio": "9:16"
},
"config": {
"webhook_config": {
"endpoint": "",
"secret": ""
},
"service_mode": ""
}
}
curl --location --request POST 'https://api.piapi.ai/api/v1/task' \
--header 'x-api-key;' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "luma",
"task_type": "video_generation",
"input": {
"prompt": "Fly fishing",
"key_frames": {
"frame0": {
"type": "laborum ad",
"url": "https://glaring-fishery.com/",
"id": "XFT5J9GBfGDm_iqe4z3oU"
},
"frame1": {
"type": "do ex dolor ea",
"url": "https://hungry-oil.org/"
}
},
"model_name": "ray-v1",
"duration": 5,
"aspect_ratio": "9:16"
},
"config": {
"webhook_config": {
"endpoint": "",
"secret": ""
},
"service_mode": ""
}
}'
{
"code": 200,
"data": {
"task_id": "f7a6d8e5-249f-4a9e-a8f4-1e8af806ea15",
"model": "luma",
"task_type": "video_generation",
"status": "pending",
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "",
"secret": ""
}
},
"input": {},
"output": {
"prompt": "",
"internal_state": "",
"created_at": "",
"video": null,
"video_raw": null,
"thumbnail": null,
"last_frame": null
},
"meta": {},
"detail": null,
"logs": null,
"error": {
"code": 0,
"raw_message": "",
"message": "",
"detail": null
}
},
"message": "success"
}