- Get Started
- Endpoints
- Song(Udio)
- Kling
- Hailuo
- Flux
- AI Hug
- LLM
- Midjourney
- Faceswap
- TTS
- Trellis
- Luma Dream Machine
- WanX
- Skyreels
- Framepack
- Hunyuan Video
- Mmaudio
- DiffRhythm
- Ace Step
- Tools
- PiAPI Account Management
- Resources
- Legacy Documentation
Get Task
GET
https://api.piapi.ai/api/v1/task/{task_id}
Request
Path Params
task_id
string
required
Header Params
X-API-Key
string
required
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.piapi.ai/api/v1/task/' \
--header 'X-API-Key;'
Responses
🟢200OK
application/json
Body
code
integer
optional
data
object
optional
task_id
string
optional
input
string
optional
status
string
optional
metadata
object
optional
task
object
optional
works
array [object {18}]
optional
message
string
optional
Example
{
"timestamp": 1749613445,
"data": {
"task_id": "f8d11a53-f3ac-47ad-a4d6-7610fda830be",
"model": "Qubico/ace-step",
"task_type": "txt2audio",
"status": "completed",
"config": {
"service_mode": "",
"webhook_config": {
"endpoint": "",
"secret": ""
}
},
"input": {
"duration": 10,
"lyrics": "[inst]",
"negative_style_prompt": "",
"style_audio": "",
"style_prompt": "guitar and piano"
},
"output": {
"audio_url": "https://img.theapi.app/temp/2c802652-03bb-4266-8d4b-1cd81da45dcb.mp3"
},
"meta": {
"created_at": "2025-06-11T11:43:31.673594+08:00",
"started_at": "2025-06-11T11:43:32.473551+08:00",
"ended_at": "2025-06-11T11:44:05.72226+08:00",
"usage": {
"type": "llm",
"frozen": 0,
"consume": 5000
},
"is_using_private_pool": false
},
"detail": null,
"logs": [],
"error": {
"code": 0,
"raw_message": "",
"message": "",
"detail": null
}
}
}
🟠400Bad Request
🟠401Unauthorized
🔴500Server Error
Modified at 2025-06-11 09:04:30