简体中文
cURL
curl --request POST \ --url https://api.ppinfra.com/v3/async/minimax-hailuo-02 \ --header 'Authorization: <authorization>' \ --header 'Content-Type: <content-type>' \ --data '{ "prompt": "<string>", "image_url": "<string>", "duration": 123, "resolution": "<string>", "enable_prompt_expansion": true }'
{ "task_id": "<string>" }
application/json
1 <= x <= 2000
6
10
768P
1080P
true
请求:
curl \ -X POST https://api.ppinfra.com/v3/async/minimax-hailuo-02 \ -H "Authorization: Bearer $your_api_key" \ -H "Content-Type: application/json" \ -d '{ "image_url": "https://static.ppinfra.com/docs/assets/minimax-hailuo-video-02-input-image.jpg", "prompt": "戴着太阳镜的毛茸茸的熊猫在日出时的雪山顶上跳舞,左移运镜", "duration": 6, "resolution": "768P", "enable_prompt_expansion": true }'
响应:
{ "task_id": "{返回的 Task ID}" }
task_id
videos
curl --location --request GET 'https://api.ppinfra.com/v3/async/task-result?task_id={返回的 Task ID}' \ --header 'Authorization: Bearer {{API Key}}'
{ "task": { "task_id": "{返回的 Task ID}", "task_type": "MINIMAX_HAILUO_02", "status": "TASK_STATUS_SUCCEED", "reason": "", "eta": 0, "progress_percent": 100 }, "images": [], "videos": [ { "video_url": "{生成视频的 URL}", "video_url_ttl": "3600", "video_type": "mp4" } ] }
视频文件: