模型

happyhorse-1.1-r2v

Markdown · JSON

happyhorse-1.1-r2v

依據參考圖片與文字腳本生成影片的模型。協助在新場景中維持角色外觀、物件及視覺風格。

關於模型

此說明介紹模型的能力。Ailoot 可用的輸入、輸出與選項,依所選方法列於下方。

HappyHorse-1.1-R2V 依據參考圖片與文字任務描述建立新的影片場景。Alibaba 將模型的設計重點放在生成動作時,保留可辨識的角色、物件及視覺風格。參考圖決定場景內容與外觀,文字則描述這些元素應如何互動。

視覺參考素材的用途

可使用一至九張圖片。它們可以設定角色、物件、環境或藝術呈現方式。描述中可指明參考圖的編號及其中的特定物件,把視覺素材連結到所需動作的對應部分。需要把多張圖片的元素整合在同一構圖中時,這點尤其有用。

與使用起始影格的模式不同,此處的參考圖是新場景內容的依據。文字任務描述必填:它將物件外觀與動作、攝影機運動及整體場面安排連結起來。製造商著重視覺一致性與電影感的運動;結果仍是生成內容,而非將原始圖片剪輯在一起。

接受 JPEG、JPG、PNG 及 WEBP,每個檔案大小上限為 20 MB。圖片短邊不得小於 400 像素;建議使用 720P 或以上等級的素材。此模式的輸入明確由圖片與文字組成。

片長、畫面與聲音

結果儲存為 MP4,影格率為每秒 24 個影格。片長以整數設定,範圍為 3 至 15 秒。解析度可選 480P、720P 或 1080P;支援生成聲音。

可使用橫式、直式及正方形畫面:16:9、9:16、1:1、4:3、3:4、4:5、5:4、9:21 及 21:9。選擇畫面比例可預先決定新場景的構圖空間。

文字可使用任何語言。上限為 5000 個非中文字元或 2500 個中文字元,超出的部分會被捨棄。最重要的參考圖用途、動作及運動資訊應包含在此上限內。起始隨機種子可引導生成版本的相似程度,但不保證精確重現同一段影片。

Ailoot · 影片 POST /v1/videos/generations happyhorse-1.1-r2v

happyhorse-1.1-r2v

Alibaba /happyhorse-1.1-r2v
模型 ID
  • happyhorse-1.1-r2v
  • happyhorse-r2v
  • happyhorse-r2v-latest

入門

依據參考圖片與文字腳本生成影片的模型。協助在新場景中維持角色外觀、物件及視覺風格。

接受的輸入
文字 · 圖片
結果
影片

Ailoot 可用 · 輸入與方法

Ailoot · 影片 POST /v1/videos/generations
輸入
text, image
輸出
video
輸出格式
mp4
欄位類型要求值與限制預設值
欄位model類型string要求必填值與限制
happyhorse-1.1-r2v
預設值—
欄位prompt類型string要求必填值與限制
長度下限: 1
預設值—
欄位duration類型integer要求選填值與限制
最小值: 3
最大值: 15
單位: 秒
預設值5
欄位resolution類型string要求選填值與限制
480P, 720P, 1080P
預設值720P
欄位ratio類型string要求選填值與限制
16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21, 21:9
預設值16:9
欄位image_urls類型https_url|data_image_url[]要求必填值與限制
項目數下限: 1
項目數上限: 9
解碼後位元組數上限: 20,971,520
MIME 類型: image/jpeg, image/png, image/webp
預設值—
輸入素材組合

reference_images_to_video · 必填: prompt, image_urls

方法參數與生命週期
參數規格
參數content_type規格application/json
參數required規格model, prompt, image_urls
參數material_types規格text, image
參數optional規格duration, resolution, ratio
參數duration_integer_range規格3, 15
參數default_duration規格5
參數resolution規格480P, 720P, 1080P
參數default_resolution規格720P
參數ratio規格16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21, 21:9
參數ratio_must_omit規格false
參數image_urls規格{"min_count":1,"max_count":9,"schemes":["https","data 中的點陣圖 base64 資料"],"max_data_image_bytes":20971520}

生命週期: submit_once_poll_original

GET /v1/videos/{request_id}

GET /v1/videos/generations/{request_id}

GET /v1/videos/{request_id}/content

GET /v1/videos/generations/{request_id}/content

方法結構與 ID 均為精確值;供應商能力與准入狀態分開。

方案

Ailoot 方法費率

Ailoot 影片POST /v1/videos/generations
輸出
US$0.18 1080p 每秒
輸出
US$0.07 480p 每秒
輸出
US$0.14 720p 每秒

Ailoot 會在請求前預留估算金額。取得結果後,依實測用量結算最終費用。串流結算採用最終用量紀錄。預留金額與結算的運作方式 →

請求範例

Ailoot · 影片

參考圖片
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_URLS_FILE:?Set a JSON file containing your actual reference-image URLs}"
export AILOOT_IMAGE_URLS_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-1.1-r2v", "prompt": "The subject walks slowly toward the camera.", "duration": 5, "resolution": "720P"}')
from urllib.parse import urlsplit
f=Path(os.environ["AILOOT_IMAGE_URLS_FILE"])
if not f.is_file():raise SystemExit("Choose the actual reference URL JSON file")
urls=json.loads(f.read_text())
if not isinstance(urls,list) or not 1<=len(urls)<=9:raise SystemExit("Provide one to nine reference-image URLs")
for u in urls:
    z=urlsplit(u) if isinstance(u,str) else None
    if not z or z.scheme!="https" or not z.netloc or z.username or z.password:raise SystemExit("Each reference must be an actual HTTPS image URL")
p["image_urls"]=urls
p["ratio"]="16:9"
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos/generations \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
print(json.dumps(r))
PY_RESULT

接收並儲存結果

Ailoot · 影片

mp4

  • GET /v1/videos/{request_id}
  • GET /v1/videos/generations/{request_id}
  • GET /v1/videos/{request_id}/content
  • GET /v1/videos/generations/{request_id}/content
查看工作狀態
GET · 取得狀態
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id" \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o status.json
python3 - <<'PY_STATUS'
import json
from pathlib import Path
r=json.loads(Path("status.json").read_text())
print(json.dumps(r))
if r.get("status")=="completed":
    for x in r.get("data",[]):print(x)
PY_STATUS
儲存所有已完成的素材
GET · 取得所有已完成的素材
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_STATUS_FILE:?Set the actual completed status JSON file}"
export AILOOT_STATUS_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
from urllib.parse import urlsplit,urljoin
f=Path(os.environ["AILOOT_STATUS_FILE"])
if not f.is_file():raise SystemExit("Choose the actual completed status file")
r=json.loads(f.read_text())
if r.get("status")!="completed" or not isinstance(r.get("data"),list) or not r["data"]:raise SystemExit("Wait for a completed status with asset paths")
urls=[]
for x in r["data"]:
    if not isinstance(x,str) or "\n" in x or "\r" in x:raise SystemExit("Invalid asset path")
    u=urljoin("https://api.ailoot.ai",x)
    z=urlsplit(u)
    if z.scheme!="https" or z.netloc!="api.ailoot.ai" or z.username or z.password:raise SystemExit("Use the actual Ailoot asset paths from status")
    urls.append(u)
Path("asset-urls.txt").write_text("\n".join(urls)+"\n")
PY_REQUEST
index=0
while IFS= read -r asset_url; do
  curl --fail-with-body --silent --show-error "$asset_url" \
    -H "Authorization: Bearer $AILOOT_API_KEY" -o "video-${index}.mp4"
  index=$((index + 1))
done < asset-urls.txt
其他內容讀取方式
GET · 取得內容
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id/content" \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o video.mp4
保留所有已完成的結果

請儲存每部已完成的影片或傳回的檔案,並從實際傳回的每個素材 URL 取得素材。

請保留每個回傳的資料項目/輸出索引。content_url 僅代表第一個輸出;請取得每個實際內容路徑/資產。不帶 index 的 GET 內容請求並不代表所有輸出。

需要檢查原始回應時

請讀取現有的原始作業;切勿重新提交傳送結果不明的請求。

回應欄位
欄位類型
欄位id類型string
欄位object類型string
欄位model類型string
欄位status類型string
欄位content_url類型signed URL
欄位data[]類型signed URL
欄位usage類型object
欄位result_pending_check類型boolean
錯誤與後續步驟
回應條件下一步
回應400 · invalid_request_error條件必要欄位、素材表示方式或參數值無效下一步提出新的建立請求前,先修正指定欄位。
回應409 · video_not_ready條件原始結果內容尚無法取得下一步請輪詢原始回傳的 ID,並遵守 Retry-After。
回應server_error條件回傳的回應表示該作業或結果需要檢查下一步保留原始回傳的作業/任務 ID、請求標頭與回應;繼續以支援的方式讀取該原始作業。請勿重新提交建立請求。

別名

模型別名

Ailoot happyhorse-1.1-r2v, happyhorse-r2v, happyhorse-r2v-latest

方法路徑別名

請使用上方列出的 API 方法路徑。

相關呼叫用 ID

happyhorse-1.1-r2v, happyhorse-r2v, happyhorse-r2v-latest

Ailoot · 影片 POST /v1/videos/generations happyhorse-r2v

happyhorse-r2v

Alibaba /happyhorse-r2v
模型 ID
  • happyhorse-1.1-r2v
  • happyhorse-r2v
  • happyhorse-r2v-latest

入門

依據參考圖片與文字腳本生成影片的模型。協助在新場景中維持角色外觀、物件及視覺風格。

接受的輸入
文字 · 圖片
結果
影片

Ailoot 可用 · 輸入與方法

Ailoot · 影片 POST /v1/videos/generations
輸入
text, image
輸出
video
輸出格式
mp4
欄位類型要求值與限制預設值
欄位model類型string要求必填值與限制
happyhorse-r2v
預設值—
欄位prompt類型string要求必填值與限制
長度下限: 1
預設值—
欄位duration類型integer要求選填值與限制
最小值: 3
最大值: 15
單位: 秒
預設值5
欄位resolution類型string要求選填值與限制
480P, 720P, 1080P
預設值720P
欄位ratio類型string要求選填值與限制
16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21, 21:9
預設值16:9
欄位image_urls類型https_url|data_image_url[]要求必填值與限制
項目數下限: 1
項目數上限: 9
解碼後位元組數上限: 20,971,520
MIME 類型: image/jpeg, image/png, image/webp
預設值—
輸入素材組合

reference_images_to_video · 必填: prompt, image_urls

方法參數與生命週期
參數規格
參數material_types規格text, image
參數required規格null
參數optional_controls規格null

生命週期: submit_once_poll_original

GET /v1/videos/{request_id}

GET /v1/videos/generations/{request_id}

GET /v1/videos/{request_id}/content

GET /v1/videos/generations/{request_id}/content

方法結構與 ID 均為精確值;供應商能力與准入狀態分開。

方案

Ailoot 方法費率

Ailoot 影片POST /v1/videos/generations
輸出
US$0.18 1080p 每秒
輸出
US$0.07 480p 每秒
輸出
US$0.14 720p 每秒

Ailoot 會在請求前預留估算金額。取得結果後,依實測用量結算最終費用。串流結算採用最終用量紀錄。預留金額與結算的運作方式 →

請求範例

Ailoot · 影片

參考圖片
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_URLS_FILE:?Set a JSON file containing your actual reference-image URLs}"
export AILOOT_IMAGE_URLS_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-r2v", "prompt": "The subject walks slowly toward the camera.", "duration": 5, "resolution": "720P"}')
from urllib.parse import urlsplit
f=Path(os.environ["AILOOT_IMAGE_URLS_FILE"])
if not f.is_file():raise SystemExit("Choose the actual reference URL JSON file")
urls=json.loads(f.read_text())
if not isinstance(urls,list) or not 1<=len(urls)<=9:raise SystemExit("Provide one to nine reference-image URLs")
for u in urls:
    z=urlsplit(u) if isinstance(u,str) else None
    if not z or z.scheme!="https" or not z.netloc or z.username or z.password:raise SystemExit("Each reference must be an actual HTTPS image URL")
p["image_urls"]=urls
p["ratio"]="16:9"
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos/generations \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
print(json.dumps(r))
PY_RESULT

接收並儲存結果

Ailoot · 影片

mp4

  • GET /v1/videos/{request_id}
  • GET /v1/videos/generations/{request_id}
  • GET /v1/videos/{request_id}/content
  • GET /v1/videos/generations/{request_id}/content
查看工作狀態
GET · 取得狀態
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id" \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o status.json
python3 - <<'PY_STATUS'
import json
from pathlib import Path
r=json.loads(Path("status.json").read_text())
print(json.dumps(r))
if r.get("status")=="completed":
    for x in r.get("data",[]):print(x)
PY_STATUS
儲存所有已完成的素材
GET · 取得所有已完成的素材
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_STATUS_FILE:?Set the actual completed status JSON file}"
export AILOOT_STATUS_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
from urllib.parse import urlsplit,urljoin
f=Path(os.environ["AILOOT_STATUS_FILE"])
if not f.is_file():raise SystemExit("Choose the actual completed status file")
r=json.loads(f.read_text())
if r.get("status")!="completed" or not isinstance(r.get("data"),list) or not r["data"]:raise SystemExit("Wait for a completed status with asset paths")
urls=[]
for x in r["data"]:
    if not isinstance(x,str) or "\n" in x or "\r" in x:raise SystemExit("Invalid asset path")
    u=urljoin("https://api.ailoot.ai",x)
    z=urlsplit(u)
    if z.scheme!="https" or z.netloc!="api.ailoot.ai" or z.username or z.password:raise SystemExit("Use the actual Ailoot asset paths from status")
    urls.append(u)
Path("asset-urls.txt").write_text("\n".join(urls)+"\n")
PY_REQUEST
index=0
while IFS= read -r asset_url; do
  curl --fail-with-body --silent --show-error "$asset_url" \
    -H "Authorization: Bearer $AILOOT_API_KEY" -o "video-${index}.mp4"
  index=$((index + 1))
done < asset-urls.txt
其他內容讀取方式
GET · 取得內容
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id/content" \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o video.mp4
保留所有已完成的結果

請儲存每部已完成的影片或傳回的檔案,並從實際傳回的每個素材 URL 取得素材。

請保留每個回傳的資料項目/輸出索引。content_url 僅代表第一個輸出;請取得每個實際內容路徑/資產。不帶 index 的 GET 內容請求並不代表所有輸出。

需要檢查原始回應時

請讀取現有的原始作業;切勿重新提交傳送結果不明的請求。

回應欄位
欄位類型
欄位id類型string
欄位object類型string
欄位model類型string
欄位status類型string
欄位content_url類型signed URL
欄位data[]類型signed URL
欄位usage類型object
欄位result_pending_check類型boolean
錯誤與後續步驟
回應條件下一步
回應400 · invalid_request_error條件必要欄位、素材表示方式或參數值無效下一步提出新的建立請求前,先修正指定欄位。
回應409 · video_not_ready條件原始結果內容尚無法取得下一步請輪詢原始回傳的 ID,並遵守 Retry-After。
回應server_error條件回傳的回應表示該作業或結果需要檢查下一步保留原始回傳的作業/任務 ID、請求標頭與回應;繼續以支援的方式讀取該原始作業。請勿重新提交建立請求。

別名

模型別名

Ailoot happyhorse-1.1-r2v, happyhorse-r2v, happyhorse-r2v-latest

方法路徑別名

請使用上方列出的 API 方法路徑。

相關呼叫用 ID

happyhorse-1.1-r2v, happyhorse-r2v, happyhorse-r2v-latest

Ailoot · 影片 POST /v1/videos/generations happyhorse-r2v-latest

happyhorse-r2v-latest

Alibaba /happyhorse-r2v-latest
模型 ID
  • happyhorse-1.1-r2v
  • happyhorse-r2v
  • happyhorse-r2v-latest

入門

依據參考圖片與文字腳本生成影片的模型。協助在新場景中維持角色外觀、物件及視覺風格。

接受的輸入
文字 · 圖片
結果
影片

Ailoot 可用 · 輸入與方法

Ailoot · 影片 POST /v1/videos/generations
輸入
text, image
輸出
video
輸出格式
mp4
欄位類型要求值與限制預設值
欄位model類型string要求必填值與限制
happyhorse-r2v-latest
預設值—
欄位prompt類型string要求必填值與限制
長度下限: 1
預設值—
欄位duration類型integer要求選填值與限制
最小值: 3
最大值: 15
單位: 秒
預設值5
欄位resolution類型string要求選填值與限制
480P, 720P, 1080P
預設值720P
欄位ratio類型string要求選填值與限制
16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21, 21:9
預設值16:9
欄位image_urls類型https_url|data_image_url[]要求必填值與限制
項目數下限: 1
項目數上限: 9
解碼後位元組數上限: 20,971,520
MIME 類型: image/jpeg, image/png, image/webp
預設值—
輸入素材組合

reference_images_to_video · 必填: prompt, image_urls

方法參數與生命週期
參數規格
參數material_types規格text, image
參數required規格null
參數optional_controls規格null

生命週期: submit_once_poll_original

GET /v1/videos/{request_id}

GET /v1/videos/generations/{request_id}

GET /v1/videos/{request_id}/content

GET /v1/videos/generations/{request_id}/content

方法結構與 ID 均為精確值;供應商能力與准入狀態分開。

方案

Ailoot 方法費率

Ailoot 影片POST /v1/videos/generations
輸出
US$0.18 1080p 每秒
輸出
US$0.07 480p 每秒
輸出
US$0.14 720p 每秒

Ailoot 會在請求前預留估算金額。取得結果後,依實測用量結算最終費用。串流結算採用最終用量紀錄。預留金額與結算的運作方式 →

請求範例

Ailoot · 影片

參考圖片
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_URLS_FILE:?Set a JSON file containing your actual reference-image URLs}"
export AILOOT_IMAGE_URLS_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-r2v-latest", "prompt": "The subject walks slowly toward the camera.", "duration": 5, "resolution": "720P"}')
from urllib.parse import urlsplit
f=Path(os.environ["AILOOT_IMAGE_URLS_FILE"])
if not f.is_file():raise SystemExit("Choose the actual reference URL JSON file")
urls=json.loads(f.read_text())
if not isinstance(urls,list) or not 1<=len(urls)<=9:raise SystemExit("Provide one to nine reference-image URLs")
for u in urls:
    z=urlsplit(u) if isinstance(u,str) else None
    if not z or z.scheme!="https" or not z.netloc or z.username or z.password:raise SystemExit("Each reference must be an actual HTTPS image URL")
p["image_urls"]=urls
p["ratio"]="16:9"
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos/generations \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
print(json.dumps(r))
PY_RESULT

接收並儲存結果

Ailoot · 影片

mp4

  • GET /v1/videos/{request_id}
  • GET /v1/videos/generations/{request_id}
  • GET /v1/videos/{request_id}/content
  • GET /v1/videos/generations/{request_id}/content
查看工作狀態
GET · 取得狀態
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id" \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o status.json
python3 - <<'PY_STATUS'
import json
from pathlib import Path
r=json.loads(Path("status.json").read_text())
print(json.dumps(r))
if r.get("status")=="completed":
    for x in r.get("data",[]):print(x)
PY_STATUS
儲存所有已完成的素材
GET · 取得所有已完成的素材
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_STATUS_FILE:?Set the actual completed status JSON file}"
export AILOOT_STATUS_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
from urllib.parse import urlsplit,urljoin
f=Path(os.environ["AILOOT_STATUS_FILE"])
if not f.is_file():raise SystemExit("Choose the actual completed status file")
r=json.loads(f.read_text())
if r.get("status")!="completed" or not isinstance(r.get("data"),list) or not r["data"]:raise SystemExit("Wait for a completed status with asset paths")
urls=[]
for x in r["data"]:
    if not isinstance(x,str) or "\n" in x or "\r" in x:raise SystemExit("Invalid asset path")
    u=urljoin("https://api.ailoot.ai",x)
    z=urlsplit(u)
    if z.scheme!="https" or z.netloc!="api.ailoot.ai" or z.username or z.password:raise SystemExit("Use the actual Ailoot asset paths from status")
    urls.append(u)
Path("asset-urls.txt").write_text("\n".join(urls)+"\n")
PY_REQUEST
index=0
while IFS= read -r asset_url; do
  curl --fail-with-body --silent --show-error "$asset_url" \
    -H "Authorization: Bearer $AILOOT_API_KEY" -o "video-${index}.mp4"
  index=$((index + 1))
done < asset-urls.txt
其他內容讀取方式
GET · 取得內容
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id/content" \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o video.mp4
保留所有已完成的結果

請儲存每部已完成的影片或傳回的檔案,並從實際傳回的每個素材 URL 取得素材。

請保留每個回傳的資料項目/輸出索引。content_url 僅代表第一個輸出;請取得每個實際內容路徑/資產。不帶 index 的 GET 內容請求並不代表所有輸出。

需要檢查原始回應時

請讀取現有的原始作業;切勿重新提交傳送結果不明的請求。

回應欄位
欄位類型
欄位id類型string
欄位object類型string
欄位model類型string
欄位status類型string
欄位content_url類型signed URL
欄位data[]類型signed URL
欄位usage類型object
欄位result_pending_check類型boolean
錯誤與後續步驟
回應條件下一步
回應400 · invalid_request_error條件必要欄位、素材表示方式或參數值無效下一步提出新的建立請求前,先修正指定欄位。
回應409 · video_not_ready條件原始結果內容尚無法取得下一步請輪詢原始回傳的 ID,並遵守 Retry-After。
回應server_error條件回傳的回應表示該作業或結果需要檢查下一步保留原始回傳的作業/任務 ID、請求標頭與回應;繼續以支援的方式讀取該原始作業。請勿重新提交建立請求。

別名

模型別名

Ailoot happyhorse-1.1-r2v, happyhorse-r2v, happyhorse-r2v-latest

方法路徑別名

請使用上方列出的 API 方法路徑。

相關呼叫用 ID

happyhorse-1.1-r2v, happyhorse-r2v, happyhorse-r2v-latest

FAQ · happyhorse-1.1-r2v
可以使用哪些輸入與結果?

POST /v1/videos/generations · happyhorse-1.1-r2v: text, image → video

POST /v1/videos/generations · happyhorse-r2v: text, image → video

POST /v1/videos/generations · happyhorse-r2v-latest: text, image → video

請求使用哪些欄位?

POST /v1/videos/generations · happyhorse-1.1-r2v: model, prompt, duration, resolution, ratio, image_urls

POST /v1/videos/generations · happyhorse-r2v: model, prompt, duration, resolution, ratio, image_urls

POST /v1/videos/generations · happyhorse-r2v-latest: model, prompt, duration, resolution, ratio, image_urls

適用哪些限制?

POST /v1/videos/generations · happyhorse-1.1-r2v: duration.minimum: 3; duration.maximum: 15

POST /v1/videos/generations · happyhorse-r2v: duration.minimum: 3; duration.maximum: 15

POST /v1/videos/generations · happyhorse-r2v-latest: duration.minimum: 3; duration.maximum: 15

更多詳情

將 Ailoot 串接 Claude Code、OpenCode、Hermes 或自己的應用程式。

公司及其專案組合

公司及其專案組合:數百萬客戶,每月銷售額達數十億。

優惠購買 token。

訂閱優惠適合持續工作,折扣碼購買 token 最高可折 50%。

訂閱
為定期請求選擇優惠方案。
最高 50% 折扣碼
購買時輸入代碼,價格依活動重算。
歷史中的費用
每次請求保存模型、token 與金額。

選擇訂閱 · 查看模型價格

將 API 加入 你銷售的產品。

依 Ailoot 正式服務條款與授權合約串接 SaaS、應用程式與機器人;轉售請申請經銷授權。

商用應用程式
在付費功能加入文字、圖片、影片與聲音生成。
經銷授權
提供專案說明與存取方式,要求書面使用和轉售條件。
網站文件
串接前可閱讀正式服務條款、授權合約與資料處理政策。

申請經銷授權 · 正式服務條款與授權合約