happyhorse-1.1-t2v
โมเดลสร้างวิดีโอสั้นพร้อมเสียงจากคำอธิบายข้อความ เหมาะสำหรับฉากที่กำหนดการเคลื่อนไหว องค์ประกอบภาพ และสไตล์ภาพด้วยถ้อยคำ
- Ailoot · วิดีโอ
POST /v1/videos/generationshappyhorse-1.1-t2v - Ailoot · วิดีโอ
POST /v1/videos/generationshappyhorse-t2v - Ailoot · วิดีโอ
POST /v1/videos/generationshappyhorse-t2v-latest
เกี่ยวกับโมเดล
คำอธิบายนี้ครอบคลุมความสามารถของโมเดล อินพุต เอาต์พุต และตัวเลือกที่ใช้ได้ใน Ailoot แสดงด้านล่างตามเมธอดที่เลือก
HappyHorse-1.1-T2V เป็นโมเดลของ Alibaba สำหรับสร้างฉากวิดีโอสั้นจากข้อความ คำอธิบายกำหนดตัวละคร การกระทำ สภาพแวดล้อม และแนวทางภาพ โหมดนี้ไม่ต้องใช้ภาพต้นฉบับ โมเดลสร้างภาพวิดีโอและสามารถสร้างเสียงประกอบได้
ผู้ผลิตเน้นความเข้าใจความหมายของฉาก การจัดฉากแบบภาพยนตร์ และการเคลื่อนไหวที่สื่ออารมณ์ ข้อความสามารถกำหนดบรรยากาศ การกระทำของตัวละคร พฤติกรรมของวัตถุ และพลวัตทางกายภาพได้ จึงสามารถวางฉากจากสิ่งที่ต้องการให้เกิดขึ้น แล้วชี้นำด้วยแสง มุมมอง และการเคลื่อนกล้อง
จัดฉากด้วยถ้อยคำ
ต้องมีคำสั่ง โดยใช้ภาษาใดก็ได้ มีความยาวได้ไม่เกิน 5000 อักขระที่ไม่ใช่ภาษาจีน หรือ 2500 อักขระภาษาจีน ส่วนที่เกินจะถูกตัดทิ้ง ต้องอธิบายการกระทำ สภาพแวดล้อม และรายละเอียดภาพที่สำคัญภายในขอบเขตนี้ การกำหนดฉากเช่นนี้เปิดพื้นที่ให้โมเดลสร้างฉากใหม่ แทนที่จะกำหนดเฟรมแรกที่เตรียมไว้ให้
ในโหมดนี้ ข้อความเป็นข้อมูลหลักสำหรับควบคุมการสร้าง สามารถอธิบายลักษณะเฉพาะของตัวละครหรือวัตถุด้วยถ้อยคำได้ ส่วนการส่งภาพแยกเพื่อกำหนดรูปลักษณ์เป็นความสามารถของอีกโหมดหนึ่งในตระกูลเดียวกัน ผลลัพธ์ขึ้นอยู่กับคำสั่งทั้งหมด ดังนั้นการใช้ค่า seed เริ่มต้นเดียวกันจึงช่วยให้ได้ตัวเลือกที่คล้ายกัน แต่ไม่รับประกันการสร้างซ้ำอย่างตรงกันทุกประการ
วิดีโอและเสียงประกอบ
สำหรับ HappyHorse-1.1 เลือกระยะเวลาวิดีโอเป็นจำนวนเต็มตั้งแต่ 3 ถึง 15 วินาที รองรับระดับความละเอียด 480P, 720P และ 1080P ไฟล์ที่ได้เป็น MP4 ที่ 24 เฟรมต่อวินาที โมเดลสามารถสร้างเสียงพร้อมภาพ โดยเชื่อมเสียงประกอบกับสิ่งที่เกิดขึ้นในฉาก
กำหนดอัตราส่วนภาพล่วงหน้าได้ มีตัวเลือก 16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21 และ 21:9 ตั้งแต่ภาพกว้างแบบภาพยนตร์ไปจนถึงวิดีโอแนวตั้งทรงยาว ความละเอียด รูปแบบ และระยะเวลากำหนดขนาดของผลลัพธ์ ส่วนเนื้อหาและการเคลื่อนไหวกำหนดด้วยข้อความ
ตัวเลือกนี้ใช้สร้างฉากใหม่จากแนวคิดที่บรรยายด้วยถ้อยคำ เหมาะสำหรับตอนสั้น แนวคิดภาพ หรือวิดีโอสร้างบรรยากาศที่ต้องการอธิบายการจัดฉากเป็นข้อความ
Ailoot · วิดีโอ POST /v1/videos/generations happyhorse-1.1-t2v
happyhorse-1.1-t2vhappyhorse-1.1-t2vhappyhorse-t2vhappyhorse-t2v-latest
เริ่มต้น
โมเดลสร้างวิดีโอสั้นพร้อมเสียงจากคำอธิบายข้อความ เหมาะสำหรับฉากที่กำหนดการเคลื่อนไหว องค์ประกอบภาพ และสไตล์ภาพด้วยถ้อยคำ
- อินพุตที่รองรับ
- ข้อความ
- ผลลัพธ์
- วิดีโอ
ใช้งานได้ใน Ailoot · อินพุตและเมธอด
Ailoot · วิดีโอ POST /v1/videos/generations
- ขาเข้า
text- ขาออก
video- รูปแบบเอาต์พุต
- mp4
| ฟิลด์ | ประเภท | ข้อกำหนด | ค่าและข้อจำกัด | ค่าเริ่มต้น |
|---|---|---|---|---|
ฟิลด์model | ประเภทstring | ข้อกำหนดจำเป็น | ค่าและข้อจำกัด happyhorse-1.1-t2v | ค่าเริ่มต้น— |
ฟิลด์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[] | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด จำนวนรายการขั้นต่ำ: 0 จำนวนรายการสูงสุด: 0 จำนวนไบต์สูงสุดหลังถอดรหัส: 20,971,520 ประเภท MIME: image/jpeg, image/png, image/webp | ค่าเริ่มต้น— |
ชุดผสมของสื่ออินพุต
สร้างวิดีโอจากข้อความ · จำเป็น: prompt
พารามิเตอร์และวงจรการทำงานของเมธอด
| พารามิเตอร์ | ข้อกำหนด |
|---|---|
พารามิเตอร์content_type | ข้อกำหนดapplication/json |
พารามิเตอร์required | ข้อกำหนดmodel, prompt |
พารามิเตอร์material_types | ข้อกำหนดtext |
พารามิเตอร์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 | ข้อกำหนด{"max_count":0} |
วงจรการทำงาน: 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_PROMPT_FILE:?Set your actual UTF-8 scene brief}"
export AILOOT_PROMPT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-1.1-t2v", "prompt": "", "duration": 5, "resolution": "720P", "ratio": "16:9"}')
f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 brief")
p['prompt']=f.read_text(encoding="utf-8")
if not p['prompt'].strip():raise SystemExit("Brief must contain text")
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
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
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 ระบุเฉพาะรายการแรก เรียกพาธเนื้อหา/แอสเซ็ตจริงทุกรายการ GET เนื้อหาโดยไม่มี index ไม่ได้ให้ผลลัพธ์ทั้งหมด
เมื่อต้องตรวจสอบการตอบกลับต้นฉบับ
อ่านงานเดิมที่มีอยู่ ห้ามส่งซ้ำเมื่อไม่ทราบผลการส่ง
ฟิลด์การตอบกลับ
| ฟิลด์ | ประเภท |
|---|---|
ฟิลด์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-t2v, happyhorse-t2v, happyhorse-t2v-latest
ชื่อพาธเมธอดอื่น
ใช้พาธเมธอดที่แสดงด้านบน
ID ที่เกี่ยวข้องสำหรับเรียกใช้โมเดล
Ailoot · วิดีโอ POST /v1/videos/generations happyhorse-t2v
happyhorse-t2vhappyhorse-1.1-t2vhappyhorse-t2vhappyhorse-t2v-latest
เริ่มต้น
โมเดลสร้างวิดีโอสั้นพร้อมเสียงจากคำอธิบายข้อความ เหมาะสำหรับฉากที่กำหนดการเคลื่อนไหว องค์ประกอบภาพ และสไตล์ภาพด้วยถ้อยคำ
- อินพุตที่รองรับ
- ข้อความ
- ผลลัพธ์
- วิดีโอ
ใช้งานได้ใน Ailoot · อินพุตและเมธอด
Ailoot · วิดีโอ POST /v1/videos/generations
- ขาเข้า
text- ขาออก
video- รูปแบบเอาต์พุต
- mp4
| ฟิลด์ | ประเภท | ข้อกำหนด | ค่าและข้อจำกัด | ค่าเริ่มต้น |
|---|---|---|---|---|
ฟิลด์model | ประเภทstring | ข้อกำหนดจำเป็น | ค่าและข้อจำกัด happyhorse-t2v | ค่าเริ่มต้น— |
ฟิลด์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[] | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด จำนวนรายการขั้นต่ำ: 0 จำนวนรายการสูงสุด: 0 จำนวนไบต์สูงสุดหลังถอดรหัส: 20,971,520 ประเภท MIME: image/jpeg, image/png, image/webp | ค่าเริ่มต้น— |
ชุดผสมของสื่ออินพุต
สร้างวิดีโอจากข้อความ · จำเป็น: prompt
พารามิเตอร์และวงจรการทำงานของเมธอด
| พารามิเตอร์ | ข้อกำหนด |
|---|---|
พารามิเตอร์material_types | ข้อกำหนดtext |
พารามิเตอร์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_PROMPT_FILE:?Set your actual UTF-8 scene brief}"
export AILOOT_PROMPT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-t2v", "prompt": "", "duration": 5, "resolution": "720P", "ratio": "16:9"}')
f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 brief")
p['prompt']=f.read_text(encoding="utf-8")
if not p['prompt'].strip():raise SystemExit("Brief must contain text")
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
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
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 ระบุเฉพาะรายการแรก เรียกพาธเนื้อหา/แอสเซ็ตจริงทุกรายการ GET เนื้อหาโดยไม่มี index ไม่ได้ให้ผลลัพธ์ทั้งหมด
เมื่อต้องตรวจสอบการตอบกลับต้นฉบับ
อ่านงานเดิมที่มีอยู่ ห้ามส่งซ้ำเมื่อไม่ทราบผลการส่ง
ฟิลด์การตอบกลับ
| ฟิลด์ | ประเภท |
|---|---|
ฟิลด์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-t2v, happyhorse-t2v, happyhorse-t2v-latest
ชื่อพาธเมธอดอื่น
ใช้พาธเมธอดที่แสดงด้านบน
ID ที่เกี่ยวข้องสำหรับเรียกใช้โมเดล
Ailoot · วิดีโอ POST /v1/videos/generations happyhorse-t2v-latest
happyhorse-t2v-latesthappyhorse-1.1-t2vhappyhorse-t2vhappyhorse-t2v-latest
เริ่มต้น
โมเดลสร้างวิดีโอสั้นพร้อมเสียงจากคำอธิบายข้อความ เหมาะสำหรับฉากที่กำหนดการเคลื่อนไหว องค์ประกอบภาพ และสไตล์ภาพด้วยถ้อยคำ
- อินพุตที่รองรับ
- ข้อความ
- ผลลัพธ์
- วิดีโอ
ใช้งานได้ใน Ailoot · อินพุตและเมธอด
Ailoot · วิดีโอ POST /v1/videos/generations
- ขาเข้า
text- ขาออก
video- รูปแบบเอาต์พุต
- mp4
| ฟิลด์ | ประเภท | ข้อกำหนด | ค่าและข้อจำกัด | ค่าเริ่มต้น |
|---|---|---|---|---|
ฟิลด์model | ประเภทstring | ข้อกำหนดจำเป็น | ค่าและข้อจำกัด happyhorse-t2v-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[] | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด จำนวนรายการขั้นต่ำ: 0 จำนวนรายการสูงสุด: 0 จำนวนไบต์สูงสุดหลังถอดรหัส: 20,971,520 ประเภท MIME: image/jpeg, image/png, image/webp | ค่าเริ่มต้น— |
ชุดผสมของสื่ออินพุต
สร้างวิดีโอจากข้อความ · จำเป็น: prompt
พารามิเตอร์และวงจรการทำงานของเมธอด
| พารามิเตอร์ | ข้อกำหนด |
|---|---|
พารามิเตอร์material_types | ข้อกำหนดtext |
พารามิเตอร์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_PROMPT_FILE:?Set your actual UTF-8 scene brief}"
export AILOOT_PROMPT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-t2v-latest", "prompt": "", "duration": 5, "resolution": "720P", "ratio": "16:9"}')
f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 brief")
p['prompt']=f.read_text(encoding="utf-8")
if not p['prompt'].strip():raise SystemExit("Brief must contain text")
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
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
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 ระบุเฉพาะรายการแรก เรียกพาธเนื้อหา/แอสเซ็ตจริงทุกรายการ GET เนื้อหาโดยไม่มี index ไม่ได้ให้ผลลัพธ์ทั้งหมด
เมื่อต้องตรวจสอบการตอบกลับต้นฉบับ
อ่านงานเดิมที่มีอยู่ ห้ามส่งซ้ำเมื่อไม่ทราบผลการส่ง
ฟิลด์การตอบกลับ
| ฟิลด์ | ประเภท |
|---|---|
ฟิลด์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-t2v, happyhorse-t2v, happyhorse-t2v-latest
ชื่อพาธเมธอดอื่น
ใช้พาธเมธอดที่แสดงด้านบน
ID ที่เกี่ยวข้องสำหรับเรียกใช้โมเดล
FAQ · happyhorse-1.1-t2v
- มีอินพุตและผลลัพธ์ใดบ้าง?
POST /v1/videos/generations·happyhorse-1.1-t2v:text→videoPOST /v1/videos/generations·happyhorse-t2v:text→videoPOST /v1/videos/generations·happyhorse-t2v-latest:text→video- คำขอใช้ฟิลด์ใดบ้าง?
POST /v1/videos/generations·happyhorse-1.1-t2v:model,prompt,duration,resolution,ratio,image_urlsPOST /v1/videos/generations·happyhorse-t2v:model,prompt,duration,resolution,ratio,image_urlsPOST /v1/videos/generations·happyhorse-t2v-latest:model,prompt,duration,resolution,ratio,image_urls- มีข้อจำกัดใดบ้าง?
POST /v1/videos/generations·happyhorse-1.1-t2v:duration.minimum:3;duration.maximum:15POST /v1/videos/generations·happyhorse-t2v:duration.minimum:3;duration.maximum:15POST /v1/videos/generations·happyhorse-t2v-latest:duration.minimum:3;duration.maximum:15