Chuyển đến nội dung chính
POST
cURL
Sử dụng gen4.5 để tạo video từ một Prompt văn bản. Gửi CometAPI API key của bạn bằng phương thức xác thực Bearer và phần thân yêu cầu JSON.

Chuẩn bị yêu cầu

  • Đặt model thành gen4.5.
  • Mô tả cảnh và chuyển động trong promptText, sử dụng từ 1 đến 1.000 đơn vị mã UTF-16.
  • Đặt ratio thành 1280:720 cho bố cục ngang hoặc 720:1280 cho bố cục dọc.
  • Đặt duration thành một số nguyên từ 2 đến 10 giây.
Cả bốn trường đều bắt buộc. Để bắt đầu từ một hình ảnh, hãy sử dụng Tạo tác vụ image-to-video Runway. Không đưa promptImage hoặc tùy chọn audio vào yêu cầu text-to-video này.

Thiết lập các tùy chọn điều khiển

Để chỉ định seed lấy mẫu rõ ràng, hãy dùng 1 đến 4294967295. Việc bỏ qua hoặc 0 sẽ chọn một seed ngẫu nhiên. Nếu bạn đưa contentModeration vào, hãy đặt giá trị của thuộc tính đó publicFigureThreshold thành auto hoặc low; nếu không, hãy bỏ qua đối tượng. Sử dụng outputFormat để chọn MP4, ProRes, chuỗi PNG hoặc một trong các định dạng HDR được liệt kê trong schema yêu cầu. Bỏ qua trường này để dùng H.264 MP4. Bạn có thể đặt proresProfile chỉ khi outputFormat là prores hoặc hdr_prores. Định dạng HDR ProRes chấp nhận 422, 422 HQ hoặc 4444.

Lấy kết quả

Lưu id được trả về và sử dụng Lấy tác vụ Runway. Khi status là SUCCEEDED, hãy đọc các URL video trong output.

Ủy quyền

Authorization
string
header
bắt buộc

Use your CometAPI API key.

Nội dung

application/json

Request parameters for gen4.5.

model
enum<string>
bắt buộc

Model ID for this request variant.

Tùy chọn có sẵn:
gen4.5
Allowed value: "gen4.5"
promptText
string
bắt buộc

Describe the requested scene or motion in 1 to 1,000 UTF-16 code units.

Required string length: 1 - 1000
ratio
enum<string>
bắt buộc

Requested output dimensions, expressed as width:height. Choose a value listed for this model and endpoint.

Tùy chọn có sẵn:
1280:720,
720:1280
duration
integer
bắt buộc

Requested video duration in whole seconds, from 2 through 10.

Phạm vi bắt buộc: 2 <= x <= 10
seed
integer

Optional sampling seed. Use a positive integer for an explicit seed. Omission or 0 selects a random seed.

Phạm vi bắt buộc: 0 <= x <= 4294967295
contentModeration
object

Optional content moderation settings. Omit the object to use standard moderation.

outputFormat
enum<string>
bắt buộc if proresProfile is set

Output encoding. Omit for mp4 (H.264). prores returns MOV; png_sequence returns a PNG ZIP; sdr_rec709_10bit returns 10-bit Rec.709 HEVC. hdr10 and hlg return 10-bit HDR MP4; hdr_pq_12bit_master returns 12-bit HEVC MOV; hdr_prores returns HDR ProRes MOV. The HDR PNG/EXR sequence formats return ZIP archives; the ACEScg variants target the named ACES version.

Tùy chọn có sẵn:
mp4,
prores,
png_sequence,
hdr10,
hlg,
sdr_rec709_10bit,
hdr_pq_12bit_master,
hdr_prores,
hdr_png_sequence,
hdr_exr_sequence,
hdr_exr_acescg_sequence_1_3,
hdr_exr_acescg_sequence_2_0
proresProfile
enum<string>

Profile for outputFormat prores or hdr_prores. Omit for 4444 with prores, or 422 HQ with hdr_prores. hdr_prores accepts only 422, 422 HQ, or 4444. Omit this field for other formats.

Tùy chọn có sẵn:
422,
4444,
422 Proxy,
422 LT,
422 HQ,
4444 XQ

Phản hồi

Task submitted. Save its id to retrieve task status.

id
string
bắt buộc

Task ID for GET /runwayml/v1/tasks/{id}.

status
string

Task state, when returned.

createdAt
string<date-time>

Task submission timestamp, when returned.

output
string<uri>[]

Result URLs, when returned.

failure
string

Failure explanation, when returned.

failureCode
string

Machine-readable failure code, when returned.

estimatedCost
object

Task estimate metadata, when returned.

cost
object

Task cost metadata, when returned.

Lần sửa đổi cuối 21 tháng 9, 2026