彈性參數
可設定 3 個已記錄的參數,包括 enable_safety_checker, first_frame_image_url, last_frame_image_url。
curl -X POST https://runapi.ai/api/v1/hailuo/image_to_video \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hailuo-02-image-to-video-pro",
"image_url": "https://cdn.runapi.ai/public/samples/image.jpg",
"prompt": "生成一段 6 秒的片段:一顆玻璃彈珠滾過木桌,從桌緣掉落。"
}'
import { HailuoClient } from "@runapi.ai/hailuo";
const client = new HailuoClient();
const result = await client.imageToVideo.run({
model: "hailuo-02-image-to-video-pro",
image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
prompt: "生成一段 6 秒的片段:一顆玻璃彈珠滾過木桌,從桌緣掉落。",
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/hailuo/image_to_video",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"hailuo-02-image-to-video-pro","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"生成一段 6 秒的片段:一顆玻璃彈珠滾過木桌,從桌緣掉落。"}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/hailuo/image_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-image-to-video-pro',
'image_url' => 'https://cdn.runapi.ai/public/samples/image.jpg',
'prompt' => '生成一段 6 秒的片段:一顆玻璃彈珠滾過木桌,從桌緣掉落。',
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.imageToVideo().run({"model":"hailuo-02-image-to-video-pro","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"生成一段 6 秒的片段:一顆玻璃彈珠滾過木桌,從桌緣掉落。"});
task.waitForResult();
require "runapi/hailuo"
client = RunApi::Hailuo::Client.new
result = client.image_to_video.run(
model: "hailuo-02-image-to-video-pro",
image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
prompt: "生成一段 6 秒的片段:一顆玻璃彈珠滾過木桌,從桌緣掉落。"
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.imageToVideo.Run({"model":"hailuo-02-image-to-video-pro","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"生成一段 6 秒的片段:一顆玻璃彈珠滾過木桌,從桌緣掉落。"})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model hailuo-02-image-to-video-pro \
--endpoint image_to_video \
--wait
6 個版本可用
選擇任一模型,幾秒內即可開始生成。
| 提供者 | MiniMax |
| 模型 ID | hailuo-02-image-to-video-pro |
| 模態 | 影片 |
| 任務類型 | Asynchronous |
| API 端點 | /api/v1/hailuo/image_to_video |
| 計費單位 | 次呼叫 |
| 輸入參數 | enable_safety_checker, first_frame_image_url, last_frame_image_url |
| 目錄狀態 | 可直接上線 |
免費註冊後,從控制台建立 hailuo-02-image-to-video-pro 的 API 金鑰。
向 /api/v1/hailuo/image_to_video 傳送 POST 請求,並傳入 hailuo-02-image-to-video-pro 模型 ID 與參數。
輪詢工作或依照回呼取得已完成的 hailuo-02-image-to-video-pro 結果。
可設定 3 個已記錄的參數,包括 enable_safety_checker, first_frame_image_url, last_frame_image_url。
公開 1 個公共 endpoint:image_to_video。
依 次呼叫 計量,無需訂閱。
last_frame_image_url暫無描述。
enable_safety_checkerEnable the safety checker.
first_frame_image_url暫無描述。
根據文字簡報生成產品上市短片與短影音廣告,將製作時間從數週縮短到數小時。
無需攝影機或團隊,即可大規模將課程腳本轉為動畫解說影片。
直接從 prompt 產生適合社群平台的爆紅短影音內容。
傳入 quickstart 顯示的 model ID。
每個金鑰的速率限制會依使用方案而調整。請查看定價頁面以了解目前限制。
可以——variant 只是旗標。只要變更 model 參數即可切換。
只要支援串流,RunAPI 就會端到端串流。
請在公開 GitHub repo 提交 issue,或寄信給支援。