Docs Rivya AI
Trang API mô hình

Tích hợp API Hailuo Pro

Dùng Hailuo Pro qua Rivya Public API v1 với model id hailuo-pro, input được hỗ trợ, tham số, quy tắc Files API, tín dụng và ví dụ response.

Khả dụng qua APIText hoặc URL sẵn sàng; reference modes dùng Files APIVideo
ID mô hình API

hailuo-pro

Input

text, file

Files API

Bắt buộc cho reference modes

Tín dụng cơ bản

57

Năng lực

Video

Thanh toán

FIXED

Giới hạn prompt

1500 ký tự

Hợp đồng yêu cầu

Gửi model id ở top level. Điều khiển riêng của mô hình nằm trong params.

KeyTypeBắt buộcDefaultMô tả
modelstringhailuo-proDùng API model id hailuo-pro.
promptstring-Tối đa 1500 ký tự cho mô hình này.
paramsobjectKhông-Object tham số riêng của mô hình. Dùng các dòng bên dưới để xem key được phép.
client_request_idstringKhông-Client-side id tùy chọn để trace request trong hệ thống của bạn.

Tham số mô hình

KeyTypeBắt buộcDefaultRangeOptionsMô tả
prompt_optimizerselectKhôngfalse-false, trueCho phép Hailuo viết lại và tối ưu prompt của bạn trước khi tạo. Tắt tùy chọn này khi bạn muốn lượt chạy bám sát câu chữ gốc hơn.

Chính sách tải lên

Upload reference files trước, rồi đặt URL và duration token được trả về vào params.referenceMediaItems.

Quy tắc tham chiếu

Ảnh tham chiếu: Chế độ ảnh chấp nhận tối đa 2 ảnh, và ảnh thứ hai sẽ trở thành khung hình cuối.

Số file tối đa

2

Loại file được chấp nhận

image

Token thời lượng

Tham chiếu video và audio nên mang durationToken từ /api/v1/files khi cần xác minh duration.

kindKích thước tối đaMIME types
image10 MBimage/jpeg, image/png, image/webp

Yêu cầu tối thiểu

{
  "model": "hailuo-pro",
  "prompt": "A cinematic product reveal with smooth camera movement",
  "params": {
    "prompt_optimizer": "false"
  }
}

Yêu cầu có tệp tham chiếu

{
  "model": "hailuo-pro",
  "prompt": "A cinematic product reveal with smooth camera movement",
  "params": {
    "prompt_optimizer": "false",
    "referenceMediaItems": [
      {
        "url": "https://cdn.example.com/reference-image.png",
        "kind": "image",
        "name": "reference-image.png",
        "mimeType": "image/png"
      }
    ]
  }
}

Phản hồi tạo

Create endpoint trả về public task id. Poll status endpoint cho đến khi task succeeded hoặc failed.

{
  "id": "task_hailuo_pro_example",
  "status": "queued",
  "model": "hailuo-pro",
  "reserved_credits": 57,
  "final_credits": 0,
  "created_at": "2026-05-11T00:00:00.000Z",
  "updated_at": "2026-05-11T00:00:00.000Z",
  "result": null,
  "error": null
}

Lỗi thường gặp

validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found

Một số mode cần Files API reference uploads.