Get Task

Example API Request

You can make a POST request to the API to get the status of a video generation task. Use the following curl command:

curl --location --request GET 'https://api.unifically.com/kling/v1/videos/generations/taskid' \
--header 'Authorization: Bearer KEY' \
--header 'Content-Type: application/json'

Sample Response

The API will return a response containing the status of the video generation task:

{
    "code": 400,
    "data": {
        "task_id": "45438b78-e168-446b-b783-1b5f0d7b2bf8",
        "output": {},
        "error": {
            "code": 0,
            "raw_message": "",
            "message": "",
            "detail": null
        },
        "status": ""
    }
}
// status "processing" means it will be done soon, "pending" means its in queue
{
    "code": 200,
    "data": {
        "task_id": "45438b78-e168-446b-b783-1b5f0d7b2bf8",
        "status": "processing",
        "output": {},
        "error": {}
    }
}
// if success

{
    "code": 200,
    "data": {
        "task_id": "45438b78-e168-446b-b783-1b5f0d7b2bf8",
        "status": "completed",
        "output": {
            "video_url": "https://storage.theapi.app/videos/290279422502200.mp4"
        },
        "error": {}
    }
}

Last updated