happyhorse-1.1-i2v
讓圖片動起來的模型:輸入圖片決定第一個影格,文字描述則引導後續動作。可產生短片,並搭配聲音。
- Ailoot · 影片
POST /v1/videos/generationshappyhorse-1.1-i2v - Ailoot · 影片
POST /v1/videos/generationshappyhorse-i2v - Ailoot · 影片
POST /v1/videos/generationshappyhorse-i2v-latest
關於模型
此說明介紹模型的能力。Ailoot 可用的輸入、輸出與選項,依所選方法列於下方。
HappyHorse-1.1-I2V 是 Alibaba 的模型,會以現成圖片作為影片場景的起點。圖片成為第一個影格,文字則可指定後續動作,例如角色移動、場景變化及攝影機方向。適合讓插畫、物件照片或事先準備的視覺概念動起來。
文字描述非必填。未提供時,模型會依據起始圖片的內容推斷可能的動作。明確提供描述時,原圖決定構圖及物件外觀,文字則引導場景隨時間發展。
從第一個影格到動作
Alibaba 著重角色外觀的維持、視覺一致性、動作流暢度,以及影像與聲音的結合。宣稱的發展方向也包括文字與紋理的穩定性。這些特性描述的是模型的設計目標,不代表每個生成影格都能逐一保留原圖的每個像素。
此模式使用一張起始圖片。它設定的是初始場景,而非用於建立新構圖的一組獨立參考圖片。此特定版本未宣稱支援另行指定結尾影格。
接受 JPEG、JPG、PNG 及 WEBP。輸入圖片的每一邊都須至少為 300 像素;允許的長寬比為 1:2.5 至 2.5:1,檔案大小上限為 20 MB。完成影片的長寬比依循第一個影格。
影片參數
片長以整數選擇,範圍為 3 至 15 秒。可用解析度為 480P、720P 及 1080P;輸出格式為 MP4,影格率為每秒 24 個影格。支援將聲音與影像一併生成。
文字描述可使用任何語言,最多包含 5000 個非中文字元或 2500 個中文字元。超出上限的部分會被捨棄,因此重要動作及運動特徵應在描述限制內表達。同一個起始隨機種子可能產生相似短片,但不保證每個影格完全相同。
Ailoot · 影片 POST /v1/videos/generations happyhorse-1.1-i2v
happyhorse-1.1-i2vhappyhorse-1.1-i2vhappyhorse-i2vhappyhorse-i2v-latest
入門
讓圖片動起來的模型:輸入圖片決定第一個影格,文字描述則引導後續動作。可產生短片,並搭配聲音。
- 接受的輸入
- 文字 · 圖片
- 結果
- 影片
Ailoot 可用 · 輸入與方法
Ailoot · 影片 POST /v1/videos/generations
- 輸入
text,image- 輸出
video- 輸出格式
- mp4
| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
|---|---|---|---|---|
欄位model | 類型string | 要求必填 | 值與限制 happyhorse-1.1-i2v | 預設值— |
欄位prompt | 類型string | 要求選填 | 值與限制 長度下限: 1 | 預設值— |
欄位duration | 類型integer | 要求選填 | 值與限制 最小值: 3 最大值: 15 單位: 秒 | 預設值5 |
欄位resolution | 類型string | 要求選填 | 值與限制 480P, 720P, 1080P | 預設值720P |
欄位ratio | 類型string | 要求不支援 | 值與限制 | 預設值— |
欄位image_urls | 類型https_url|data_image_url[] | 要求必填 | 值與限制 項目數下限: 1 項目數上限: 1 解碼後位元組數上限: 20,971,520 MIME 類型: image/jpeg, image/png, image/webp | 預設值— |
輸入素材組合
first_frame_to_video · 必填: image_urls
方法參數與生命週期
| 參數 | 規格 |
|---|---|
參數content_type | 規格application/json |
參數required | 規格model, image_urls |
參數material_types | 規格text, image |
參數optional | 規格duration, resolution, ratio, prompt |
參數duration_integer_range | 規格3, 15 |
參數default_duration | 規格5 |
參數resolution | 規格480P, 720P, 1080P |
參數default_resolution | 規格720P |
參數ratio | 規格 |
參數ratio_must_omit | 規格true |
參數image_urls | 規格{"min_count":1,"max_count":1,"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 方法費率
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_URL:?Set the HTTPS URL of your actual first-frame image}"
export AILOOT_IMAGE_URL
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-1.1-i2v", "prompt": "The subject walks slowly toward the camera.", "duration": 5, "resolution": "720P"}')
from urllib.parse import urlsplit
u=os.environ["AILOOT_IMAGE_URL"]
z=urlsplit(u)
if z.scheme!="https" or not z.netloc or z.username or z.password:raise SystemExit("Set the actual HTTPS image URL")
p["image_urls"]=[u]
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}/contentGET /v1/videos/generations/{request_id}/content
查看工作狀態
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
儲存所有已完成的素材
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
其他內容讀取方式
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-i2v, happyhorse-i2v, happyhorse-i2v-latest
方法路徑別名
請使用上方列出的 API 方法路徑。
相關呼叫用 ID
Ailoot · 影片 POST /v1/videos/generations happyhorse-i2v
happyhorse-i2vhappyhorse-1.1-i2vhappyhorse-i2vhappyhorse-i2v-latest
入門
讓圖片動起來的模型:輸入圖片決定第一個影格,文字描述則引導後續動作。可產生短片,並搭配聲音。
- 接受的輸入
- 文字 · 圖片
- 結果
- 影片
Ailoot 可用 · 輸入與方法
Ailoot · 影片 POST /v1/videos/generations
- 輸入
text,image- 輸出
video- 輸出格式
- mp4
| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
|---|---|---|---|---|
欄位model | 類型string | 要求必填 | 值與限制 happyhorse-i2v | 預設值— |
欄位prompt | 類型string | 要求選填 | 值與限制 長度下限: 1 | 預設值— |
欄位duration | 類型integer | 要求選填 | 值與限制 最小值: 3 最大值: 15 單位: 秒 | 預設值5 |
欄位resolution | 類型string | 要求選填 | 值與限制 480P, 720P, 1080P | 預設值720P |
欄位ratio | 類型string | 要求不支援 | 值與限制 | 預設值— |
欄位image_urls | 類型https_url|data_image_url[] | 要求必填 | 值與限制 項目數下限: 1 項目數上限: 1 解碼後位元組數上限: 20,971,520 MIME 類型: image/jpeg, image/png, image/webp | 預設值— |
輸入素材組合
first_frame_to_video · 必填: 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 方法費率
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_URL:?Set the HTTPS URL of your actual first-frame image}"
export AILOOT_IMAGE_URL
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-i2v", "prompt": "The subject walks slowly toward the camera.", "duration": 5, "resolution": "720P"}')
from urllib.parse import urlsplit
u=os.environ["AILOOT_IMAGE_URL"]
z=urlsplit(u)
if z.scheme!="https" or not z.netloc or z.username or z.password:raise SystemExit("Set the actual HTTPS image URL")
p["image_urls"]=[u]
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}/contentGET /v1/videos/generations/{request_id}/content
查看工作狀態
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
儲存所有已完成的素材
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
其他內容讀取方式
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-i2v, happyhorse-i2v, happyhorse-i2v-latest
方法路徑別名
請使用上方列出的 API 方法路徑。
相關呼叫用 ID
Ailoot · 影片 POST /v1/videos/generations happyhorse-i2v-latest
happyhorse-i2v-latesthappyhorse-1.1-i2vhappyhorse-i2vhappyhorse-i2v-latest
入門
讓圖片動起來的模型:輸入圖片決定第一個影格,文字描述則引導後續動作。可產生短片,並搭配聲音。
- 接受的輸入
- 文字 · 圖片
- 結果
- 影片
Ailoot 可用 · 輸入與方法
Ailoot · 影片 POST /v1/videos/generations
- 輸入
text,image- 輸出
video- 輸出格式
- mp4
| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
|---|---|---|---|---|
欄位model | 類型string | 要求必填 | 值與限制 happyhorse-i2v-latest | 預設值— |
欄位prompt | 類型string | 要求選填 | 值與限制 長度下限: 1 | 預設值— |
欄位duration | 類型integer | 要求選填 | 值與限制 最小值: 3 最大值: 15 單位: 秒 | 預設值5 |
欄位resolution | 類型string | 要求選填 | 值與限制 480P, 720P, 1080P | 預設值720P |
欄位ratio | 類型string | 要求不支援 | 值與限制 | 預設值— |
欄位image_urls | 類型https_url|data_image_url[] | 要求必填 | 值與限制 項目數下限: 1 項目數上限: 1 解碼後位元組數上限: 20,971,520 MIME 類型: image/jpeg, image/png, image/webp | 預設值— |
輸入素材組合
first_frame_to_video · 必填: 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 方法費率
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_URL:?Set the HTTPS URL of your actual first-frame image}"
export AILOOT_IMAGE_URL
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-i2v-latest", "prompt": "The subject walks slowly toward the camera.", "duration": 5, "resolution": "720P"}')
from urllib.parse import urlsplit
u=os.environ["AILOOT_IMAGE_URL"]
z=urlsplit(u)
if z.scheme!="https" or not z.netloc or z.username or z.password:raise SystemExit("Set the actual HTTPS image URL")
p["image_urls"]=[u]
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}/contentGET /v1/videos/generations/{request_id}/content
查看工作狀態
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
儲存所有已完成的素材
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
其他內容讀取方式
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-i2v, happyhorse-i2v, happyhorse-i2v-latest
方法路徑別名
請使用上方列出的 API 方法路徑。
相關呼叫用 ID
FAQ · happyhorse-1.1-i2v
- 可以使用哪些輸入與結果?
POST /v1/videos/generations·happyhorse-1.1-i2v:text,image→videoPOST /v1/videos/generations·happyhorse-i2v:text,image→videoPOST /v1/videos/generations·happyhorse-i2v-latest:text,image→video- 請求使用哪些欄位?
POST /v1/videos/generations·happyhorse-1.1-i2v:model,prompt,duration,resolution,image_urlsPOST /v1/videos/generations·happyhorse-i2v:model,prompt,duration,resolution,image_urlsPOST /v1/videos/generations·happyhorse-i2v-latest:model,prompt,duration,resolution,image_urls- 適用哪些限制?
POST /v1/videos/generations·happyhorse-1.1-i2v:duration.minimum:3;duration.maximum:15POST /v1/videos/generations·happyhorse-i2v:duration.minimum:3;duration.maximum:15POST /v1/videos/generations·happyhorse-i2v-latest:duration.minimum:3;duration.maximum:15