- Get Started
- Endpoints
- Flux
- AI Hug
- LLM
- Midjourney
- Faceswap
- TTS
- Song(Suno+Udio)
- Trellis
- Luma Dream Machine
- Kling
- Hailuo
- Skyreels
- WanX
- Hunyuan Video
- PiAPI Account Management
- Mmaudio
- DiffRhythm
- Tools
- Resources
- Legacy Documentation
Get Task
Developing
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
{
"code": 200,
"data": {
"task_id": "3c1e8a96-0b66-4d8b-91ed-2b7cfc914869",
"model": "Qubico/diffrythm",
"task_type": "txt2audio-base",
"status": "pending",
"config": {
"service_mode": "",
"webhook_config": {
"endpoint": "",
"secret": ""
}
},
"input": {
"style_audio": "",
"style_prompt": "pop",
"lyrics": ""
},
"output": null,
"meta": {
"created_at": "2025-03-24T15:36:52.885258665Z",
"started_at": "0001-01-01T00:00:00Z",
"ended_at": "0001-01-01T00:00:00Z",
"usage": {
"type": "llm",
"frozen": 0,
"consume": 200000
},
"is_using_private_pool": false
},
"detail": null,
"logs": [],
"error": {
"code": 0,
"raw_message": "",
"message": "",
"detail": null
}
},
"message": "success"
}
🟠400Bad Request
🟠401Unauthorized
🔴500Server Error
Modified at 2025-03-24 16:00:19