Skip to main content

Hailuo video

Poll by task_id for progress and the final download URL.

Basics

  • Endpoint: GET /v1/video/generations/{task_id}
  • Auth: Bearer Token (Authorization: Bearer {{YOUR_API_KEY}})
  • Content-Type: application/json

Path

FieldTypeRequiredDescription
task_idstringYesReturned when the job was created.

Response

200 OK
FieldTypeDescription
codestringBusiness code ("200" = ok).
messagestringMessage.
dataobjectPayload.
├─ statusstringprocessing, success, failed, etc.
├─ progressstringPercent string, e.g. "50".
├─ result_urlstringVideo URL when done.
├─ fail_reasonstringIf failed.
├─ submit_timeintegerSubmitted at.
├─ finish_timeintegerFinished at.
└─ video_widthintegerOutput width.
└─ video_heightintegerOutput height.

cURL

curl -X GET "https://api.your-server.com/v1/video/generations/task_pNzpa5Aw21zihhdYrACj6Jy0ZVW76BEe" \
 -H "Authorization: Bearer $YOUR_API_KEY"

Success example

{
  "code": "200",
  "message": "success",
  "data": {
    "task_id": "task_pNzpa5Aw21zihhdYrACj6Jy0ZVW76BEe",
    "status": "success",
    "progress": "100",
    "result_url": "https://cdn.example.com/generated_video.mp4",
    "video_width": 1280,
    "video_height": 720,
    "submit_time": 1774595255,
    "finish_time": 1774595315
  }
}
Possible status values:
  • Preparing
  • Queueing
  • Processing
  • Success
  • Fail
Allowed values: Preparing, Queueing, Processing, Success, Fail