Source: https://ailoot.ai/models/zh-hant-tw/happyhorse-1-1-r2v/
Canonical: https://ailoot.ai/models/zh-hant-tw/happyhorse-1-1-r2v/
Language: zh-hant-tw

# happyhorse-1.1-r2v

[Markdown](https://ailoot.ai/models/zh-hant-tw/happyhorse-1-1-r2v/index.md) · [JSON](https://ailoot.ai/models/zh-hant-tw/happyhorse-1-1-r2v/facts.json)

## [happyhorse-1.1-r2v](https://ailoot.ai/models/zh-hant-tw/happyhorse-1-1-r2v/)

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

- [**Ailoot · 影片** `POST /v1/videos/generations` `happyhorse-1.1-r2v`](https://ailoot.ai/models/zh-hant-tw/happyhorse-1-1-r2v/#method-0)
- [**Ailoot · 影片** `POST /v1/videos/generations` `happyhorse-r2v`](https://ailoot.ai/models/zh-hant-tw/happyhorse-1-1-r2v/#method-1)
- [**Ailoot · 影片** `POST /v1/videos/generations` `happyhorse-r2v-latest`](https://ailoot.ai/models/zh-hant-tw/happyhorse-1-1-r2v/#method-2)

關於模型

此說明介紹模型的能力。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`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-1.1-r2v&fmt=videos)

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 方法費率

輸出

US$0.18 *1080p 每秒*

輸出

US$0.07 *480p 每秒*

輸出

US$0.14 *720p 每秒*

Ailoot 會在請求前預留估算金額。取得結果後，依實測用量結算最終費用。串流結算採用最終用量紀錄。[預留金額與結算的運作方式 →](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)

### 請求範例

#### Ailoot · 影片

參考圖片

```bash
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 · 取得狀態

```bash
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 · 取得所有已完成的素材

```bash
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 · 取得內容

```bash
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`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-1.1-r2v&fmt=videos), [`happyhorse-r2v`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v&fmt=videos), [`happyhorse-r2v-latest`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v-latest&fmt=videos)

#### 方法路徑別名

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

#### 相關呼叫用 ID

[`happyhorse-1.1-r2v`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-1.1-r2v&fmt=videos), [`happyhorse-r2v`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v&fmt=videos), [`happyhorse-r2v-latest`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v-latest&fmt=videos)

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

[`happyhorse-r2v`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v&fmt=videos)

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 方法費率

輸出

US$0.18 *1080p 每秒*

輸出

US$0.07 *480p 每秒*

輸出

US$0.14 *720p 每秒*

Ailoot 會在請求前預留估算金額。取得結果後，依實測用量結算最終費用。串流結算採用最終用量紀錄。[預留金額與結算的運作方式 →](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)

### 請求範例

#### Ailoot · 影片

參考圖片

```bash
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 · 取得狀態

```bash
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 · 取得所有已完成的素材

```bash
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 · 取得內容

```bash
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`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-1.1-r2v&fmt=videos), [`happyhorse-r2v`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v&fmt=videos), [`happyhorse-r2v-latest`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v-latest&fmt=videos)

#### 方法路徑別名

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

#### 相關呼叫用 ID

[`happyhorse-1.1-r2v`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-1.1-r2v&fmt=videos), [`happyhorse-r2v`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v&fmt=videos), [`happyhorse-r2v-latest`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v-latest&fmt=videos)

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

[`happyhorse-r2v-latest`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v-latest&fmt=videos)

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 方法費率

輸出

US$0.18 *1080p 每秒*

輸出

US$0.07 *480p 每秒*

輸出

US$0.14 *720p 每秒*

Ailoot 會在請求前預留估算金額。取得結果後，依實測用量結算最終費用。串流結算採用最終用量紀錄。[預留金額與結算的運作方式 →](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)

### 請求範例

#### Ailoot · 影片

參考圖片

```bash
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 · 取得狀態

```bash
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 · 取得所有已完成的素材

```bash
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 · 取得內容

```bash
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`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-1.1-r2v&fmt=videos), [`happyhorse-r2v`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v&fmt=videos), [`happyhorse-r2v-latest`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v-latest&fmt=videos)

#### 方法路徑別名

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

#### 相關呼叫用 ID

[`happyhorse-1.1-r2v`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-1.1-r2v&fmt=videos), [`happyhorse-r2v`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v&fmt=videos), [`happyhorse-r2v-latest`](https://ailoot.ai/models/zh-hant-tw/#m=happyhorse-1.1-r2v&route=Core&caller=happyhorse-r2v-latest&fmt=videos)

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 與金額。

[選擇訂閱](https://ailoot.ai/docs/zh-hant-tw/billing/subscriptions/) · [查看模型價格](https://ailoot.ai/models/zh-hant-tw/)

## 將 API 加入 你銷售的產品。

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

商用應用程式

在付費功能加入文字、圖片、影片與聲音生成。

經銷授權

提供專案說明與存取方式，要求書面使用和轉售條件。

網站文件

串接前可閱讀正式服務條款、授權合約與資料處理政策。

[申請經銷授權](mailto:support@ailoot.ai) · [正式服務條款與授權合約](https://ailoot.ai/legal/offer?lang=zh-hant-tw)

## Ailoot · 公司及其專案組合





Ailoot以累積的營運經驗、廣大的客戶群、穩定的服務及持續的KPI管理為基礎。





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





Ailoot將這些營運經驗用於API存取，讓客戶的產品、代理、應用程式及自動化流程使用AI功能。
