Light Mode
Get Task
GET
/api/v1/task/{task_id}This endpoint from PiAPI's Dream Machine API retrieves the output of a Dream Machine task.
Request
Path Params
task_id
string
required
Header Params
x-api-key
string
required
Your API key for authorization
Request samples
Responses
Success(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
code
integer
required
data
object
required
task_id
string
required
model
string
required
task_type
string
required
status
enum<string>
required
Hover on the "Completed" option and you coult see the explaintion of all status: completed/processing/pending/failed/staged
Allowed values:
CompletedProcessingPendingFailedStaged
input
object
required
output
object
required
meta
object
required
detail
null
required
logs
array [object]
required
error
object
required
message
string
required
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.
Example
{
"code": 200,
"data": {
"task_id": "f7a6d8e5-249f-4a9e-a8f4-1e8af806ea15",
"model": "luma",
"task_type": "video_generation",
"status": "completed",
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "",
"secret": ""
}
},
"input": {},
"output": {
"prompt": "",
"internal_state": "completed",
"created_at": "",
"video": {
"url": "https://xxx.mp4",
"width": 1360,
"height": 752
},
"video_raw": {
"url": "https://xxx.mp4",
"width": 1360,
"height": 752
},
"thumbnail": {
"url": "https://xxx.jpg",
"width": 1360,
"height": 752
},
"last_frame": {
"url": "https://xxx.jpg",
"width": 1360,
"height": 752
}
},
"meta": {},
"detail": null,
"logs": null,
"error": {
"code": 0,
"raw_message": "",
"message": "",
"detail": null
}
},
"message": "success"
}
Last modified: 4 months ago