Create Task
POST
/api/v1/taskThis endpoint from PiAPI's Dream Machine API utilizes Dream Machine model by Luma Labs to produce text/image-to-video generation.
Request
Your API Key used for request authorization
the model name
type of the task
the input param of the luma task
The prompt is a description that enables the Dream Machine API to produce a video.
The recommended value at this time is false. We have tested that the value false
results in better quality.
Whether to loop the video.
If left null then the task would be a text-to-video task; if filled out, then the task would be an image-to-video or video-extend task.
In an image-to-video task, the type
of the frame can only be set to image
, you can choose to set to frame0 and/or frame1.
Webhook provides timely task notifications. Check PiAPI webhook for detail.
This allows users to choose whether this specific task will get processed under PAYG or HYA mode. If unspecified, then this task will get processed under whatever mode (PAYG or HYA)
the user chose on the workspace setting of your account.
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",
"expand_prompt": true,
"loop": true
},
"config": {
"service_mode": "",
"webhook_config": {
"endpoint": "",
"secret": ""
}
}
}
Request samples
Responses
Hover on the "Completed" option and you coult see the explaintion of all status: completed/processing/pending/failed/staged
If you get non-null error message, here are some steps you chould follow:
- Check our common error message
- Retry for several times
- If you have retried for more than 3 times and still not work, file a ticket on Discord and our support will be with you soon.
{
"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"
}