灵活的参数配置
可配置文档中列出的 1 个参数,包括 duration_seconds。
curl -X POST https://runapi.ai/api/v1/hailuo/text_to_video \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hailuo-02-text-to-video-standard",
"prompt": "生成一段 6 秒的玻璃弹珠在木桌上滚动并从边缘掉落的视频片段。"
}'
import { HailuoClient } from "@runapi.ai/hailuo";
const client = new HailuoClient();
const result = await client.textToVideo.run({
model: "hailuo-02-text-to-video-standard",
prompt: "生成一段 6 秒的玻璃弹珠在木桌上滚动并从边缘掉落的视频片段。",
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/hailuo/text_to_video",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"hailuo-02-text-to-video-standard","prompt":"生成一段 6 秒的玻璃弹珠在木桌上滚动并从边缘掉落的视频片段。"}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/hailuo/text_to_video");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'hailuo-02-text-to-video-standard',
'prompt' => '生成一段 6 秒的玻璃弹珠在木桌上滚动并从边缘掉落的视频片段。',
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.textToVideo().run({"model":"hailuo-02-text-to-video-standard","prompt":"生成一段 6 秒的玻璃弹珠在木桌上滚动并从边缘掉落的视频片段。"});
task.waitForResult();
require "runapi/hailuo"
client = RunApi::Hailuo::Client.new
result = client.text_to_video.run(
model: "hailuo-02-text-to-video-standard",
prompt: "生成一段 6 秒的玻璃弹珠在木桌上滚动并从边缘掉落的视频片段。"
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.textToVideo.Run({"model":"hailuo-02-text-to-video-standard","prompt":"生成一段 6 秒的玻璃弹珠在木桌上滚动并从边缘掉落的视频片段。"})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model hailuo-02-text-to-video-standard \
--endpoint text_to_video \
--wait
6 个版本可用
选择任意模型,几秒内开始生成。
| 提供商 | MiniMax |
| 模型 ID | hailuo-02-text-to-video-standard |
| 模态 | 视频 |
| 任务类型 | Asynchronous |
| API 端点 | /api/v1/hailuo/text_to_video |
| 计费单位 | 次调用 |
| 输入参数 | duration_seconds |
| 最大时长 | 6s, 10s |
| 目录状态 | 运行中 |
免费注册后,在控制台创建用于 hailuo-02-text-to-video-standard 的 API 密钥。
向 /api/v1/hailuo/text_to_video 发送 POST 请求,并传入 hailuo-02-text-to-video-standard 模型 ID 和参数。
轮询任务或按照回调获取已完成的 hailuo-02-text-to-video-standard 结果。
可配置文档中列出的 1 个参数,包括 duration_seconds。
提供 1 个公开 endpoint:text_to_video。
按 次调用 计量,无需订阅。
duration_seconds暂无描述。 (6, 10)
从文字简报生成产品发布短视频和广告片段,将制作周期从数周缩短到数小时。
将课程脚本批量转换为动画讲解视频,无需摄像设备和拍摄团队。
直接从提示词生成社交平台短视频内容。
传入 quickstart 中显示的模型 ID。
Key 级限流随使用层级伸缩。当前限制见定价页。
可以——变体只是参数,改 model 字段即可。
模型支持流式时,RunAPI 端到端流式。
在公共 GitHub 仓库提 issue 或邮件联系 support。