A single continuous cinematic side-tracking shot beneath a wide concrete urban overpass in soft afternoon light. One adult skateboarder in a rust-orange jacket and dark trousers rides smoothly up a very low concrete bank, briefly clears the lip with the skateboard beneath both feet, lands on all four wheels with bent knees, and rolls forward. Keep the whole body and board visible. Foreground bridge columns pass slowly across the edge of the frame with strong parallax. Realistic human anatomy, balanced landing and grounded wheel contact. No cuts, no lettering, no logos, no advertising.
Hailuo 02 Standard Text to Video API
minimax/hailuo-02/standard/text-to-videoHailuo 02 Standard Text to Video 将文本提示词转化为 512P 与 768P 动态视频,支持 6 秒或 10 秒单次生成、写实物理规律模拟与可选智能提示词优化。它能够遵循文字指令呈现连贯自然的人物肢体与运镜走势,同时稳定保持宏观布景与微观光影质感。
示例
REST API 规格
快速开始
提交端点请求并查询任务状态。请将示例素材 URL 替换为可访问的真实文件。
第一步:配置 API 鉴权
在控制台申请 API Key,并在每个 HTTP 请求头中携带 Authorization: Bearer <API_KEY> 进行身份验证。
- 任务提交端点
- POST
https://api.vidgo.ai/api/generate/submit - 鉴权请求头
- Authorization: Bearer VIDGO_API_KEY
第 2 步:提交生成任务
POST /api/generate/submit。model 和可选 callback_url 位于根级,生成参数位于 input 内。
REQUEST_BODY=$(cat <<'JSON'
{
"model": "minimax/hailuo-02/standard/text-to-video",
"input": {
"prompt": "One continuous wide natural-history shot in a dramatic limestone stone forest at dawn. A single great hornbill with a clearly defined curved yellow casque and black-and-cream wings stands on a near rock pinnacle. It crouches, pushes off, opens both wings and flies through a broad gap between two distant pillars. The camera pans gently to follow the bird as it becomes smaller in the landscape. Consistent anatomy and wingbeat rhythm, convincing depth and brief natural rock occlusion. No other birds, no cuts, no text, no logos.",
"prompt_optimizer": false,
"duration": 6
}
}
JSON
)
RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
CODE=$(printf '%s' "$RESPONSE" | jq -r '.code // empty')
if [ "$CODE" != "0" ] && [ "$CODE" != "200" ]; then
printf 'API error: %s
' "$RESPONSE" >&2
exit 1
fi
printf '%s
' "$RESPONSE"第三步:轮询任务执行结果
使用 task_id 查询进度;not_started 或 running 时继续轮询,finished 或 failed 时停止。成功后读取 data.files[].file_url,失败时读取 data.error_message。
状态查询端点
GET https://api.vidgo.ai/api/generate/status/{task_id}使用 task_id 查询进度;not_started 或 running 时继续轮询,finished 或 failed 时停止。成功后读取 data.files[].file_url,失败时读取 data.error_message。
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "510G37CWFG1XX0QG",
"status": "running",
"created_time": "2026-09-22T13:03:05"
}
}{
"code": 200,
"data": {
"task_id": "task-unified-...",
"status": "finished",
"files": [
{
"file_url": "https://storage.vidgo.ai/generated/video.mp4",
"file_type": "video"
}
],
"created_time": "2026-08-22T10:00:00Z",
"progress": 100,
"error_message": null
}
}端到端完整脚本示例
展开查看在生产环境中具备轮询重试、异常保护和超时处理的完整自动化脚本。
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "minimax/hailuo-02/standard/text-to-video",
"input": {
"prompt": "One continuous wide natural-history shot in a dramatic limestone stone forest at dawn. A single great hornbill with a clearly defined curved yellow casque and black-and-cream wings stands on a near rock pinnacle. It crouches, pushes off, opens both wings and flies through a broad gap between two distant pillars. The camera pans gently to follow the bird as it becomes smaller in the landscape. Consistent anatomy and wingbeat rhythm, convincing depth and brief natural rock occlusion. No other birds, no cuts, no text, no logos.",
"prompt_optimizer": false,
"duration": 6
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
BUSINESS_CODE=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Submit failed:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
START_TIME=$(date +%s)
POLL_DELAY=2
while true; do
if [ $(( $(date +%s) - START_TIME )) -ge 600 ]; then
printf 'Timed out after 600 seconds
' >&2
exit 1
fi
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
BUSINESS_CODE=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Status request failed:
%s
' "$STATUS_RESPONSE" >&2
exit 1
fi
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep "$POLL_DELAY"
if [ "$POLL_DELAY" -lt 10 ]; then POLL_DELAY=$((POLL_DELAY + 1)); fi
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
done请求参数(input 对象)
向 /api/generate/submit 提交 POST 请求时,input 内部所支持的生成参数配置:
| 字段 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
| prompt | string | 是 | — | 必填字符串,去除首尾空白后不能为空。最多 1500 个 Unicode 字符。 |
| resolution | string | 否 | 768P | 512P 或 768P,默认 768P。 |
| duration | integer | 否 | 6 | 6 或 10 秒,默认 6 秒。 |
| prompt_optimizer | boolean | 否 | — | 可选布尔值;省略时由上游处理,体验区默认关闭。 |
响应字段(查询结果)
通过 GET /api/generate/status/{task_id} 轮询获取的任务详情:
| 字段 | 类型 | 描述 |
|---|---|---|
| code | integer | 业务响应状态码,200 表示成功。 |
| data.task_id | string | 异步任务全局唯一流水号。 |
| data.status | string | 任务执行阶段:not_started(排队中)、running(生成中)、finished(已完成)、failed(失败)。 |
| data.files | array | 生成成功时包含的成片文件列表,每项含 file_url 与 file_type。 |
| data.error_message | string | null | 任务执行异常时的具体错误描述。 |
任务生命周期
客户端应根据 status 字段判断任务进度,达到 finished 或 failed 终态时立即终止轮询:
not_started任务已接收,等待执行。
running正在生成。
finished生成完成,从 data.files 获取视频 URL。
failed生成失败,请查看 data.error_message,已扣积分按现有流程返还。
轮询与异常处理
- 轮询频次推荐建议初始轮询间隔设为 2–3 秒,随着任务持续可递增至 5 秒一次,避免过密请求。
- 网络波动与重试若查询网络出现 5xx 或连接超时,不代表任务失败,可稍作休眠后继续重试查询。
- 异步 Webhook 回调支持在提交请求体根层级传递 callback_url,在任务终态时系统将通过 POST 自动推送完整任务结果。
接口规格
| 规格项 | 取值 | 说明 |
|---|---|---|
| Model ID | minimax/hailuo-02/standard/text-to-video | 请求根级 model 字段。 |
| 分辨率 | 512P / 768P | 512P 或 768P,默认 768P。 |
| 时长 | 6 / 10s | 默认 6 秒。 |
Hailuo 02 Standard Text to Video
Hailuo 02 Standard Text to Video 由 MiniMax 研发,专为高质量文生视频创作设计。用户只需输入描述主体、场景与动作走势的自然语言文本,即可生成 6 秒或 10 秒的高清视频片段。模型在复杂物理规律、人物表情与镜头运镜上具备出色的理解力,支持 512P 经济规格与 768P 默认高清规格,兼顾高保真视觉效果与灵活的按秒计费成本。
为什么选择此模式?
纯文本驱动生动场景通过自然语言直接构筑主体形象与动态氛围,无需预设任何参考素材。
写实物理世界运动模拟精准还原重力、流体惯性与柔性碰撞,呈现符合直觉的动态交互。
灵活的时长与分辨率档位提供 6 秒快速镜头与 10 秒长叙事片段,并支持 512P 快速验证与 768P 高清输出。
可选智能提示词优化开启后自动扩充视觉层次与镜头细节,帮助简短文本呈现更丰富的画面深度。
透明的按秒阶梯计费仅根据选择的分辨率与输出秒数计费,任务失败自动退还对应积分。
参数说明
| 参数 | 要求 | 说明 |
|---|---|---|
| prompt | 必填 | 必填字符串,去除首尾空白后不能为空。最多 1500 个 Unicode 字符。 |
| resolution | 可选 | 512P 或 768P,默认 768P。 默认值 768P |
| duration | 可选 | 6 或 10 秒,默认 6 秒。 默认值 6 |
| prompt_optimizer | 可选 | 可选布尔值;省略时由上游处理,体验区默认关闭。 |
使用方法
构思主体与场景在提示词开头明确角色外貌、核心物体与环境空间,建立稳定的画面基底。
安排动作节奏与运镜按时序描写动作过程(如转身、跑动、凝视),并明确推近、平移或环绕等摄影机运动。
选取时长与分辨率根据内容需求选择 6 秒或 10 秒时长,以及 512P 快速方案或 768P 高清规格。
按需开启提示词优化若提示词较简短,可开启 prompt_optimizer 自动增补光影层次与氛围细节。
提交任务并查收成片点击运行或调用 API 提交异步任务,通过 task_id 查询并在任务完成后获取视频下载链接。
计费说明
1 credit = $0.005。按分辨率和输出秒数计费。
| 计费项 | 费率 | 说明 |
|---|---|---|
| 512P / 6s | 18 credits ($0.090) | 3 credits/秒 |
| 512P / 10s | 30 credits ($0.150) | 3 credits/秒 |
| 768P / 6s | 42 credits ($0.210) | 7 credits/秒 |
| 768P / 10s | 70 credits ($0.350) | 7 credits/秒 |
适用场景
商业广告创意动态预演将分镜文字脚本直接转化为动态样片,在实际拍摄前直观验证节奏与镜头设计。
社交媒体与短视频内容针对社媒平台快速生成引人入胜的写实动态短视频与吸睛视觉素材。
影视与短剧概念视觉化把剧本对白、场景描述转化为 6–10 秒戏剧性连续镜头,辅助导演构思表演细节。
游戏与科幻世界观展现将天马行空的自然异象、未来载具或奇幻生物文字设定快速具象化为生动画面。
创作技巧
- 动作与运镜独立描述:将主体的身体运动与摄影机轨迹分成不同分句说明,有助于画面动态更清晰。
- 充分利用 1500 字符容量:支持最多 1500 个 Unicode 字符,可详尽刻画天气光线、材质反光与远近景纵深。
- 提示词优化器的使用时机:初次编写简略草稿时建议开启优化器;若已有非常严密的专业分镜脚本,建议关闭以严格遵循原意。
- 先低成本验证后输出成片:构思阶段先用 512P 6 秒(18 积分)验证动态轨迹,满意后再切换至 768P 10 秒输出高画质成片。
- 避免含糊修饰语:使用具体的物理运动动词(如“缓缓升起”、“溅起水花”)代替抽象的“非常震撼”。
注意事项
- 纯文本输入格式:本端点专用于文字生成视频,仅接收 prompt 字符串,去除首尾空白后上限为 1500 字符。
- 分辨率与时长选项:分辨率仅限 512P 或 768P,时长仅限 6 或 10 秒整数,超出范围的输入将在校验阶段被拒绝。
- 异步任务与凭证保管:提交生成后会立即返回唯一 task_id,请通过状态接口轮询或配置 callback_url 接收结果,扣费仅在任务成功时生效,失败自动退款。
相关模型
Hailuo 02 Standard Text to Video API 常见问题
Hailuo 02 Standard Text to Video API 是什么?
Hailuo 02 Standard Text to Video 是 MiniMax 研发的文本生成视频模型。它根据纯文本提示词直接生成 512P 或 768P 分辨率的连续动态视频,支持 6 秒与 10 秒输出时长、写实物理规律模拟与可选智能提示词优化。基于 MiniMax 先进的视频生成架构,它在严格遵循文本时序动作与镜头运镜的同时,稳定保持环境空间连贯性与光影细节。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Hailuo 02 Standard Text to Video 支持生成 10 秒长视频吗?
支持。模型提供 6 秒与 10 秒两种整秒时长选项(默认时长为 6 秒)。选择 10 秒时长能够在单次任务中展现更完整的情节推进、多阶段主体动作以及平滑的镜头景别转换。
Hailuo 02 Standard Text to Video 的提示词优化器有什么作用?
提示词优化器(prompt_optimizer)能够对输入的简短文本进行智能润色与视觉扩充,自动补全光影层次、质感纹理与摄影机运动细节。该功能为可选布尔值,在体验区默认关闭,开启后不会产生额外扣费。
Hailuo 02 Standard Text to Video 支持多长的文本提示词?
提示词在校验前会去除首尾多余空白,有效字符长度支持 1 到 1500 个 Unicode 字符。你可以充分利用该长度详尽描述人物外观、多时段动作变化以及景深光线要求。
Hailuo 02 Standard Text to Video 如何计费?
该端点根据输出分辨率与生成秒数按秒计费(1 积分 = $0.005)。512P 规格为每秒 3 积分(6 秒共 18 积分,10 秒共 30 积分);768P 规格为每秒 7 积分(6 秒共 42 积分,10 秒共 70 积分)。
Hailuo 02 Standard Text to Video 支持通过文字控制摄影机运镜吗?
支持。你可以在提示词中使用独立的专业运镜短语(例如“平视推进”、“侧向微移跟拍”或“俯角大景别缓拉”),模型会准确理解镜头运动指令,并与主体的动作演进保持同步。
什么时候该选择 Standard 而不是 Pro 模式?
Standard 模式适合注重成本控制、需要明确 6 秒或 10 秒时长控制、或在大批量生成中以经济费率(如 512P 每秒 3 积分)快速构思创意的场景;若需要更高动态张力的极致影视级视效,可选择单次固定的 Pro 模式。















