Light Mode
Create Task
POST
/api/v1/taskThis is provided as part of the AI Hug API from PiAPI.
This service allows you to generate a hugging video of two people from an image using Qubico's hardware. It uses Qubico's unified task structure.
Request
Header Params
X-API-Key
string
required
Your API Key for request authorization
Content-Type
enum<string>
required
Allowed value:
application/json
Body Params application/json
model
enum<string>
required
Allowed value:
Qubico/hug-video
task_type
enum<string>
required
Allowed value:
image_to_video
input
object
required
Input parameters including the image URL
image_url
string
required
Example
{
"model": "Qubico/hug-video",
"task_type": "image_to_video",
"input": {
"image_url": "https://i.ibb.co/znPyjxy/person2.jpg"
}
}
Request samples
Responses
OK(200)
Bad Request(400)
Unauthorized(401)
HTTP Code: 200
Content Type : JSONapplication/json
OK-Successful Response.
Data Schema
object {0}
Example
{
"code": 200,
"data": {
"task_id": "49439a00-465c-4501-9ce2-14581e01f616",
"model": "Qubico/hug-video",
"task_type": "image_to_video",
"status": "",// pending/processing/failed/completed
"config": {
"webhook_config": {
"endpoint": "",
"secret": ""
}
},
"input": { },
"output": {},
"meta": {},
"detail": null,
"logs": [],
"error": {
"code": 0,
"raw_message": "",
"message": "",
"detail": null
}
},
"message": "success"
}
Modified at 16 hours ago