跳轉到主要內容
POST
cURL
使用 gen4.5 根據文字 Prompt 產生影片。透過 Bearer 驗證傳送您的 CometAPI API 金鑰以及 JSON 請求主體。

準備請求

  • 將 model 設為 gen4.5。
  • 在 promptText 中描述場景和動作,長度為 1 至 1,000 個 UTF-16 程式碼單位。
  • 將 ratio 設為 1280:720 以使用橫向畫面,或設為 720:1280 以使用直向畫面。
  • 將 duration 設為介於 2 到 10 秒之間的整數。
這四個欄位皆為必填。若要從圖片開始,請使用 建立 Runway 圖片轉影片任務. 請勿在此文字轉影片請求中包含 promptImage 或 audio 切換開關。

設定選用控制項

若要明確指定取樣種子,請使用 1 至 4294967295。省略該欄位或使用 0 會選擇隨機種子。若包含 contentModeration,請將其 publicFigureThreshold 設為 auto 或 low;否則請省略該物件。 使用 outputFormat 來選擇 MP4、ProRes、PNG 序列或其中一種 HDR 請求結構描述中列出的格式。若要使用 H.264 MP4,請省略此欄位。您只能設定 proresProfile ,且僅當 outputFormat 為 prores 或 hdr_prores 時。 HDR ProRes 格式接受 422、422 HQ 或 4444。

擷取結果

儲存傳回的 id,並使用 取得 Runway 任務. 當 status 為 SUCCEEDED 時,讀取 output 中的影片 URL。

授權

Authorization
string
header
必填

Use your CometAPI API key.

主體

application/json

Request parameters for gen4.5.

model
enum<string>
必填

Model ID for this request variant.

可用選項:
gen4.5
Allowed value: "gen4.5"
promptText
string
必填

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

Required string length: 1 - 1000
ratio
enum<string>
必填

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

可用選項:
1280:720,
720:1280
duration
integer
必填

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

必填範圍: 2 <= x <= 10
seed
integer

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

必填範圍: 0 <= x <= 4294967295
contentModeration
object

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

outputFormat
enum<string>
必填 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.

可用選項:
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.

可用選項:
422,
4444,
422 Proxy,
422 LT,
422 HQ,
4444 XQ

回應

Task submitted. Save its id to retrieve task status.

id
string
必填

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.

最後修改於 2026年9月21日