Tạo một tác vụ image-to-video của Runway
Sử dụng CometAPI để gọi Runway image_to_video và chuyển đổi URL hình ảnh tĩnh thành đầu ra video thô, với hỗ trợ X-Runway-Version để tương thích.
Trước khi gọi
- Gửi header
X-Runway-Versionbắt buộc, ví dụ2024-11-06 - Sử dụng
model: gen3a_turbo - Cung cấp
promptImageHTTPS ổn định - Bắt đầu với
duration: 5và một giá trị ratio được hỗ trợ cho model/phiên bản Runway đã chọn
Duration và ratio
ratio, không phải size. Hãy hiểu các giá trị ratio kiểu độ phân giải theo dạng tương đương WxH của chúng: 1280:720 nhắm tới 1280x720, 720:1280 nhắm tới 720x1280, và 1280:768 vẫn có thể render thành 1280x720 tùy thuộc vào model/phiên bản đã chọn.
Luồng tác vụ
Gửi request image-to-video
Lưu id được trả về
id của tác vụ để polling sau.Poll trạng thái tác vụ
task_not_exist, hãy đợi vài giây rồi thử lại.Ủy quyền
Bearer token authentication. Use your CometAPI key.
Tiêu đề
Runway version header, for example 2024-11-06.
Nội dung
Source image URL.
Runway image-to-video model ID. Choose an available model from the Models page.
Random seed for reproducible results. Range: 0–999999999.
Text prompt describing the desired motion or scene. Maximum 512 characters.
Whether to add a watermark to the output video.
Video duration in seconds. Runway support is model/version dependent; use 5 or 10 for the broadest compatibility. CometAPI forwards this value to Runway.
Requested output ratio. Accepted values are Runway model/version dependent. With X-Runway-Version 2024-11-06, use a resolution-style value accepted by the selected model, such as 1280:768, 768:1280, 1280:720, or 720:1280. Read these as WxH targets, but completed media may normalize, so inspect the returned file before relying on exact pixels.
Phản hồi
Task accepted.