Docs
AI HUG VIDEO API

AI Hug Video API

Documentation on our AI Hug Video API

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.

Pricing

This API is pay-as-you-go for all users, see AI HUG API.

AI Hug Video API (Create Task)

POST

https://api.goapi.ai/api/v1/task

Create a hugging video generation task

Parameters:

Header
NameTypeRequiredDescription
X-API-Keystring✔️Your API Key for request authorization
Content-Typestring✔️Set to `application/json`
Body
NameTypeRequiredDescription
modelstring✔️The model name, should be `Qubico/hug-video`
task_typestring✔️Task type, should be `image_to_video`
inputjson✔️Input parameters including the image URL

Response Codes:

200: OK
Successful Response
400: Bad Request
Invalid request format.
401: Unauthorized
Authorization failure.

Input Json Example

{
        "image_url": "https://i.ibb.co/znPyjxy/person2.jpg"
}

Request Example

import requests
import json
 
url = "https://api.goapi.ai/api/v1/task"
 
payload = json.dumps({
    "model": "Qubico/hug-video", 
    "task_type": "image_to_video",
    "input": {
        "image_url": "https://i.ibb.co/znPyjxy/person2.jpg"
    } 
})
headers = {
  'X-API-Key': 'YOU-GOAPI-KEY',
  'Content-Type': 'application/json'
}
 
response = requests.request("POST", url, headers=headers, data=payload)
 
print(response.text)

AI Hug Video API (Get Task)

GET

https://api.goapi.ai/api/v1/task/{task_id}

Check the status of a hugging video generation task

Parameters:

Header
NameTypeRequiredDescription
X-API-Keystring✔️Your API Key for request authorization

Response Codes:

200: OK
Returns the status and result of the task
404: Not Found
Task ID not found.
401: Unauthorized
Authorization failure.

Request Example

import requests
 
url = "https://api.goapi.ai/api/v1/task/56ea8da3-8507-4118-9f1e-111111111111"
 
payload={}
headers = {
  'X-API-Key': 'YOUR_GOAPI_KEY',
  'Content-Type': 'application/json'
}
 
response = requests.request("GET", url, headers=headers, data=payload)
 
print(response.text)

Response Example (Unified Task Result)

{
    "code": 200,
    "message": "success",
    "data": {
        "task_id": "0f647527-12bd-48b1-b813-111111111",
        "model": "Qubico/hug-video", 
        "task_type": "image_to_video",
        "status": "", // pending/processing/failed/completed
        "input": {}, 
        "output": {}, 
        "meta": { 
        },
        "logs": [],
        "error": {
            "code": 1100,
            "message": ""
        } 
    }
}