Bỏ qua để đến nội dung
Mở CastalyBảng điều khiển

Video

happyhorse-1.1-t2v API

Sử dụng ID mẫu happyhorse-1.1-t2v chính xác thông qua định tuyến video không đồng bộ Modelflare.

Sử dụng ID mẫu chính xác happyhorse-1.1-t2v. Trường mô hình phải khớp chính xác với trang này.

Đầu ra mẫuhappyhorse-1.1-t2vPOST /v1/videos5.2s

Thông số: duration=5resolution=1080pratio=16:9

Câu lệnh: One continuous take, no cuts. An arcade after closing, cabinets still on, carpet glowing under blacklight. A figure in a holographic windbreaker slaps the side of one cabinet and its picture comes off the screen: the pixels lift as solid coloured tiles, swarm out across the aisle and pull the pictures off every other machine with them, until the whole room is a moving cloud of cyan and hot pink squares. The camera tracks sideways down the aisle and turns into the swarm as it builds. One hard cyan key from the nearest screen, deep violet ambient. Real weight and inertia, each tile catching light separately, no text.

Yêu cầu tạo ra mẫu này
{
"model": "happyhorse-1.1-t2v",
"prompt": "One continuous take, no cuts. An arcade after closing, cabinets still on, carpet glowing under blacklight. A figure in a holographic windbreaker slaps the side of one cabinet and its picture comes off the screen: the pixels lift as solid coloured tiles, swarm out across the aisle and pull the pictures off every other machine with them, until the whole room is a moving cloud of cyan and hot pink squares. The camera tracks sideways down the aisle and turns into the swarm as it builds. One hard cyan key from the nearest screen, deep violet ambient. Real weight and inertia, each tile catching light separately, no text.",
"seconds": "5",
"duration": 5,
"resolution": "1080p",
"ratio": "16:9",
"aspect_ratio": "16:9"
}

Sử dụng khóa API Modelflare với https://modelflare.dev/v1. Điểm vào cổng là POST /v1/videos.

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
Terminal windowbash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.1-t2v",
"input": {"prompt": "A white cat runs through a neon-lit street in the rain, cinematic tracking shot"},
"parameters": {"resolution": "1080P", "ratio": "16:9", "duration": 5, "watermark": false}
}'

Lưu ID nhiệm vụ. Thăm dò GET /v1/videos/{task_id} và tải xuống với GET /v1/videos/{task_id}/content. URL kết quả có thể hết hạn, vì vậy hãy chuyển tệp ngay.

Terminal windowbash
curl https://modelflare.dev/v1/videos/TASK_ID \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"

HappyHorse sử dụng input.prompt; chọn hình dạng input.media khớp với ID kiểu máy t2v, i2v hoặc r2v.

HappyHorse T2V sử dụng input.prompt để tạo video.

Cánh đồng Bắt buộc Ghi chú
model Có happyhorse-1.1-t2v
input.prompt Có Mô tả văn bản hoặc hướng dẫn tham khảo, tối đa 5.000 ký tự không phải tiếng Trung hoặc 2.500 ký tự tiếng Trung
input.media[] Không —
parameters.resolution Không 720P / 1080P, mặc định 1080P
parameters.ratio Không 16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 4:5 / 5:4 / 9:21 / 21:9, mặc định 16:9
parameters.duration Không 3–15 giây, mặc định 5
parameters.watermark Không Có nên thêm hình mờ HappyHorse hay không
parameters.seed Không Seed tùy chọn từ 0 đến 2.147.483.647

T2V chỉ cần input.prompt; lời nhắc được giới hạn ở 5.000 ký tự không phải tiếng Trung hoặc 2.500 ký tự tiếng Trung, đầu ra là 720P hoặc 1080P với chín giá trị tỷ lệ và thời lượng là 3–15 giây.

Tham số mô hình không hợp lệ trả về 4xx cùng với ID yêu cầu. Tác vụ không đồng bộ cũng có thể bị lỗi sau khi quá trình tạo thành công; sử dụng error_code và error_message từ phản hồi thăm dò làm lý do nhiệm vụ cuối cùng. Đừng thử lại cùng một yêu cầu với hình dạng JSON khác.

Trang này bao gồm các cuộc gọi chỉnh sửa và tạo mô hình Modelflare. Tính năng làm giàu bản đồ hoặc tìm kiếm, quản lý giọng nói và quản lý thư viện thành phần là các API tài nguyên nằm ngoài bề mặt lệnh gọi mô hình công khai này và không phải là các trường yêu cầu bắt buộc.

Mô hình này sử dụng tính phí video theo giây. Xem trang định giá mẫu để biết giá khách hàng hiện tại, giá niêm yết tham khảo và thông số kỹ thuật đầy đủ.

Hợp đồng truyền thông · v1

ID hợp đồng: media.happyhorse-1-1-t2v.v1Bộ chuyển đổi: video.happyhorse.v1@v1Dấu vân tay: 4f3b6a3c628a981b1d15070759d8f96df185c43c684a22bba802349f85e3e6f9

Nguồn chính thức: Alibaba Cloud Model Studio

Thông số hợp đồng

Trường ý địnhĐiều khiểnTùy chọn
ratioselect16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 4:5 / 5:4 / 21:9 / 9:21
resolutionselect720p / 1080p
durationselect3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15

Khả năng được hỗ trợ

  • allowed_values · ratio · 16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 21:9, 9:21
  • allowed_values · resolution · 720p, 1080p
  • allowed_values · duration · 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15

Ví dụ về yêu cầu có cấu trúc

text

Ý định

{
  "duration": 3,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p"
}

Yêu cầu của nhà cung cấp

{
  "duration": 3,
  "model": "happyhorse-1.1-t2v",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p",
  "seconds": "3"
}