Hailuo 02 API
curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-Hailuo-02",
"prompt": "A beautiful sunset over the ocean [Static shot]"
}
'import requests
url = "https://api.evolink.ai/v1/videos/generations"
payload = {
"model": "MiniMax-Hailuo-02",
"prompt": "A beautiful sunset over the ocean [Static shot]"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'MiniMax-Hailuo-02',
prompt: 'A beautiful sunset over the ocean [Static shot]'
})
};
fetch('https://api.evolink.ai/v1/videos/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evolink.ai/v1/videos/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'MiniMax-Hailuo-02',
'prompt' => 'A beautiful sunset over the ocean [Static shot]'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evolink.ai/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"MiniMax-Hailuo-02\",\n \"prompt\": \"A beautiful sunset over the ocean [Static shot]\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evolink.ai/v1/videos/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"MiniMax-Hailuo-02\",\n \"prompt\": \"A beautiful sunset over the ocean [Static shot]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evolink.ai/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"MiniMax-Hailuo-02\",\n \"prompt\": \"A beautiful sunset over the ocean [Static shot]\"\n}"
response = http.request(request)
puts response.read_body{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "MiniMax-Hailuo-02",
"object": "video.generation.task",
"progress": 0,
"status": "pending"
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: MiniMax-Hailuo-02",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}Hailuo
Hailuo-02 動画生成
- Hailuo 02(MiniMax-Hailuo-02)はT2V(テキストから動画)、I2V(画像から動画)、FLF(最初と最後のフレーム)モードをサポート
- 自動モード検出: 画像0枚=T2V、画像1枚=I2V、画像2枚=FLF
- フル機能モデル、512P解像度をサポート(I2Vモードのみ)
[Pan left]、[Push in]、[Static shot]など15種類のカメラモーションコマンドをサポート- 非同期処理、返されたタスクIDを使用してステータスを照会
- 生成された動画リンクは24時間有効です。速やかに保存してください
POST
/
v1
/
videos
/
generations
Hailuo 02 API
curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-Hailuo-02",
"prompt": "A beautiful sunset over the ocean [Static shot]"
}
'import requests
url = "https://api.evolink.ai/v1/videos/generations"
payload = {
"model": "MiniMax-Hailuo-02",
"prompt": "A beautiful sunset over the ocean [Static shot]"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'MiniMax-Hailuo-02',
prompt: 'A beautiful sunset over the ocean [Static shot]'
})
};
fetch('https://api.evolink.ai/v1/videos/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evolink.ai/v1/videos/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'MiniMax-Hailuo-02',
'prompt' => 'A beautiful sunset over the ocean [Static shot]'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evolink.ai/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"MiniMax-Hailuo-02\",\n \"prompt\": \"A beautiful sunset over the ocean [Static shot]\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evolink.ai/v1/videos/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"MiniMax-Hailuo-02\",\n \"prompt\": \"A beautiful sunset over the ocean [Static shot]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evolink.ai/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"MiniMax-Hailuo-02\",\n \"prompt\": \"A beautiful sunset over the ocean [Static shot]\"\n}"
response = http.request(request)
puts response.read_body{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "MiniMax-Hailuo-02",
"object": "video.generation.task",
"progress": 0,
"status": "pending"
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: MiniMax-Hailuo-02",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}承認
##すべてのAPIにBearer Token認証が必要です##
APIキーの取得:
APIキー管理ページにアクセスしてAPIキーを取得してください
リクエストヘッダーに追加:
Authorization: Bearer YOUR_API_KEY
ボディ
application/json
動画生成モデル名
例:
"MiniMax-Hailuo-02"
動画の内容とカメラモーションを説明するプロンプト。T2Vでは必須、I2V/FLFではオプション。最大2000文字
15種類のカメラコマンド:
- トラック:
[Truck left],[Truck right] - パン:
[Pan left],[Pan right] - ドリー:
[Push in],[Pull out] - ペデスタル:
[Pedestal up],[Pedestal down] - ティルト:
[Tilt up],[Tilt down] - ズーム:
[Zoom in],[Zoom out] - 特殊:
[Shake] - フォロー:
[Tracking shot] - 静止:
[Static shot]
使用方法:
- 組み合わせ: 1つの
[]内に複数のコマンドを同時実行、例:[Pan left,Pedestal up]、最大3つ推奨 - 順次: コマンドはテキスト順に実行、例:
...ゆっくり[Push in]、その後素早く[Pull out]
Maximum string length:
2000例:
"A young girl gradually grows into an adult woman"
I2VおよびFLFモード用の参照画像URL
モード検出:
- 画像0枚 = T2V(テキストから動画)
- 画像1枚 = I2V(画像から動画)
- 画像2枚 = FLF(最初と最後のフレーム遷移)
要件:
- 画像サイズ: 最大20MB
- 形式: JPG, JPEG, PNG, WebP
- アスペクト比: 2:5から5:2
- 短辺 > 300px
FLF注意: 動画の解像度は最初のフレームに従い、最後のフレームはそれに合わせてクロップされます
Maximum array length:
2例:
[ "https://example.com/first.jpg", "https://example.com/last.jpg" ]
動画解像度
モード別サポート:
- I2V: 512p, 768p, 1080p
- T2V: 768p, 1080p
- FLF: 768p, 1080p
長さと解像度:
- 512p: 6秒, 10秒
- 768p: 6秒, 10秒
- 1080p: 6秒のみ
注意: 512pはI2Vモードでのみ利用可能
利用可能なオプション:
512p, 768p, 1080p 例:
"768p"
動画の長さ(秒)
- 6秒(デフォルト)
- 10秒(1080pでは利用不可)
利用可能なオプション:
6, 10 例:
6
モデル固有のパラメータ
Show child attributes
Show child attributes
タスク完了時のHTTPSコールバックURL
コールバックタイミング:
- タスクが完了、失敗、またはキャンセルされた時にトリガー
- 課金確認後に送信
セキュリティ制限:
- HTTPSプロトコルのみ
- 内部IPアドレスは禁止(127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x など)
- URLの長さは
2048文字以下
コールバックメカニズム:
- タイムアウト:
10秒 - 失敗後最大
3回リトライ(失敗後1/2/4秒) - コールバックレスポンス形式はタスク照会APIと一致
- 2xxステータスコードは成功とみなされ、その他のコードはリトライをトリガー
例:
"https://your-domain.com/webhooks/video-task-completed"
レスポンス
動画生成タスクが正常に作成されました
タスク作成タイムスタンプ
例:
1757169743
タスク ID
例:
"task-unified-1757169743-7cvnl5zw"
使用されたモデル名
例:
"MiniMax-Hailuo-02"
タスクタイプ
利用可能なオプション:
video.generation.task タスク進捗(0-100)
必須範囲:
0 <= x <= 100例:
0
タスクステータス
利用可能なオプション:
pending, processing, completed, failed 例:
"pending"