跳轉到主要內容

簡介

Hailuo 是 Ace Data Cloud 提供的AI 視頻服務,MiniMax 海螺視頻生成模型。透過 Ace Data Cloud 統一 API,你可以使用 cURL 快速調用 Hailuo,實現文生視頻、圖生視頻、導演模式等功能。

前置條件

  • 擁有 Ace Data Cloud 帳號並獲取 API Token
  • 安裝了 cURL 的終端環境

基礎用法

調用 Hailuo API 的主端點為:
POST https://api.acedata.cloud/hailuo/videos
本示例使用 minimax-t2v 模型。 可用模型包括:minimax-i2vminimax-t2vminimax-i2v-director 完整 cURL 命令示例:
curl -X POST https://api.acedata.cloud/hailuo/videos \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"action": "generate", "model": "minimax-t2v", "prompt": "A golden sunset over the ocean waves"}'
請將 YOUR_API_TOKEN 替換為你在 Ace Data Cloud 平台獲取的實際 Token。

回應示例

成功調用後返回 JSON 格式資料,例如:
{
  "status": "success",
  "data": {
    ...
  }
}

使用 jq 處理回應

推薦使用 jq 工具格式化輸出:
curl -s -X POST https://api.acedata.cloud/hailuo/videos \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"action": "generate", "model": "minimax-t2v", "prompt": "A golden sunset over the ocean waves"}' | jq .

錯誤處理

常見錯誤碼:
狀態碼說明
401認證失敗,請檢查 API Token
403餘額不足或無權訪問
429請求頻率超限
500伺服器內部錯誤

下一步