{
"model": "Qubico/flux1-schnell",
"task_type": "img2img",
"input": {
"prompt": "a bear",
"image": "https://i.ibb.co/J7ZNgSG/01.jpg"
},
"config": {
"webhook_config": {
"endpoint": "https://webhook.site/xxxx",
"secret": ""
}
}
}
curl --location --request POST 'https://api.piapi.ai/api/v1/task' \
--header 'X-API-Key;' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "Qubico/flux1-schnell",
"task_type": "img2img",
"input": {
"prompt": "a bear",
"image": "https://i.ibb.co/J7ZNgSG/01.jpg"
},
"config": {
"webhook_config": {
"endpoint": "https://webhook.site/xxxx",
"secret": ""
}
}
}'
{
"code": 200,
"data": {
"task_id": "1631d053-2352-4add-95cc-360fc52d5f89",
"model": "Qubico/flux1-schnell",
"task_type": "img2img",
"status": "pending",
"config": {
"webhook_config": {
"endpoint": "https://webhook.site/xxxx",
"secret": ""
}
},
"input": {
"prompt": "a bear",
"negative_prompt": "",
"image": "https://i.ibb.co/J7ZNgSG/01.jpg",
"width": 0,
"height": 0,
"steps": 0
},
"output": null,
"meta": {
"created_at": "2024-09-25T07:40:08.333962391Z",
"started_at": "0001-01-01T00:00:00Z",
"ended_at": "0001-01-01T00:00:00Z",
"usage": {
"type": "quota",
"frozen": 0,
"consume": 20000
},
"is_using_private_pool": false
},
"detail": null,
"logs": [],
"error": {
"code": 0,
"raw_message": "",
"message": "",
"detail": null
}
},
"message": "success"
}